2012-01-17 11:19:21 -05:00
|
|
|
module Fog
|
|
|
|
module Compute
|
|
|
|
class IBM
|
|
|
|
class Real
|
|
|
|
|
|
|
|
# Get all locations
|
|
|
|
#
|
|
|
|
# ==== Returns
|
|
|
|
# * response<~Excon::Response>:
|
|
|
|
# * body<~Hash>
|
|
|
|
# TODO: docs
|
2012-01-17 12:02:12 -05:00
|
|
|
def list_locations
|
2012-01-17 11:19:21 -05:00
|
|
|
request(
|
|
|
|
:method => 'GET',
|
|
|
|
:expects => 200,
|
|
|
|
:path => "/locations"
|
|
|
|
)
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2011-12-02 10:27:44 -08:00
|
|
|
|
|
|
|
class Mock
|
|
|
|
|
|
|
|
def list_locations
|
|
|
|
response = Excon::Response.new
|
|
|
|
response.status = 200
|
|
|
|
response.body = { "locations" => self.data[:locations].values }
|
|
|
|
response
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
2012-01-17 11:19:21 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|