testshift.resources.node
¶
Module Contents¶
-
class
testshift.resources.node.
Node
(name=None, label_selector=None)¶ Bases:
testshift.resources.base.Resource
Node class instantiates an OCP node resource.
- Parameters
name (str) – Node’s name as declared on the cluster
label_selector (str) – Label selector as used in oc command
- Raises
RuntimeError – When there is a problem with the arguments.
ResourceNotFoundException – When OCP API returns resource not found.
Examples
>>> node = Node("hostname00.cluster.domain.tld") >>> node.exists True >>> node = Node(label_selector="node-role.kubernetes.io/worker-cnf=") >>> node.count 2
-
property
exists
(self)¶ bool: Whether node(s) were found or not.
-
property
count
(self)¶ int: Amount of nodes found by the search criteria
-
property
schedulable
(self)¶ bool: Whether the node(s) are schedulable.