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
5 # http://www.apache.org/licenses/LICENSE-2.0
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.
13 from pathlib
import Path
15 from common_helpers
import get_prometheus_info
18 # Prometheus host and port
19 (prometheus_host
, prometheus_port
) = get_prometheus_info()
21 # Prometheus polling interval and retries
22 prometheus_poll_retries
= '15 times'
23 prometheus_poll_timeout
= '1 minute'
24 # Webhook Service NS and VNF descriptor package folder
25 ws_vnfd_pkg
= 'hackfest_basic_vnf'
26 ws_nsd_pkg
= 'hackfest_basic_ns'
27 # Webhook Service NS and VNF descriptor package id
28 ws_vnfd_name
= 'hackfest_basic-vnf'
29 ws_nsd_name
= 'hackfest_basic-ns'
30 # Webhook Service NS instance name
31 ws_ns_name
= 'sa_07-webhook_service_test'
32 # Webhook Service port to receive alarms
35 # Get ${HOME} from local machine
36 home
= str(Path
.home())
37 # Prometheus metric for VNF alarm
38 metric_name
= 'osm_cpu_utilization'
39 # NS and VNF descriptor package folder
40 vnfd_pkg
= 'cirros_alarm_vnf'
41 nsd_pkg
= 'cirros_alarm_ns'
42 # VNF descriptor file name
43 vnfd_file
= 'cirros_alarm_vnfd.yaml'
44 # VNF descriptor package location after env substitution
45 new_vnfd_pkg
= 'new_cirros_alarm_vnf'
46 # NS and VNF descriptor id
47 vnfd_name
= 'cirros_alarm-vnf'
48 nsd_name
= 'cirros_alarm-ns'
50 ns_name
= 'sa_07-alarm_test'
52 publickey
= home
+ '/.ssh/id_rsa.pub'
53 privatekey
= home
+ '/.ssh/id_rsa'