From a4c1deac54673ccc2b6e5b399bd853ad912bab26 Mon Sep 17 00:00:00 2001 From: Hemant Kumar Date: Thu, 12 Apr 2012 17:32:59 +0530 Subject: [PATCH] [Brightbox] Fix output format for brightbox cloud ip --- lib/fog/brightbox/compute.rb | 1 + lib/fog/brightbox/requests/compute/create_cloud_ip.rb | 2 +- tests/brightbox/requests/compute/helper.rb | 10 ++++++++++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/lib/fog/brightbox/compute.rb b/lib/fog/brightbox/compute.rb index 437f50cb6..7d123aa7e 100644 --- a/lib/fog/brightbox/compute.rb +++ b/lib/fog/brightbox/compute.rb @@ -183,6 +183,7 @@ module Fog @connection.request(options) end end + end end end diff --git a/lib/fog/brightbox/requests/compute/create_cloud_ip.rb b/lib/fog/brightbox/requests/compute/create_cloud_ip.rb index d1996647a..5d925a641 100644 --- a/lib/fog/brightbox/requests/compute/create_cloud_ip.rb +++ b/lib/fog/brightbox/requests/compute/create_cloud_ip.rb @@ -3,7 +3,7 @@ module Fog class Brightbox class Real - def create_cloud_ip + def create_cloud_ip(options = nil) request("post", "/1.0/cloud_ips", [201],options) end diff --git a/tests/brightbox/requests/compute/helper.rb b/tests/brightbox/requests/compute/helper.rb index bdb4f11d3..af73cca2f 100644 --- a/tests/brightbox/requests/compute/helper.rb +++ b/tests/brightbox/requests/compute/helper.rb @@ -76,6 +76,11 @@ class Brightbox "threshold_up" => Integer, "threshold_down" => Integer } + PORT_TRANSLATOR = { + "incoming" => Integer, + "outgoing" => Integer, + "protocol" => String + } end module Nested @@ -102,6 +107,7 @@ class Brightbox "url" => String, "public_ip" => String, "status" => String, + "name" => Fog::Nullable::String, "reverse_dns" => String } @@ -232,9 +238,11 @@ class Brightbox "public_ip" => String, "status" => String, "reverse_dns" => String, + "name" => Fog::Nullable::String, "account" => Brightbox::Compute::Formats::Nested::ACCOUNT, "interface" => Fog::Brightbox::Nullable::Interface, "load_balancer" => Fog::Brightbox::Nullable::LoadBalancer, + "port_translators" => [Brightbox::Compute::Formats::Struct::PORT_TRANSLATOR], "server" => Fog::Brightbox::Nullable::Server } @@ -428,9 +436,11 @@ class Brightbox "public_ip" => String, "status" => String, "reverse_dns" => String, + "name" => Fog::Nullable::String, "account" => Fog::Brightbox::Nullable::Account, "interface" => Fog::Brightbox::Nullable::Interface, "load_balancer" => Fog::Brightbox::Nullable::LoadBalancer, + "port_translators" => [Brightbox::Compute::Formats::Struct::PORT_TRANSLATOR], "server" => Fog::Brightbox::Nullable::Server }