novaclient.v2.usage module
this page last updated: 2019-10-03 07:58:50.178201
novaclient.v2.usage module
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
()
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: novaclient.base.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).
|
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).
|
Return type: | list of Usage .
|
-
resource_class
alias of Usage
-
usage_prefix
= 'os-simple-tenant-usage'
this page last updated: 2019-10-03 07:58:50.178201