timesys.core.llapi module

class timesys.core.llapi.LLAPI(key_file_path=None, dashboard_config_path=None, url='https://linuxlink.timesys.com', verify_cert=True, dry_run=False, log_level='WARNING')

Bases: object

Interface for configuration and LinuxLink communication

The "timesys" package holds an instance of this class which is shared by all subpackages and modules. It is instantiated automatically but is not ready for use until it is configured with a LinuxLink API Key, user email, and base URL at a minimum. The email and key are usually specified by a path to a downloaded Keyfile.

Typical use would not be creating your own instance of this class, but instead calling the "configure" method on the existing, shared timesys.llapi object. The "configure" method takes the same parameters as the class "__init__".

  • key_file_path (str, optional) -- Path to LinuxLink API Keyfile which contains the user's email and key. These values are required for authentication and must be configured before use.

  • dashboard_config_path (str, optional) -- Path to Dashboard Config file which may contain a Product or Folder token. Once configured, operations which can be limited to certain Products or Folders will use these values.

  • url (str, optional) -- The base URL for API communication. Default is https://linuxlink.timesys.com

  • verify_cert (bool or str) -- If False, insecure requests are enabled. Certificates will not be verified. May be set to a string containing the path to a CA_BUNDLE. Default is True.

  • dry_run (bool) -- If True, no requests will be sent to the server. Instead, details about the request are returned, including the parameters, headers, and intermediate message used to generate the HMAC authentication signature. This is intended to be useful as a reference when implementing a custom interface as well as for debugging requests. Default is False.

  • log_level (str or int) -- Specify the package's default log level. Default is "WARNING"

DELETE(resource, data_dict=None, json=True)
GET(resource, data_dict=None, json=True)
PATCH(resource, data_dict=None, json=True)
POST(resource, data_dict=None, json=True)
PUT(resource, data_dict=None, json=True)
configure(key_file_path=None, dashboard_config_path=None, url=None, verify_cert=None, dry_run=None, log_level=None)
property current_config
property dry_run
property log_level
logger = <Logger timesys.core.llapi.LLAPI (WARNING)>
static parse_dashboard_config(dashboard_config_path)
static parse_keyfile(key_file_path)
property verify_cert
property version