Instance

Description

This resource is used for managing instance resources in Tower. Note since instances 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
uuid String The uuid field. False False True False
hostname String The hostname field. False False True False
version String The version 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.Resource[source]

A resource for instances.

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 pk is provided (not None).
  • **kwargs – Keyword arguments used to look up resource object to retrieve if pk is not provided.
Returns:

loaded JSON of the retrieved resource object.

Return type:

dict

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