Skip to content

Commit

Permalink
[ROSA HCP] exclude external dns if unavailable in CLI (#11057)
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Osypenko <[email protected]>
  • Loading branch information
DanielOsypenko authored Dec 22, 2024
1 parent ebc7fe3 commit 4829d0c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ocs_ci/ocs/ui/odf_topology.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,8 @@ def get_node_details_cli(node_name) -> dict:
_address_dict = {item["type"]: item["address"] for item in _addresses}
node_details["addresses"] = (
f"External IP: {_address_dict.get('ExternalIP')}; "
if _address_dict.get("ExternalIP")
else ""
f"Hostname: {_address_dict.get('Hostname')}; "
f"Internal IP: {_address_dict.get('InternalIP')}"
)
Expand Down
7 changes: 6 additions & 1 deletion ocs_ci/ocs/ui/page_objects/odf_topology_tab.py
Original file line number Diff line number Diff line change
Expand Up @@ -1023,7 +1023,12 @@ def read_details(self) -> dict:
for detail_name, loc in filtered_dict.items():
if detail_name == "details_sidebar_node_addresses":
node_addresses = self.get_elements(loc)
addresses_txt = [el.text for el in node_addresses]
# exclude Internal DNS from addresses, it is applicable only for specific platforms
addresses_txt = [
el.text
for el in node_addresses
if not el.text.startswith("Internal DNS")
]
addresses_txt = "; ".join(addresses_txt)
details_dict[
detail_name.split("details_sidebar_node_", 1)[-1].strip()
Expand Down

0 comments on commit 4829d0c

Please sign in to comment.