Sha256: d936b47882316ee84d08761e9c5d9dac8f25cd96561fa0f0aa50bc03ae6f848e

Contents?: true

Size: 1.3 KB

Versions: 35

Compression:

Stored size: 1.3 KB

Contents

module Fog
  module HP
    class LB

      # List virtual IPs for an existing load balancer
      #
      # ==== Parameters
      # * 'load_balancer_id'<~String> - UUId of the load balancer to get virtual IPs for
      #
      # ==== Returns
      # * response<~Excon::Response>:
      #   * body<~Hash>:
      #     * 'virtualIps'<~Array>:
      #       * 'id'<~String> - UUId for the virtual IP
      #       * 'address'<~String> - Address for the virtual IP
      #       * 'type'<~String> - Type for the virtual IP e.g. 'PUBLIC'
      #       * 'ipVersion'<~String> - Version for virtual IP e.g. 'IPV4', 'IPV6'
      class Real
        def list_load_balancer_virtual_ips(load_balancer_id)
          request(
            :expects => 200,
            :method  => 'GET',
            :path    => "loadbalancers/#{load_balancer_id}/virtualips"
          )
        end

      end
      class Mock
        def list_load_balancer_virtual_ips(load_balancer_id)
          response = Excon::Response.new
          if lb_data = get_load_balancer(load_balancer_id)
            virtual_ips = lb_data.body['virtualIps']
            response.status = 200
            response.body   = { 'virtualIps' => virtual_ips }
            response
          else
            raise Fog::HP::LB::NotFound
          end
        end

      end
    end
  end
end

Version data entries

35 entries across 35 versions & 2 rubygems

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