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