Sha256: 07f91a99c62eaa18e31df2b1a82549a5d06e3f9ab3470624a1ba44441865b1d3

Contents?: true

Size: 636 Bytes

Versions: 82

Compression:

Stored size: 636 Bytes

Contents

require 'fog/core/collection'
require 'fog/openstack/models/compute/tenant'

module Fog
  module Compute
    class OpenStack
      class Tenants < Fog::Collection
        model Fog::Compute::OpenStack::Tenant

        def all
          load(service.list_tenants.body['tenants'])
        end

        def usages(start_date = nil, end_date = nil, details = false)
          service.list_usages(start_date, end_date, details).body['tenant_usages']
        end

        def find_by_id(id)
          self.find {|tenant| tenant.id == id}
        end
      end # class Tenants
    end # class OpenStack
  end # module Compute
end # module Fog

Version data entries

82 entries across 82 versions & 9 rubygems

Version Path
vagrant-cloudstack-1.1.0 vendor/bundle/gems/fog-1.22.1/lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.11 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.10 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.9 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.8 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.7 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.6 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.4 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.3 lib/fog/openstack/models/compute/tenants.rb
ns-fog-1.22.2 lib/fog/openstack/models/compute/tenants.rb
fog-1.22.1 lib/fog/openstack/models/compute/tenants.rb
fog-1.22.0 lib/fog/openstack/models/compute/tenants.rb
fog-1.21.0 lib/fog/openstack/models/compute/tenants.rb
fog-maestrodev-1.20.0.20140305101839 lib/fog/openstack/models/compute/tenants.rb
fog-maestrodev-1.20.0.20140305101305 lib/fog/openstack/models/compute/tenants.rb
cifrado-0.2.1 vendor/fog/lib/fog/openstack/models/compute/tenants.rb
cifrado-0.2.0 vendor/fog/lib/fog/openstack/models/compute/tenants.rb
fog-maestrodev-1.19.0.20140212012611 lib/fog/openstack/models/compute/tenants.rb
fog-1.20.0 lib/fog/openstack/models/compute/tenants.rb
fog-maestrodev-1.19.0.20140110004459 lib/fog/openstack/models/compute/tenants.rb