Sha256: 79917647205af243f397d8c42da878e4fe073873603ae36f3824c5761c671db1

Contents?: true

Size: 649 Bytes

Versions: 7

Compression:

Stored size: 649 Bytes

Contents

module Fog
  module Compute
    class Ecloud
      class Location < Fog::Ecloud::Model
        identity :href

        ignore_attributes :xmlns, :xmlns_xsi, :xmlns_xsd, :xmlns_i

        attribute :name, :aliases => :Name
        attribute :type, :aliases => :Type

        def catalog(org_href)
          @catalog ||= Fog::Compute::Ecloud::Catalog.new(:service => service, :href => "#{service.base_path}/admin/catalog/organizations/#{org_href.scan(/\d+/)[0]}/locations/#{id}")
        end

        def id
          href.scan(/\d+/)[0]
        end

        def reload
          @catalog = nil
          super
        end
      end
    end
  end
end

Version data entries

7 entries across 5 versions & 2 rubygems

Version Path
vagrant-packet-0.1.1 vendor/bundle/ruby/2.3.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/location.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.5.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/location.rb
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/fog-ecloud-0.3.0/lib/fog/compute/ecloud/models/location.rb
fog-ecloud-0.3.0 lib/fog/compute/ecloud/models/location.rb
fog-ecloud-0.2.0 lib/fog/compute/ecloud/models/location.rb
fog-ecloud-0.1.3 lib/fog/compute/ecloud/models/location.rb
fog-ecloud-0.1.2 lib/fog/compute/ecloud/models/location.rb