From 41a964c577e8beff2f6c40a7626b936f14d5bbaa Mon Sep 17 00:00:00 2001 From: Decklin Foster Date: Tue, 28 Feb 2012 23:59:02 -0500 Subject: [PATCH] [ibm] Nullable formats for attributes that may not be returned --- tests/ibm/requests/compute/address_tests.rb | 4 +++- tests/ibm/requests/compute/image_tests.rb | 6 +++--- tests/ibm/requests/compute/instance_tests.rb | 8 +++++--- 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/tests/ibm/requests/compute/address_tests.rb b/tests/ibm/requests/compute/address_tests.rb index ebe7280f25..a2c2b1c27c 100644 --- a/tests/ibm/requests/compute/address_tests.rb +++ b/tests/ibm/requests/compute/address_tests.rb @@ -8,7 +8,9 @@ "id" => String, "mode" => Integer, "hostname" => String, - "type" => Integer + "type" => Integer, + "instanceId" => Fog::Nullable::String, + "vlan" => Fog::Nullable::String, } # create_address doesn't return mode, hostname or type attributes diff --git a/tests/ibm/requests/compute/image_tests.rb b/tests/ibm/requests/compute/image_tests.rb index e6b7c0a2c2..3fae5b9f31 100644 --- a/tests/ibm/requests/compute/image_tests.rb +++ b/tests/ibm/requests/compute/image_tests.rb @@ -5,7 +5,7 @@ 'visibility' => String, 'platform' => String, 'owner' => String, - 'architecture' => String, + 'architecture' => Fog::Nullable::String, 'createdTime' => Integer, 'location' => String, 'productCodes' => Array, @@ -13,8 +13,8 @@ 'id' => String, 'description' => String, 'supportedInstanceTypes' => Array, - 'manifest' => String, - 'documentation' => String + 'manifest' => Fog::Nullable::String, + 'documentation' => Fog::Nullable::String, } # TODO: Actually check this format diff --git a/tests/ibm/requests/compute/instance_tests.rb b/tests/ibm/requests/compute/instance_tests.rb index 14383fd4d5..9d5bde1a09 100644 --- a/tests/ibm/requests/compute/instance_tests.rb +++ b/tests/ibm/requests/compute/instance_tests.rb @@ -14,16 +14,18 @@ 'imageId' => String, 'launchTime' => Integer, 'id' => String, + 'ip' => Fog::Nullable::String, 'volumes' => Array, - 'root-only' => String, + 'root-only' => Fog::Nullable::String, 'instanceType' => String, - 'diskSize' => String, + 'diskSize' => Fog::Nullable::String, 'requestName' => String, 'secondaryIP' => Array, 'status' => Integer, 'software' => Array, 'expirationTime'=> Integer, - 'owner' => String + 'owner' => String, + 'vlan' => Fog::Nullable::String, } @instances_format = {