From: beierlm Date: Wed, 9 Dec 2020 16:44:59 +0000 (-0500) Subject: Use Port from Environment X-Git-Tag: release-v9.0-start~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=refs%2Fchanges%2F89%2F10089%2F1;p=osm%2Ftests.git Use Port from Environment Updates the SDNC test to use the common helper library to determine the Prometheus hostname and port number. Change-Id: I6df6e13bf1a2bf10b4c283b3bfb30360bf862b87 Signed-off-by: beierlm --- diff --git a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py b/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py index d195cde..827baf6 100644 --- a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py +++ b/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py @@ -11,23 +11,23 @@ # limitations under the License. import os -import yaml from pathlib import Path +import yaml + +from common_helpers import get_prometheus_info + + # Prometheus host and port -if os.environ.get("PROMETHEUS_HOSTNAME", False): - prometheus_host = os.environ.get("PROMETHEUS_HOSTNAME") - prometheus_port = "9090" -else: - prometheus_host = os.environ.get("OSM_HOSTNAME") - prometheus_port = "9091" +(prometheus_host, prometheus_port) = get_prometheus_info() + # SDNC Configuration sdnc_name = "epa_03_crud_operations_on_sdnc_test" sdnc_user = os.environ.get("SDNC_USER") if not sdnc_user: raise Exception("'SDNC_USER' environment variable not found") -sdnc_password = os.environ.get("SDNC_PASSWORD") +sdnc_password = os.environ.get("SDNC_PASSWORD") if not sdnc_password: raise Exception("'SDNC_PASSWORD' environment variable not found") sdnc_url = os.environ.get("SDNC_URL")