Sha256: 1b90b81029329067e4ffdabcd8d7f54a6f3c0aae5ad942c1320349b1c0856cd7

Contents?: true

Size: 642 Bytes

Versions: 1

Compression:

Stored size: 642 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(connection.list_tenants.body['tenants'])
        end

        def usages(start_date = nil, end_date = nil, details = false)
          connection.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

1 entries across 1 versions & 1 rubygems

Version Path
fog-sgonyea-1.8.1 lib/fog/openstack/models/compute/tenants.rb