Sha256: 1d6c938aea11e0436d3a62e964827934f9025d45807f5afb151e9b244725a19f
Contents?: true
Size: 1.18 KB
Versions: 37
Compression:
Stored size: 1.18 KB
Contents
module Fog module HP class LB # List all load balancer nodes # # ==== Returns # * response<~Excon::Response>: # * body<~Hash>: # * 'nodes'<~Array>: Nodes for the load balancer # * 'id'<~String> - UUId for the node # * 'address'<~String> - Address for the node # * 'port'<~String> - Port for the node # * 'condition'<~String> - Condition for the node e.g. 'ENABLED' # * 'status'<~String> - Status for the node e.g. 'ONLINE' class Real def list_load_balancer_nodes(load_balancer_id) response = request( :expects => 200, :method => 'GET', :path => "loadbalancers/#{load_balancer_id}/nodes" ) response end end class Mock def list_load_balancer_nodes(load_balancer_id) response = Excon::Response.new if lb = get_load_balancer(load_balancer_id).body response.status = 200 response.body = {'nodes' => lb['nodes']} response else raise Fog::HP::LB::NotFound end end end end end end
Version data entries
37 entries across 37 versions & 2 rubygems