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_protocols.rb

30 lines
619 B
Ruby
Raw Normal View History

2013-03-01 17:46:56 -06:00
module Fog
module HP
2013-03-05 10:25:30 -06:00
class LB
class Real
def list_protocols
response = request(
:expects => 200,
:method => 'GET',
:path => 'protocols'
)
response
2013-03-01 17:46:56 -06:00
end
2013-03-05 10:25:30 -06:00
end
class Mock
def list_protocols
response = Excon::Response.new
2013-03-06 12:24:32 -06:00
response.status = 200
response.body = {
"protocols" => [
{ "name" => "HTTP", "port" => 80 },
{ "name" => "TCP", "port" => 443 }
]
}
2013-03-01 17:46:56 -06:00
2013-03-05 10:25:30 -06:00
response
2013-03-01 17:46:56 -06:00
end
end
end
end
end