Module that has base functions to implement actions of the CLI App
The functions defined here are usually not used directly, but specialized and
simplified via functools.partial()
-
arc.cli.actions.base.list_brief(list_function, app, **filter_data)
Base function for briefly listing records
This is usually not used directly, but simplified via
functools.partial()
Parameters: |
- name – name of the type of record, such as host, job, test, etc
- list_function – the function that will be used to retrieve records
- app – the running application instance
|
-
arc.cli.actions.base.list_full(list_function, app, **filter_data)
Base function for full listing records
This is usually not used directly, but simplified via
functools.partial()
Parameters: |
- name – name of the type of record, such as host, job, test, etc
- list_function – the function that will be used to retrieve records
- app – the running application instance
|
-
arc.cli.actions.base.add_with_name(name, add_function, app)
Base function for adding records that only require a name
This is usually not used directly, but simplified via
functools.partial()
Parameters: |
- name – name of the type of record, such as host, job, test, etc
- list_function – the function that will be used to retrieve records
- app – the running application instance
|
-
arc.cli.actions.base.delete(name, klass, delete_function, app)
Base function for deleting records by name or id
This is usually not used directly, but simplified via
functools.partial()
Parameters: |
- name – name of the type of record, such as host, job, test, etc
- klass – the object class, inherited from arc.base.Model
- delete_function – the function that will be used to delete records
- app – the running application instance
|
-
arc.cli.actions.base.action(function)
Simple function that marks functions as CLI actions
Parameters: | function – the function that will receive the CLI action mark |
-
arc.cli.actions.base.get_identification(app)
Get the identification from the command line opts, either name or id
Parameters: | app – the running application instance |