2011-08-02 11:58:18 -04:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class Cloudstack
|
|
|
|
class Real
|
|
|
|
|
2011-08-02 15:18:00 -04:00
|
|
|
# Lists zones.
|
|
|
|
#
|
|
|
|
# {CloudStack API Reference}[http://download.cloud.com/releases/2.2.0/api_2.2.4/global_admin/listZones.html]
|
2011-08-02 11:58:18 -04:00
|
|
|
def list_zones(options={})
|
|
|
|
options.merge!(
|
|
|
|
'command' => 'listZones'
|
|
|
|
)
|
2012-01-25 11:11:22 -05:00
|
|
|
|
2011-08-02 11:58:18 -04:00
|
|
|
request(options)
|
|
|
|
end
|
|
|
|
|
2012-05-16 14:12:08 -04:00
|
|
|
end # Real
|
|
|
|
|
|
|
|
class Mock
|
|
|
|
def list_zones(options={})
|
|
|
|
zones = self.data[:zones].values
|
|
|
|
|
|
|
|
{
|
|
|
|
"listzonesresponse"=>
|
|
|
|
{
|
|
|
|
"count" => zones.size,
|
|
|
|
"zone" => zones
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
|
|
|
end # Mock
|
|
|
|
end # Cloudstack
|
|
|
|
end # Compute
|
|
|
|
end # Fog
|