Adding a few checks on lab_type in get_ssh_for_hostname

Change-Id: I486eee568ab3edd1f0f1a9042de12f54b99437d2
Signed-off-by: croy <Christian.Roy@windriver.com>
This commit is contained in:
croy
2025-05-07 15:09:43 -04:00
parent 4207ece6f5
commit fd6877b088

View File

@@ -80,7 +80,8 @@ class LabConnectionKeywords(BaseKeyword):
"""
lab_config = ConfigurationManager.get_lab_config()
if "worker" in lab_config.get_node(hostname).get_type():
host_node = lab_config.get_node(hostname)
if host_node and host_node.get_type() and "worker" in host_node.get_type():
return self.get_compute_ssh(hostname)
host_ip = lab_config.get_node(hostname).get_ip()