X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Fresources%2Fsa_02-vnf_with_vim_metrics_and_autoscaling_data.py;h=6d63b55fe15dc9c32f6319034f5fd5f93ecce202;hb=fccb028b493afafb8a602953ed5125303423d3ff;hp=ef1ee29df92652610dd0eb62dda3b1153f61b27c;hpb=cd8cfe92d331fc936b2079915cb31f25d5a054f8;p=osm%2Ftests.git diff --git a/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py b/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py index ef1ee29..6d63b55 100644 --- a/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py +++ b/robot-systest/resources/sa_02-vnf_with_vim_metrics_and_autoscaling_data.py @@ -11,33 +11,9 @@ # limitations under the License. from pathlib import Path -import os -# 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' +from common_helpers import get_prometheus_info -# Prometheus polling interval and retries -prometheus_poll_retries = '15 times' -prometheus_poll_timeout = '1 minute' -# Prometheus metric and threshold -metric_name = 'osm_cpu_utilization' -metric_threshold = 60 -# Get ${HOME} from local machine -home = str(Path.home()) -# NS and VNF descriptor package folder -vnfd_pkg = 'hackfest_basic_metrics_vnf' -nsd_pkg = 'hackfest_basic_metrics_ns' -# NS and VNF descriptor id -vnfd_name = 'hackfest_basic_metrics-vnf' -nsd_name = 'hackfest_basic-ns-metrics' -# NS instance name -ns_name = 'sa_02-vnf_with_vim_metrics_and_autoscaling_test' -# SSH keys to be used -publickey = home + '/.ssh/id_rsa.pub' -privatekey = home + '/.ssh/id_rsa' +# Prometheus host and port +(prometheus_host, prometheus_port) = get_prometheus_info()