mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
[ibm] Use Raleigh location for tests
This commit is contained in:
parent
3790e67940
commit
7725d07e31
11 changed files with 44 additions and 39 deletions
|
@ -115,30 +115,36 @@ module Fog
|
|||
|
||||
def self.populate_images
|
||||
images = {}
|
||||
images["20015393"] = {
|
||||
"name"=>"SUSE Linux Enterprise Server 11 SP1 for x86 (TOR)",
|
||||
"manifest"=>"https://www-147.ibm.com/cloud/enterprise/ram.ws/RAMSecure/artifact/{53575245-38D1-A40F-D8E0-8106DC68047D}/1.0/parameters.xml",
|
||||
images["20010001"] = {
|
||||
"name"=>"SUSE Linux Enterprise Server 11 SP1 for x86",
|
||||
"manifest"=>"https://www-147.ibm.com/cloud/enterprise/ram.ws/RAMSecure/artifact/{6CD09CE4-E99B-D72F-6C29-233C9B2A1676}/1.0/parameters.xml",
|
||||
"state"=>1,
|
||||
"visibility"=>"PUBLIC",
|
||||
"owner"=>"SYSTEM",
|
||||
"architecture"=>"i386",
|
||||
"platform"=>"SUSE Linux Enterprise Server/11 SP1",
|
||||
"createdTime"=>1296361572466,
|
||||
"location"=>"101",
|
||||
# HOLY METADATA BATMAN!
|
||||
"supportedInstanceTypes"=>[
|
||||
{"detail"=>"Silver - 32 bit (vCPU: 2, RAM: 4 GiB, Disk: 410 GiB)", "label"=>"Silver 32 bit",
|
||||
"price"=>{"rate"=>0.2, "unitOfMeasure"=>"UHR", "countryCode"=>"897", "effectiveDate"=>1313107200000, "currencyCode"=>"USD", "pricePerQuantity"=>1}, "id"=>"SLV32.2/4096/60*350"},
|
||||
{"detail"=>"Bronze - 32 bit (vCPU: 1, RAM: 2 GiB, Disk: 235 GiB)", "label"=>"Bronze 32 bit",
|
||||
"price"=>{"rate"=>0.115, "unitOfMeasure"=>"UHR", "countryCode"=>"897", "effectiveDate"=>1313107200000, "currencyCode"=>"USD", "pricePerQuantity"=>1}, "id"=>"BRZ32.1/2048/60*175"},
|
||||
{"detail"=>"Gold - 32 bit (vCPU: 4, RAM: 4 GiB, Disk: 410 GiB)", "label"=>"Gold 32 bit",
|
||||
"price"=>{"rate"=>0.33, "unitOfMeasure"=>"UHR", "countryCode"=>"897", "effectiveDate"=>1313107200000, "currencyCode"=>"USD", "pricePerQuantity"=>1}, "id"=>"GLD32.4/4096/60*350"},
|
||||
{"detail"=>"Copper - 32 bit (vCPU: 1, RAM: 2 GiB, Disk: 60 GiB)", "label"=>"Copper 32 bit",
|
||||
"price"=>{"rate"=>0.095, "unitOfMeasure"=>"UHR", "countryCode"=>"897", "effectiveDate"=>1313107200000, "currencyCode"=>"USD", "pricePerQuantity"=>1}, "id"=>"COP32.1/2048/60"}],
|
||||
"productCodes"=>["caondc1Sr7dKs9ARDmuPy6WPgV"],
|
||||
"documentation"=>"https://www-147.ibm.com/cloud/enterprise/ram.ws/RAMSecure/artifact/{53575245-38D1-A40F-D8E0-8106DC68047D}/1.0/GettingStarted.html",
|
||||
"id"=>"20015393",
|
||||
"description"=>"Suse Linux 32 bit - for TOR datacenter"
|
||||
"location"=>"41",
|
||||
"createdTime"=>1282466781000,
|
||||
"supportedInstanceTypes"=>
|
||||
[{"detail"=>"Copper - 32 bit (vCPU: 1, RAM: 2 GiB, Disk: 60 GiB)",
|
||||
"label"=>"Copper 32 bit",
|
||||
"price"=>{"rate"=>0.095, "unitOfMeasure"=>"UHR ", "countryCode"=>"897", "effectiveDate"=>-1, "currencyCode"=>"USD", "pricePerQuantity"=>1},
|
||||
"id"=>"COP32.1/2048/60"},
|
||||
{"detail"=>"Bronze - 32 bit (vCPU: 1, RAM: 2 GiB, Disk: 235 GiB)",
|
||||
"label"=>"Bronze 32 bit",
|
||||
"price"=>{"rate"=>0.115, "unitOfMeasure"=>"UHR ", "countryCode"=>"897", "effectiveDate"=>-1, "currencyCode"=>"USD", "pricePerQuantity"=>1},
|
||||
"id"=>"BRZ32.1/2048/60*175"},
|
||||
{"detail"=>"Silver - 32 bit (vCPU: 2, RAM: 4 GiB, Disk: 410 GiB)",
|
||||
"label"=>"Silver 32 bit",
|
||||
"price"=>{"rate"=>0.2, "unitOfMeasure"=>"UHR ", "countryCode"=>"897", "effectiveDate"=>-1, "currencyCode"=>"USD", "pricePerQuantity"=>1},
|
||||
"id"=>"SLV32.2/4096/60*350"},
|
||||
{"detail"=>"Gold - 32 bit (vCPU: 4, RAM: 4 GiB, Disk: 410 GiB)",
|
||||
"label"=>"Gold 32 bit",
|
||||
"price"=>{"rate"=>0.33, "unitOfMeasure"=>"UHR ", "countryCode"=>"897", "effectiveDate"=>-1, "currencyCode"=>"USD", "pricePerQuantity"=>1},
|
||||
"id"=>"GLD32.4/4096/60*350"}],
|
||||
"productCodes"=>["rtpSr7dKs9ARDmuPy6WPgV"],
|
||||
"documentation"=>"https://www-147.ibm.com/cloud/enterprise/ram.ws/RAMSecure/artifact/{6CD09CE4-E99B-D72F-6C29-233C9B2A1676}/1.0/GettingStarted.html",
|
||||
"id"=>"20010001",
|
||||
"description"=>"Suse Linux 32 bit"
|
||||
}
|
||||
images
|
||||
end
|
||||
|
|
|
@ -51,8 +51,8 @@ module Fog
|
|||
def initialize(new_attributes={})
|
||||
super(new_attributes)
|
||||
self.name ||= 'fog-instance'
|
||||
self.image_id ||= '20015393'
|
||||
self.location_id ||= '101'
|
||||
self.image_id ||= '20010001'
|
||||
self.location_id ||= '41'
|
||||
self.instance_type ||= 'COP32.1/2048/60'
|
||||
self.key_name ||= 'fog'
|
||||
end
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Shindo.tests('Fog::Compute[:ibm] | image', ['ibm']) do
|
||||
|
||||
@image_id = "20015393"
|
||||
@image_id = '20010001'
|
||||
@image = Fog::Compute[:ibm].images.get(@image_id)
|
||||
|
||||
tests('success') do
|
||||
|
|
|
@ -2,7 +2,7 @@ Shindo.tests('Fog::Compute[:ibm] | locations', ['ibm']) do
|
|||
|
||||
tests('success') do
|
||||
|
||||
@location_id = "101"
|
||||
@location_id = '41'
|
||||
|
||||
tests('Fog::Compute[:ibm].locations') do
|
||||
returns(true) { Fog::Compute[:ibm].locations.length > 0 }
|
||||
|
|
|
@ -6,9 +6,9 @@ Shindo.tests('Fog::Compute[:ibm] | server', ['ibm']) do
|
|||
@instance_id = nil
|
||||
|
||||
@name = "fog-test-instance-" + Time.now.to_i.to_s(32)
|
||||
@image_id = "20015393"
|
||||
@image_id = "20010001"
|
||||
@instance_type = "BRZ32.1/2048/60*175"
|
||||
@location_id = "101"
|
||||
@location_id = "41"
|
||||
|
||||
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
|
||||
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
||||
|
|
|
@ -6,7 +6,7 @@ Shindo.tests('Fog::Storage[:ibm] | volume', ['ibm']) do
|
|||
@volume_id = nil
|
||||
@name = "fog test volume"
|
||||
@format = "RAW"
|
||||
@location_id = "101"
|
||||
@location_id = "41"
|
||||
@size = "256"
|
||||
@offering_id = "20001208"
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ Shindo.tests('Fog::Compute[:ibm] | address requests', ['ibm']) do
|
|||
@list_address_format = { 'addresses' => [ @address_format ] }
|
||||
|
||||
@address_id = nil
|
||||
@location_id = "101"
|
||||
@location_id = "41"
|
||||
@offering_id = "20001223"
|
||||
|
||||
tests('success') do
|
||||
|
|
|
@ -4,8 +4,8 @@ Shindo.tests('Fog::Compute[:ibm] | image requests', ['ibm']) do
|
|||
'state' => Integer,
|
||||
'visibility' => String,
|
||||
'platform' => String,
|
||||
'architecture' => String,
|
||||
'owner' => String,
|
||||
'architecture' => String,
|
||||
'createdTime' => Integer,
|
||||
'location' => String,
|
||||
'productCodes' => Array,
|
||||
|
@ -50,9 +50,9 @@ Shindo.tests('Fog::Compute[:ibm] | image requests', ['ibm']) do
|
|||
|
||||
@instance_id = nil
|
||||
@name = "fog-test-image-instance-" + Time.now.to_i.to_s(32)
|
||||
@image_id = "20015393"
|
||||
@image_id = "20010001"
|
||||
@instance_type = "BRZ32.1/2048/60*175"
|
||||
@location = "101"
|
||||
@location = "41"
|
||||
|
||||
@id = nil
|
||||
@cloned_id = nil
|
||||
|
@ -68,7 +68,7 @@ Shindo.tests('Fog::Compute[:ibm] | image requests', ['ibm']) do
|
|||
end
|
||||
|
||||
tests('#get_image').formats(@image_format) do
|
||||
Fog::Compute[:ibm].get_image("20015393").body
|
||||
Fog::Compute[:ibm].get_image("20010001").body
|
||||
end
|
||||
|
||||
tests('#create_image').formats(@create_image_format) do
|
||||
|
|
|
@ -34,9 +34,9 @@ Shindo.tests('Fog::Compute[:ibm] | instance requests', ['ibm']) do
|
|||
|
||||
@instance_id = nil
|
||||
@name = "fog-test-instance-" + Time.now.to_i.to_s(32)
|
||||
@image_id = "20018425"
|
||||
@image_id = "20010001"
|
||||
@instance_type = "COP32.1/2048/60"
|
||||
@location = "101"
|
||||
@location = "41"
|
||||
@expiration_time= (Time.now.tv_usec + 10000).to_f * 1000
|
||||
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
|
||||
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
||||
|
|
|
@ -20,7 +20,7 @@ Shindo.tests('Fog::Compute[:ibm] | location requests', ['ibm']) do
|
|||
end
|
||||
|
||||
tests('#get_locations').formats(@location_format) do
|
||||
Fog::Compute[:ibm].get_location("101").body
|
||||
Fog::Compute[:ibm].get_location('41').body
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -33,14 +33,13 @@ Shindo.tests('Fog::Storage[:ibm] | volume requests', ['ibm']) do
|
|||
@volume_id = nil
|
||||
@name = "fog-test-volume" + Time.now.to_i.to_s(32)
|
||||
@format = "RAW"
|
||||
@location_id = "101"
|
||||
@location_id = "41"
|
||||
@size = "256"
|
||||
@offering_id = "20001208"
|
||||
|
||||
@instance_id = nil
|
||||
@image_id = "20015393"
|
||||
@image_id = "20010001"
|
||||
@instance_type = "BRZ32.1/2048/60*175"
|
||||
@location = "101"
|
||||
|
||||
@key_name = "fog-test-key-" + Time.now.to_i.to_s(32)
|
||||
@key = Fog::Compute[:ibm].keys.create(:name => @key_name)
|
||||
|
@ -64,7 +63,7 @@ Shindo.tests('Fog::Storage[:ibm] | volume requests', ['ibm']) do
|
|||
'fog-test-volume-instance-' + Time.now.to_i.to_s(32),
|
||||
@image_id,
|
||||
@instance_type,
|
||||
@location,
|
||||
@location_id,
|
||||
:key_name => @key_name
|
||||
).body['instances'][0]['id']
|
||||
# TODO: Add assertions for this whenever it is properly supported
|
||||
|
|
Loading…
Add table
Reference in a new issue