Sha256: a8248c5e1a5b9a184e800541f87158d99c7bb12a634798f172423075bf44ef0a

Contents?: true

Size: 592 Bytes

Versions: 64

Compression:

Stored size: 592 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)
          self.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

64 entries across 64 versions & 10 rubygems

Version Path
fog-0.6.0 lib/fog/terremark/models/shared/vdc.rb
fog-0.5.3 lib/fog/terremark/models/shared/vdc.rb
fog-0.5.2 lib/fog/terremark/models/shared/vdc.rb
fog-0.5.1 lib/fog/terremark/models/shared/vdc.rb
fog-0.5.0 lib/fog/terremark/models/shared/vdc.rb
phpfog-fog-0.4.1.3 lib/fog/terremark/models/shared/vdc.rb
phpfog-fog-0.4.1.2 lib/fog/terremark/models/shared/vdc.rb
phpfog-fog-0.4.1.1 lib/fog/terremark/models/shared/vdc.rb
phpfog-fog-0.4.1 lib/fog/terremark/models/shared/vdc.rb
fog-0.4.1 lib/fog/terremark/models/shared/vdc.rb
fog-0.4.0 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.34 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.33 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.32 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.31 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.30 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.29 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.28 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.27 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.26 lib/fog/terremark/models/shared/vdc.rb