1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/lib/fog/ibm/requests/compute/list_locations.rb

38 lines
801 B
Ruby
Raw Normal View History

2012-01-17 11:19:21 -05:00
module Fog
module Compute
class IBM
class Real
2011-04-26 22:49:05 -07:00
# Returns the list of Images available to be provisioned on the IBM DeveloperCloud.
#
# ==== Parameters
# No parameters
2012-01-17 11:19:21 -05:00
#
# ==== Returns
# * response<~Excon::Response>:
2011-04-26 22:49:05 -07:00
# * body<~Hash>:
# * 'locations'<~Array>: list of locations
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