Sha256: e444f8781022b5b75613d1bad5f3b1dd7b909f6a1150426cdf7272e39970073b

Contents?: true

Size: 1.55 KB

Versions: 29

Compression:

Stored size: 1.55 KB

Contents

module Fog
  module HP
    class Network
      class Real
        # List existing subnets
        #
        # ==== Parameters
        # * options<~Hash>:
        #
        # ==== Returns
        # * response<~Excon::Response>:
        #   * body<~Hash>:
        #     * subnets<~Array>:
        #       * 'id'<~String>: - UUId for the subnet
        #       * 'name'<~String>: - Name of the subnet
        #       * 'network_id'<~String>: - UUId of the network
        #       * 'tenant_id'<~String>: - TenantId that owns the subnet
        #       * 'dns_nameservers'<~Array>: - Array of DNS Nameservers
        #       * 'allocation_pools'<~Array>:
        #         * 'start'<~String>: - Start IP address
        #         * 'end'<~String>: - End IP address
        #       * 'host_routes'<~Array>: - Array of host routes
        #       * 'gateway_ip'<~String>: - Gateway IP address
        #       * 'ip_version'<~Integer>: - IP version, values 4 or 6
        #       * 'cidr'<~String>: - Cidr
        #       * 'enable_dhcp'<~Boolean>: - true or false, defaults to true
        def list_subnets(options = {})
          request(
            :expects => 200,
            :method  => 'GET',
            :path    => 'subnets',
            :query   => options
          )
        end
      end

      class Mock
        def list_subnets(options = {})
          response = Excon::Response.new

          subnets = self.data[:subnets].values
          response.status = 200
          response.body = { 'subnets' => subnets }
          response
        end
      end
    end
  end
end

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
fog-1.37.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.36.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.35.0 lib/fog/hp/requests/network/list_subnets.rb
fog-2.0.0.pre.0 lib/fog/hp/requests/network/list_subnets.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-1.32.0/lib/fog/hp/requests/network/list_subnets.rb
fog-1.34.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.33.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.32.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.31.0 lib/fog/hp/requests/network/list_subnets.rb
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/hp/requests/network/list_subnets.rb
fog-1.30.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.29.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.28.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.27.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.26.0 lib/fog/hp/requests/network/list_subnets.rb
fog-1.25.0 lib/fog/hp/requests/network/list_subnets.rb
nsidc-fog-1.24.1 lib/fog/hp/requests/network/list_subnets.rb
fog-1.24.0 lib/fog/hp/requests/network/list_subnets.rb
ns-fog-1.22.11 lib/fog/hp/requests/network/list_subnets.rb
ns-fog-1.22.10 lib/fog/hp/requests/network/list_subnets.rb