Sha256: d544df02a48f62d75f3d4ba799fcb5c308a45c55ae310b8c608a86dfc8c88eb0

Contents?: true

Size: 591 Bytes

Versions: 15

Compression:

Stored size: 591 Bytes

Contents

require 'fog/core/model'

module Fog
  module Terremark
    module Shared

      class Vdc < Fog::Model

        identity :id

        attribute :name

        def networks
          connection.networks(:vdc_id => @id)
        end

        def addresses
          connection.addresses(:vdc_id => @id)
        end

        def servers
          connection.servers(:vdc_id => @id)
        end

        private

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

        def type=(new_type); end

        def rel=(new_rel); 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/vdc.rb
fog-0.3.21 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.20 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.19 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.18 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.17 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.16 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.15 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.14 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.13 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.12 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.11 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.10 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.9 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.8 lib/fog/terremark/models/shared/vdc.rb