Files
test/keywords/k8s/node/object/kubectl_nodes_object.py
Elson Oliveira c9a80c23b0 Refactoring
Add new keywords to support the software
deploy precheck testing.
Precheck timeout created

Jira: CGTS-74904

Tested On:
WRCP-SAPPHIRE-RAPIDS-8
YOW-WRCP-STD-017

Automation Logs:
/sharedsan/AUTOMATION_LOGS/WRCP/precheck/WRCP-SAPPHIRE-RAPIDS-8/202511261708/full_logs.txt
/sharedsan/AUTOMATION_LOGS/WRCP/precheck/YOW-WRCP-STD-017/202511261704/full_logs.txt

Change-Id: Ib2b54e5feda122617830fbaad2c083923a5825e5
Signed-off-by: Elson Oliveira <eclaudio@windriver.com>
2025-12-03 12:38:36 -03:00

103 lines
2.0 KiB
Python

class KubectlNodesObject:
"""
Class to hold attributes of a 'kubectl get nodes' entry.
"""
def __init__(self):
"""
Constructor
"""
self.name: str = None
self.status: str = None
self.roles: str = None
self.age: str = None
self.version: str = None
def set_name(self, name: str):
"""
Setter for the name
Args:
name(str): Name of the Node
"""
self.name = name
def get_name(self) -> str:
"""
Getter for the name of the node.
Returns: (str) name of the node.
"""
return self.name
def set_status(self, status: str):
"""
Setter for the status
Args:
status (str): Status of the Node
"""
self.status = status
def get_status(self) -> str:
"""
Getter for the status of the node.
Returns: (str) status of the node.
"""
return self.status
def set_roles(self, roles: str):
"""
Setter for the roles
Args:
roles(str): Roles of the Node
"""
self.roles = roles
def get_roles(self) -> str:
"""
Getter for the roles of the node.
Returns: (str) roles of the node.
"""
return self.roles
def set_age(self, age: str):
"""
Setter for the age of the node
Args:
age(str): Age of the Node
"""
self.age = age
def get_age(self) -> str:
"""
Getter for the age of the node.
Returns: (str) Age of the node.
"""
return self.age
def set_version(self, version: str):
"""
Setter for the version of the node
Args:
version(str): Version of the Node
"""
self.version = version
def get_version(self) -> str:
"""
Getter for the version of the node.
Returns:
str: Version of the node.
"""
return self.version