Sha256: 5d3271ecddf35de2ffc2a359e5831ed53a7aeb2dd1301d17c99bd1c1406a6fb9

Contents?: true

Size: 747 Bytes

Versions: 14

Compression:

Stored size: 747 Bytes

Contents

require 'fog/core/model'

module Fog
  module Terremark
    module Shared
      class Vdc < Fog::Model
        identity :id

        attribute :name
        attribute :ResourceEntities
        attribute :AvailableNetworks
        attribute :links
        def networks
          service.networks(:vdc_id => id)
        end

        def addresses
          service.addresses(:vdc_id => id)
        end

        def servers
          service.servers(:vdc_id => id)
        end

        def images
          service.images(: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

14 entries across 14 versions & 4 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/terremark/models/shared/vdc.rb
nsidc-fog-1.24.1 lib/fog/terremark/models/shared/vdc.rb
fog-1.24.0 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.11 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.10 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.9 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.8 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.7 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.6 lib/fog/terremark/models/shared/vdc.rb
fog-1.23.0 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.4 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.3 lib/fog/terremark/models/shared/vdc.rb
ns-fog-1.22.2 lib/fog/terremark/models/shared/vdc.rb
fog-1.22.1 lib/fog/terremark/models/shared/vdc.rb