Utils

This script provides general functionality and constants for the ankaios_sdk.

Enums

  • AnkaiosLogLevel:

    Represents the log levels for the Ankaios class.

Functions

  • get_logger:

    Creates and returns the logger.

ankaios_sdk.utils.SUPPORTED_API_VERSION = 'v0.1'

The supported API version of the Ankaios SDK.

Type:

(str)

ankaios_sdk.utils.ANKAIOS_VERSION = '0.5.0'

The version of the compatible Ankaios.

Type:

(str)

ankaios_sdk.utils.WORKLOADS_PREFIX = 'desiredState.workloads'

The prefix for the workloads in the desired state.

Type:

(str)

ankaios_sdk.utils.CONFIGS_PREFIX = 'desiredState.configs'

The prefix for the configs in the desired state.

Type:

(str)

ankaios_sdk.utils.DEFAULT_CONTROL_INTERFACE_PATH = '/run/ankaios/control_interface'

The base path for the Ankaios control interface.

Type:

(str)

class ankaios_sdk.utils.AnkaiosLogLevel(value)[source]

Bases: Enum

Ankaios log levels.

ERROR = 40

Error log level.

Type:

(int)

WARN = 30

Warning log level.

Type:

(int)

INFO = 20

Info log level.

Type:

(int)

DEBUG = 10

Debug log level.

Type:

(int)

ankaios_sdk.utils.get_logger(name='Ankaios logger')[source]

Returns a configured logger with a custom format.

Parameters:

name (str) – The name of the logger.