2012-04-03 18:49:27 -04:00
|
|
|
Shindo.tests('Fog::Compute[:hp] | flavor requests', ['hp']) do
|
|
|
|
|
|
|
|
@flavor_format = {
|
2012-04-10 14:57:43 -04:00
|
|
|
'rxtx_quota' => Integer,
|
|
|
|
'rxtx_cap' => Integer,
|
|
|
|
'vcpus' => Integer,
|
|
|
|
'swap' => Integer,
|
|
|
|
'disk' => Integer,
|
|
|
|
'ram' => Integer,
|
|
|
|
'id' => Integer,
|
|
|
|
'links' => [Hash],
|
|
|
|
'name' => String
|
2012-04-03 18:49:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
@list_flavors_format = {
|
|
|
|
'id' => Integer,
|
2012-04-10 14:57:43 -04:00
|
|
|
'name' => String,
|
|
|
|
'links' => [Hash]
|
2012-04-03 18:49:27 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
tests('success') do
|
|
|
|
|
|
|
|
tests('#list_flavors').formats({'flavors' => [@list_flavors_format]}) do
|
|
|
|
Fog::Compute[:hp].list_flavors.body
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('#get_flavor_details(1)').formats(@flavor_format) do
|
|
|
|
Fog::Compute[:hp].get_flavor_details(1).body['flavor']
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('#list_flavors_detail').formats({'flavors' => [@flavor_format]}) do
|
|
|
|
Fog::Compute[:hp].list_flavors_detail.body
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
tests('failure') do
|
|
|
|
|
2012-04-10 18:11:56 -04:00
|
|
|
tests('#get_flavor_details(9999)').raises(Fog::Compute::HP::NotFound) do
|
|
|
|
Fog::Compute[:hp].get_flavor_details(9999)
|
2012-04-03 18:49:27 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|