Sha256: a67aab37b33d7dc7bb59614a4a8770113ee88f9b6f5f997ed558425c18ad2350

Contents?: true

Size: 599 Bytes

Versions: 15

Compression:

Stored size: 599 Bytes

Contents

require 'fog/core/model'

module Fog
  module Terremark
    module Shared

      class Network < Fog::Model

        identity :id

        attribute :name
        attribute :subnet
        attribute :gateway
        attribute :netmask
        attribute :fencemode
        attribute :links

        def ips
          #Until there is a real model for these ?
          connection.get_network_ips(@id).body['IpAddresses']
        end

        private

        def href=(new_href)
          @id = new_href.split('/').last.to_i
        end

        def type=(new_type); end

      end

    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
fog-0.3.22 lib/fog/terremark/models/shared/network.rb
fog-0.3.21 lib/fog/terremark/models/shared/network.rb
fog-0.3.20 lib/fog/terremark/models/shared/network.rb
fog-0.3.19 lib/fog/terremark/models/shared/network.rb
fog-0.3.18 lib/fog/terremark/models/shared/network.rb
fog-0.3.17 lib/fog/terremark/models/shared/network.rb
fog-0.3.16 lib/fog/terremark/models/shared/network.rb
fog-0.3.15 lib/fog/terremark/models/shared/network.rb
fog-0.3.14 lib/fog/terremark/models/shared/network.rb
fog-0.3.13 lib/fog/terremark/models/shared/network.rb
fog-0.3.12 lib/fog/terremark/models/shared/network.rb
fog-0.3.11 lib/fog/terremark/models/shared/network.rb
fog-0.3.10 lib/fog/terremark/models/shared/network.rb
fog-0.3.9 lib/fog/terremark/models/shared/network.rb
fog-0.3.8 lib/fog/terremark/models/shared/network.rb