# novaclient.v2.usage module

Usage interface.

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

  Bases: `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()

    Support for lazy loading details.

    Some clients, such as novaclient have the option to lazy load the details, details which can be loaded with this function.

class novaclient.v2.usage.UsageManager(api)

  Bases: `ManagerWithFind`

  Manage `Usage` resources.

  get(tenant_id, start, end, marker=None, limit=None)

    Get usage for a specific tenant.

    Parameters:

      - tenant_id – Tenant ID to fetch usage for

      - start – `datetime.datetime` Start date in UTC

      - end – `datetime.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). Note the API server has a configurable default limit. If no limit is specified here or limit is larger than default, the default limit will be used.

    Return type:

      `Usage`

  list(start, end, detailed=False, marker=None, limit=None)

    Get usage for all tenants

    Parameters:

      - start – `datetime.datetime` Start date in UTC

      - end – `datetime.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). Note the API server has a configurable default limit. If no limit is specified here or limit is larger than default, the default limit will be used.

    Return type:

      list of `Usage`.

  resource_class

    alias of `Usage`

  usage_prefix = 'os-simple-tenant-usage'

this page last updated: 2026-07-15 14:18:20

Except where otherwise noted, this document is licensed under Creative Commons Attribution 3.0 License. See all OpenStack Legal Documents.

found an error? report a bug