Sha256: 34b3dd357b29b5c3d707c251bb0d69e738135b3fb8203bbed17a25a45daad1bb

Contents?: true

Size: 602 Bytes

Versions: 75

Compression:

Stored size: 602 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)
          self.id = new_href.split('/').last.to_i
        end

        def type=(new_type); end

      end

    end
  end
end

Version data entries

75 entries across 75 versions & 16 rubygems

Version Path
fog-0.11.0 lib/fog/terremark/models/shared/network.rb
fog-0.10.0 lib/fog/terremark/models/shared/network.rb
fog4encbs-0.9.0.1 lib/fog/terremark/models/shared/network.rb
fog4encbs-0.9.0 lib/fog/terremark/models/shared/network.rb
fog-0.9.0 lib/fog/terremark/models/shared/network.rb
fog-0.8.2 lib/fog/terremark/models/shared/network.rb
fog-0.8.1 lib/fog/terremark/models/shared/network.rb
fog-0.8.0 lib/fog/terremark/models/shared/network.rb
fog-0.7.2 lib/fog/terremark/models/shared/network.rb
fog-0.7.1 lib/fog/terremark/models/shared/network.rb
fog-0.7.0 lib/fog/terremark/models/shared/network.rb
fog-0.6.0 lib/fog/terremark/models/shared/network.rb
fog-0.5.3 lib/fog/terremark/models/shared/network.rb
fog-0.5.2 lib/fog/terremark/models/shared/network.rb
fog-0.5.1 lib/fog/terremark/models/shared/network.rb
fog-0.5.0 lib/fog/terremark/models/shared/network.rb
phpfog-fog-0.4.1.3 lib/fog/terremark/models/shared/network.rb
phpfog-fog-0.4.1.2 lib/fog/terremark/models/shared/network.rb
phpfog-fog-0.4.1.1 lib/fog/terremark/models/shared/network.rb
phpfog-fog-0.4.1 lib/fog/terremark/models/shared/network.rb