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-maestrodev-1.18.0.20131209090811 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131206115947 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131205181604 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131127194823 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131126183714 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131126122111 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131125111730 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131125083406 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131123105121 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131122203507 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131121075022 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131118164830 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131115184302 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131114200144 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131112185232 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-maestrodev-1.18.0.20131111203459 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb
fog-1.18.0 lib/fog/hp/requests/lb/list_load_balancer_nodes.rb