Sha256: a4fab32578248a0fd29e0253e49b9890ef90cb23b51759afa6c7a554947d7472

Contents?: true

Size: 1.16 KB

Versions: 14

Compression:

Stored size: 1.16 KB

Contents

module Fog
  module Compute
    class Ecloud
      class Network < Fog::Ecloud::Model
        identity :href

        attribute :name, :aliases => :Name
        attribute :type, :aliases => :Type
        attribute :other_links, :aliases => :Links
        attribute :address, :aliases => :Address
        attribute :network_type, :aliases => :NetworkType
        attribute :broadcast_address, :aliases => :BroadcastAddress
        attribute :gateway_address, :aliases => :GatewayAddress
        attribute :rnat_address, :aliases => :RnatAddress

        def rnats
          @rnats ||= Fog::Compute::Ecloud::Rnats.new(:connection => connection, :href => "cloudapi/ecloud/rnats/networks/#{id}")
        end

        def ips
          @ips ||= Fog::Compute::Ecloud::IpAddresses.new(:connection => connection, :href => href)
        end

        def edit_rnat_association(options)
          options[:uri] = href
          data = connection.rnat_associations_edit_network(options).body
          task = Fog::Compute::Ecloud::Tasks.new(:connection => connection, :href => data[:href])[0]
        end
        
        def id
          href.scan(/\d+/)[0]
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 8 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/ecloud/models/compute/network.rb
fog-nirvanix-1.8.1 lib/fog/ecloud/models/compute/network.rb
fog-parser-fix-1.6.1 lib/fog/ecloud/models/compute/network.rb
fog-test-again-1.6.0 lib/fog/ecloud/models/compute/network.rb
fog-parser-fix-1.6.0 lib/fog/ecloud/models/compute/network.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/ecloud/models/compute/network.rb
fog-sgonyea-1.8.1 lib/fog/ecloud/models/compute/network.rb
fog-1.8.0 lib/fog/ecloud/models/compute/network.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/ecloud/models/compute/network.rb
fog-1.7.0 lib/fog/ecloud/models/compute/network.rb
fog-1.6.0 lib/fog/ecloud/models/compute/network.rb
fog-1.5.0 lib/fog/ecloud/models/compute/network.rb
rackspace-fog-1.4.2 lib/rackspace-fog/ecloud/models/compute/network.rb
fog-1.4.0 lib/fog/ecloud/models/compute/network.rb