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

Version Path
fog-1.22.0 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-1.21.0 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-1.20.0 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140110003812 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140109202555 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140107192102 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20140107142106 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.19.0.20131219203941 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131219193542 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-1.19.0 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131219033443 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131219032002 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131219030716 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131219022322 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131218202447 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131209091424 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb