From 21b51a467fd504ad8427a3e423d654399ed4e5b9 Mon Sep 17 00:00:00 2001 From: Utkarsh Bhatt Date: Wed, 12 Jun 2024 18:35:00 +0530 Subject: [PATCH] Fixes endpoint discovery The zaza test used the default endpoint as exposed by the unit to perform object IO, however, SSL is configured for PUBLIC,INTERNAL, and ADMIN bindings. Signed-off-by: Utkarsh Bhatt --- zaza/openstack/charm_tests/ceph/tests.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/zaza/openstack/charm_tests/ceph/tests.py b/zaza/openstack/charm_tests/ceph/tests.py index 9e6f327b1..a45b16e09 100644 --- a/zaza/openstack/charm_tests/ceph/tests.py +++ b/zaza/openstack/charm_tests/ceph/tests.py @@ -840,13 +840,12 @@ def get_rgw_endpoint(self, unit_name: str): :param unit_name: Unit name for which RGW endpoint is required. :type unit_name: str """ - unit = zaza_model.get_unit_from_name(unit_name) - unit_address = zaza_model.get_unit_public_address( - unit, - self.model_name - ) + # Get address "public" network binding. + unit_address = zaza_model.run_on_unit( + unit_name, "network-get public --bind-address" + ).get('Stdout', '').strip() - logging.debug("Unit: {}, Endpoint: {}".format(unit_name, unit_address)) + logging.info("Unit: {}, Endpoint: {}".format(unit_name, unit_address)) if unit_address is None: return None # Evaluate port