Skip to content

Node Operations

class Daemon

Obtain the subclass for node operations

py
api = mcsm.daemon()

method config()

Get configuration information for all nodes

Returns

  • list[DaemonStatus]: List of node configuration information

method info()

Get information for all nodes

Returns

  • list[DaemonInfo]: List of node information

method system()

Get system information for all nodes

Returns

  • list[DaemonSystemInfo]: List of node system information

method add(config: dict[str, Any])

Add a new node

Parameters

  • config: Node configuration provided as a dictionary, missing fields will be supplemented by the DaemonConfig model

Returns

  • str: UUID of the newly added node

method delete(daemonId: str)

Delete a node

Parameters

  • daemonId: UUID of the node

Returns

  • bool: Returns True after successful operation

Connect to a node

Parameters

  • daemonId: UUID of the node

Returns

  • bool: Returns True after successful operation

method update(daemonId: str, config: dict[str, Any])

Update the configuration of a node

Parameters

  • daemonId: UUID of the node
  • config: Node configuration provided as a dictionary, missing fields will be supplemented by the DaemonUpdateConfig model

Returns

  • bool: Returns True after successful operation

Released under the MIT License.