mirror of
https://github.com/fog/fog.git
synced 2022-11-09 13:51:43 -05:00
f8f22ea4e1
OpenStack Grizzly no longer supports volumes. This removes the volume settings from the OpenStack limits tests and Mock . This change has will has no effect on users of previous of Fog for previous releases (Folsom, etc) but should allow us to easily support the latest upstream codebase and run Fog *real* tests.
60 lines
1.8 KiB
Ruby
60 lines
1.8 KiB
Ruby
Shindo.tests('Fog::Compute[:openstack] | limits requests', ['openstack']) do
|
|
@rate_limit_format = {
|
|
'regex' => String,
|
|
'uri' => String,
|
|
'limit' => Array
|
|
}
|
|
|
|
@rate_limit_usage_format = {
|
|
'next-available' => String,
|
|
'unit' => String,
|
|
'verb' => String,
|
|
'remaining' => Fixnum,
|
|
'value' => Fixnum
|
|
}
|
|
|
|
@absolute_limits_format = {
|
|
'maxServerMeta' => Fixnum,
|
|
'maxTotalInstances' => Fixnum,
|
|
'maxPersonality' => Fixnum,
|
|
'maxImageMeta' => Fixnum,
|
|
'maxPersonalitySize' => Fixnum,
|
|
'maxSecurityGroupRules' => Fixnum,
|
|
'maxTotalKeypairs' => Fixnum,
|
|
'maxSecurityGroups' => Fixnum,
|
|
'maxTotalCores' => Fixnum,
|
|
'maxTotalFloatingIps' => Fixnum,
|
|
'maxTotalRAMSize' => Fixnum,
|
|
'totalCoresUsed' => Fixnum,
|
|
'totalRAMUsed' => Fixnum,
|
|
'totalInstancesUsed' => Fixnum,
|
|
'totalSecurityGroupsUsed' => Fixnum,
|
|
'totalKeyPairsUsed' => Fixnum
|
|
}
|
|
|
|
@limits_format = {
|
|
'rate' => Array,
|
|
'absolute' => Hash
|
|
}
|
|
|
|
tests('success') do
|
|
tests('#get_limits') do
|
|
tests('format').formats(@limits_format) do
|
|
Fog::Compute[:openstack].get_limits.body['limits']
|
|
end
|
|
|
|
tests('rate limit format').formats(@rate_limit_format) do
|
|
Fog::Compute[:openstack].get_limits.body['limits']['rate'].first
|
|
end
|
|
|
|
tests('rate limit usage format').formats(@rate_limit_usage_format) do
|
|
Fog::Compute[:openstack].get_limits.body['limits']['rate'].first['limit'].first
|
|
end
|
|
|
|
tests('absolute limits format').formats(@absolute_limits_format) do
|
|
Fog::Compute[:openstack].get_limits.body['limits']['absolute']
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|