f281ccebd4a2dc2171c211949a600967775ea0e5
[osm/tests.git] / robot-systest / resources / sa_07-alarms_from_sa-related_vnfs_data.py
1 # Licensed under the Apache License, Version 2.0 (the "License");
2 # you may not use this file except in compliance with the License.
3 # You may obtain a copy of the License at
4 #
5 # http://www.apache.org/licenses/LICENSE-2.0
6 #
7 # Unless required by applicable law or agreed to in writing, software
8 # distributed under the License is distributed on an "AS IS" BASIS,
9 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 # See the License for the specific language governing permissions and
11 # limitations under the License.
12
13 from pathlib import Path
14 import os
15
16 # Prometheus host and port
17 if os.environ.get('PROMETHEUS_HOSTNAME', False):
18 prometheus_host = os.environ.get('PROMETHEUS_HOSTNAME')
19 prometheus_port = '9090'
20 else:
21 prometheus_host = os.environ.get('OSM_HOSTNAME')
22 prometheus_port = '9091'
23
24 # Prometheus polling interval and retries
25 prometheus_poll_retries = '15 times'
26 prometheus_poll_timeout = '1 minute'
27 # Webhook Service NS and VNF descriptor package folder
28 ws_vnfd_pkg = 'hackfest_basic_vnf'
29 ws_nsd_pkg = 'hackfest_basic_ns'
30 # Webhook Service NS and VNF descriptor package id
31 ws_vnfd_name = 'hackfest_basic-vnf'
32 ws_nsd_name = 'hackfest_basic-ns'
33 # Webhook Service NS instance name
34 ws_ns_name = 'sa_07-webhook_service_test'
35 # Webhook Service port to receive alarms
36 ws_port = 5212
37
38 # Get ${HOME} from local machine
39 home = str(Path.home())
40 # Prometheus metric for VNF alarm
41 metric_name = 'osm_cpu_utilization'
42 # NS and VNF descriptor package folder
43 vnfd_pkg = 'cirros_alarm_vnf'
44 nsd_pkg = 'cirros_alarm_ns'
45 # VNF descriptor file name
46 vnfd_file = 'cirros_alarm_vnfd.yaml'
47 # VNF descriptor package location after env substitution
48 new_vnfd_pkg = 'new_cirros_alarm_vnf'
49 # NS and VNF descriptor id
50 vnfd_name = 'cirros_alarm-vnf'
51 nsd_name = 'cirros_alarm-ns'
52 # NS instance name
53 ns_name = 'sa_07-alarms_from_sa-related_vnfs_test'
54 # SSH keys to be used
55 publickey = home + '/.ssh/id_rsa.pub'
56 privatekey = home + '/.ssh/id_rsa'