UsageΒΆ

Usage interface.

class novaclient.v2.usage.Usage(manager, info, loaded=False, resp=None)

Bases: novaclient.base.Resource

Usage contains information about a tenant’s physical resource usage

Populate and bind to a manager.

Parameters:
  • manager – BaseManager object
  • info – dictionary representing resource attributes
  • loaded – prevent lazy-loading if set to True
  • resp – Response or list of Response objects
get()
class novaclient.v2.usage.UsageManager(api)

Bases: novaclient.base.ManagerWithFind

Manage Usage resources.

get(obj, *args, **kwargs)

Get usage for a specific tenant.

Parameters:
  • tenant_id – Tenant ID to fetch usage for
  • startdatetime.datetime Start date in UTC
  • enddatetime.datetime End date in UTC
  • marker – Begin returning usage data for instances that appear later in the instance list than that represented by this instance UUID (optional).
  • limit – Maximum number of instances to include in the usage (optional).
Return type:

Usage

list(obj, *args, **kwargs)

Get usage for all tenants

Parameters:
  • startdatetime.datetime Start date in UTC
  • enddatetime.datetime End date in UTC
  • detailed – Whether to include information about each instance whose usage is part of the report
  • marker – Begin returning usage data for instances that appear later in the instance list than that represented by this instance UUID (optional).
  • limit – Maximum number of instances to include in the usage (optional).
Return type:

list of Usage.

resource_class

alias of Usage

usage_prefix = 'os-simple-tenant-usage'