testshift.node.node

Module Contents

class testshift.node.node.Node(node_name, kubeconfig=None)

Bases: object

Node represents a cluster node.

Parameters
  • node_name (str) – The node name as registered on the cluster.

  • kubeconfig (str) – Path to the kubeconfig file. Default: None.

Examples

>>> node = Node("hostname00.cluster.domain.tld")
>>> node.run(["echo", "hello", "world"])
CommandResult(...)
run(self, command)

Runs the command argument on the Node, through oc debug node.

Parameters

command (str) – Command to be executed.

Raises

RuntimeError – When execution fails.

Returns

Execution results wrapped in CommandResult.