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-1.5.0 lib/fog/terremark/models/shared/vdc.rb
fog-1.4.0 lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.18.1 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
michiels-fog-1.3.1 lib/fog/terremark/models/shared/vdc.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.18.0 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
fog-1.3.1 lib/fog/terremark/models/shared/vdc.rb
fog-1.3.0 lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.5 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
fog-1.2.0 lib/fog/terremark/models/shared/vdc.rb
ktheory-fog-1.1.2 lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.4 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.3 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.2 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.1 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.17.0 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb
fog-1.1.2 lib/fog/terremark/models/shared/vdc.rb
fog_tractical-1.1.4 lib/fog/terremark/models/shared/vdc.rb
fog_tractical-1.1.3 lib/fog/terremark/models/shared/vdc.rb
brightbox-cli-0.16.0 lib/brightbox-cli/vendor/fog/lib/fog/terremark/models/shared/vdc.rb