libcsm.sls.api module

Module contents

Submodule for interacting with CSM SLS.

class libcsm.sls.api.API(api_gateway_address='api-gw-service-nmn.local')

Bases: object

Class for providing API to interact with SLS.

get_hostname(xname)

Get the hostname of a management node from SLS based on a provided xname.

Parameters:

xname (str) – The XNAME to lookup.

Return type:

str

Returns:

The hostname.

get_management_components_from_sls()

Retrieve all management components from SLS.

Return type:

Response

get_xname(hostname)

Get the xname of a node from SLS based on a provided hostname.

Parameters:

hostname (str) – The hostname to lookup.

Return type:

str

Returns:

The XNAME.