Sha256: c0125c5764df0240b790aa9aa856e2a9fb0eece77ee0fc4e59bf1da2ddd437a5

Contents?: true

Size: 715 Bytes

Versions: 4

Compression:

Stored size: 715 Bytes

Contents

require 'fog/compute/models/vcloud/ip'

module Fog
  module Vcloud
    class Compute
      class Ips < Fog::Vcloud::Collection

        model Fog::Vcloud::Compute::Ip

        undef_method :create

        attribute :href

        def all
          self.href = connection.default_vdc_href unless self.href
          check_href!( :messages => "Ips href of a Network you want to enumerate" )
          if data = connection.get_network_ips(href).body[:IpAddress]
            load(data)
          end
        end

        def get(uri)
          if data = connection.get_network_ip(uri).body
            new(data)
          end
        rescue Fog::Errors::NotFound
          nil
        end

      end
    end
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
brightbox-cli-0.13.1 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/vcloud/ips.rb
brightbox-cli-0.13.0 lib/brightbox-cli/vendor/fog/lib/fog/compute/models/vcloud/ips.rb
fog-0.11.0 lib/fog/compute/models/vcloud/ips.rb
fog-0.10.0 lib/fog/compute/models/vcloud/ips.rb