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/hp/requests/lb/list_versions.rb

31 lines
691 B
Ruby
Raw Normal View History

2013-03-01 18:46:56 -05:00
module Fog
module HP
2013-03-05 11:25:30 -05:00
class LB
class Real
2013-03-06 12:27:06 -05:00
2013-03-05 11:25:30 -05:00
def list_versions
request(
:expects => [200, 204],
:method => 'GET',
:path => "",
:version => true
)
2013-03-01 18:46:56 -05:00
end
2013-03-05 11:25:30 -05:00
end
class Mock
2013-03-06 12:27:06 -05:00
2013-03-05 11:25:30 -05:00
def list_versions
response = Excon::Response.new
response.status = 200
response.body = {
"versions" => [
{"id" => "v1.1", "links" => [{"href" => "http://api-docs.hpcloud.com", "rel" => "self"}], "status" => "CURRENT", "updated" => "2012-12-18T18:30:02.25Z"}
]
}
response
2013-03-01 18:46:56 -05:00
end
2013-03-06 12:27:06 -05:00
2013-03-01 18:46:56 -05:00
end
end
end
end