Tower Configuration¶
Description¶
This resource is used for managing tower configurations in Tower.
Fields Table¶
name | type | help_text | read_only | unique | filterable | required |
---|---|---|---|---|---|---|
value | variables | The value field. | False | False | True | True |
API Specification¶
-
class
tower_cli.resources.setting.
Resource
[source]¶ A resource for Tower configurations.
-
copy
(pk=None, new_name=None, **kwargs)[source]¶ Copy an object.
Parameters: - pk (int) – Primary key of the resource object to be copied
- new_name – The new name to give the resource if deep copying via the API
- **kwargs – Keyword arguments of fields whose given value will override the original value.
Returns: loaded JSON of the copied new resource object.
Return type:
-
get
(pk)[source]¶ Return one and exactly one Tower setting.
Parameters: pk (int) – Primary key of the Tower setting to retrieve Returns: loaded JSON of the retrieved Tower setting object. Return type: dict Raises: tower_cli.exceptions.NotFound – When no specified Tower setting exists.
-
list
(**kwargs)[source]¶ Retrieve a list of Tower settings.
Parameters: - category (str) – The category slug in which to look up indevidual settings.
- **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:
-
modify
(setting, value)[source]¶ Modify an already existing Tower setting.
Parameters: Returns: A dictionary combining the JSON output of the modified resource, as well as two extra fields: “changed”, a flag indicating if the resource is successfully updated; “id”, an integer which is the primary key of the updated object.
Return type:
-