libcsm.bss.api module

Module contents

Submodule for interacting with CSM BSS.

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

Bases: object

Class for providing API to interact with BSS.

get_bss_bootparams(xname)

Get bootparameters from BSS for a specifed xname.

Parameters:

xname (str) – The XNAME to fetch boot parameters for.

Return type:

str

patch_bss_bootparams(xname, bss_json)

Patch the bootparameters in BSS for a specified xname.

Parameters:
  • xname (str) – The XNAME to patch in BSS.

  • bss_json (dict) – The JSON to patch with.

Return type:

None

set_bss_image(xname, image_dict)

Set the images in BSS for a specific xname.

The inputs are the node’s xname and a dictionary containing initrd, kernel, and roofs image paths that will be set in BSS.

Parameters:
  • xname (str) – The XNAME to set images for in BSS.

  • image_dict (dict) – The image properties to set.

Return type:

None