Instance Group¶
Description¶
This resource is used for managing instance group resources in Tower. Note since instance groups are read-only
in Tower, only get and list methods are available for this resource.
Fields Table¶
| name | type | help_text | read_only | unique | filterable | required |
|---|---|---|---|---|---|---|
| name | String | The name field. | False | False | True | False |
| capacity | int | The capacity field. | False | False | True | False |
| consumed_capacity | int | The consumed_capacity field. | False | False | True | False |
API Specification¶
-
class
tower_cli.resources.instance_group.Resource[source]¶ A resource for instance groups.
-
get(pk=None, **kwargs)¶ Retrieve one and exactly one object.
Parameters: - pk (int) – Primary key of the resource to be read. Tower CLI will only attempt to read that object
if
pkis provided (notNone). - **kwargs – Keyword arguments used to look up resource object to retrieve if
pkis not provided.
Returns: loaded JSON of the retrieved resource object.
Return type: dict
- pk (int) – Primary key of the resource to be read. Tower CLI will only attempt to read that object
if
-
list(all_pages=False, **kwargs)¶ Retrieve a list of objects.
Parameters: - all_pages (bool) – Flag that if set, collect all pages of content from the API when returning results.
- page (int) – The page to show. Ignored if all_pages is set.
- query (list) – Contains 2-tuples used as query parameters to filter resulting resource objects.
- **kwargs – Keyword arguments list of available fields used for searching resource objects.
Returns: A JSON object containing details of all resource objects returned by Tower backend.
Return type: dict
-