genvid.toolbox.LogsAPI¶
-
class
genvid.toolbox.
LogsAPI
(parent_api: genvid.toolbox.httpapi.BaseHttpApiTool, **kwargs)¶ Bases:
genvid.toolbox.httpapi.BaseHttpApiTool
The logs api. See Bastion API and Cluster API
New in version 1.12.0.
-
NAME
= 'logs-api'¶
-
create_log
(log_id: str, log: dict, timeout=0.0)¶ Create a log.
Parameters: - log_id – The log ID.
- log – The log.
- timeout – The timeout in seconds.
-
delete_log
(log_id: str, timeout=0.0)¶ Delete the specified log.
Parameters: - log_id – The log ID.
- timeout – The timeout in seconds.
-
delete_logs
(timeout=0.0)¶ Delete the list of logs.
Parameters: timeout – The timeout in seconds.
-
get_base_url
(timeout=0.0) → str¶ Get the base URL.
-
get_log_meta
(name: str, timeout=0.0) → dict¶ Return the meta data associated with the project log.
Parameters: - name – The log name.
- timeout – The timeout in seconds.
-
get_log_stream
(meta: dict, origin: str, offset: int, timeout=0.0)¶ Return the log stream for the log specified in the meta.
Parameters: - meta – The log meta information.
- origin – The origin of the log. Either ‘start’ or ‘end’.
- offset – The offset to the origin.
- timeout – The timeout in seconds.
-
get_logs
(timeout=0.0) → typing.List[dict]¶ Get the list of logs.
Returns: The list of logs.
-
print_log
(name, output=None, tail=False, follow=False, lines=10, timeout=0.0)¶ Print project logs on output.
Parameters: - name – The name of the log.
- output – If None, defaults to stdout.
- tail – If True, prints the end of the log.
- follow – If True, continues to show the log as it runs.
- lines – An approximate number of lines to show.
- timeout – The timeout in seconds.
-
set_logs
(logs: list, timeout=0.0)¶ Return the list of logs.
Parameters: - logs – Configure the list of logs.
- timeout – The timeout in seconds.
-
update_log
(log_id: str, log: dict, timeout=0.0)¶ Update a log
Parameters: - log_id – The log ID.
- log – The log.
- timeout – The timeout in seconds.
-
-
class
bastion_api.
LogsAPI
¶ Implementation of
genvid.toolbox.LogsAPI