X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Fresources%2Fsa_07-alarms_from_sa-related_vnfs_data.py;h=a7a3456647a43e5ae8d80d960f30bff90fe97c0a;hb=ec442823b5b005772064ee82cc221ab70c088715;hp=f281ccebd4a2dc2171c211949a600967775ea0e5;hpb=cd8cfe92d331fc936b2079915cb31f25d5a054f8;p=osm%2Ftests.git diff --git a/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py b/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py index f281cce..a7a3456 100644 --- a/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py +++ b/robot-systest/resources/sa_07-alarms_from_sa-related_vnfs_data.py @@ -10,47 +10,13 @@ # See the License for the specific language governing permissions and # limitations under the License. -from pathlib import Path -import os +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 polling interval and retries -prometheus_poll_retries = '15 times' -prometheus_poll_timeout = '1 minute' -# Webhook Service NS and VNF descriptor package folder -ws_vnfd_pkg = 'hackfest_basic_vnf' -ws_nsd_pkg = 'hackfest_basic_ns' -# Webhook Service NS and VNF descriptor package id -ws_vnfd_name = 'hackfest_basic-vnf' -ws_nsd_name = 'hackfest_basic-ns' -# Webhook Service NS instance name -ws_ns_name = 'sa_07-webhook_service_test' -# Webhook Service port to receive alarms -ws_port = 5212 -# Get ${HOME} from local machine -home = str(Path.home()) -# Prometheus metric for VNF alarm -metric_name = 'osm_cpu_utilization' -# NS and VNF descriptor package folder -vnfd_pkg = 'cirros_alarm_vnf' -nsd_pkg = 'cirros_alarm_ns' -# VNF descriptor file name -vnfd_file = 'cirros_alarm_vnfd.yaml' -# VNF descriptor package location after env substitution -new_vnfd_pkg = 'new_cirros_alarm_vnf' -# NS and VNF descriptor id -vnfd_name = 'cirros_alarm-vnf' -nsd_name = 'cirros_alarm-ns' -# NS instance name -ns_name = 'sa_07-alarms_from_sa-related_vnfs_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, + prometheus_user, + prometheus_password, +) = get_prometheus_info()