Auto-generated documentation for ocs_ci.ocs.node module.
def drain_nodes(node_names):
Drain nodes
node_names
list - The names of the nodes
def get_node_objs(node_names=None):
Get node objects by node names
node_names
list - The node names to get their objects for. If None, will return all cluster nodes
list
- Cluster node OCP objects
def get_typed_nodes(node_type='worker', num_of_nodes=None):
Get cluster's nodes according to the node type (e.g. worker, master) and the number of requested nodes from that type
node_type
str - The node type (e.g. worker, master)num_of_nodes
int - The number of nodes to be returned
list
- The nodes OCP instances
def get_typed_worker_nodes(os_id='rhcos'):
Get worker nodes with specific OS
os_id
str - OS type like rhcos, RHEL etc...
list
- list of worker nodes instances having specified os
def remove_nodes(nodes):
Remove the nodes from cluster
nodes
list - list of node instances to remove from cluster
def schedule_nodes(node_names):
Change nodes to be scheduled
node_names
list - The names of the nodes
def unschedule_nodes(node_names):
Change nodes to be unscheduled
node_names
list - The names of the nodes
def wait_for_nodes_status(
node_names=None,
status=constants.NODE_READY,
timeout=180,
):
Wait until all nodes are in the given status
node_names
list - The node names to wait for to reached the desired state If None, will wait for all cluster nodesstatus
str - The node status to wait for (e.g. 'Ready', 'NotReady', 'SchedulingDisabled')timeout
int - The number in seconds to wait for the nodes to reach the status
ResourceWrongStatusException
- In case one or more nodes haven't reached the desired state