Sha256: b01d91e1a58835a76b956255e5b9f3b4a7634176aafb3f32570abdd632d92432

Contents?: true

Size: 586 Bytes

Versions: 51

Compression:

Stored size: 586 Bytes

Contents

require 'fog/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

51 entries across 51 versions & 2 rubygems

Version Path
fog-0.3.7 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.6 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.5 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.4 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.3 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.2 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.1 lib/fog/terremark/models/shared/vdc.rb
fog-0.3.0 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.30 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.28 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.27 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.26 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.25 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.24 lib/fog/terremark/models/shared/vdc.rb
tecnh-fog-0.2.23.vpc lib/fog/terremark/models/shared/vdc.rb
fog-0.2.23 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.22 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.21 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.20 lib/fog/terremark/models/shared/vdc.rb
fog-0.2.19 lib/fog/terremark/models/shared/vdc.rb