# Prometheus polling interval and retries
prometheus_poll_retries = '15 times'
prometheus_poll_timeout = '1 minute'
-# Prometheus metric and threshold
+# Prometheus metric
metric_name = 'osm_cpu_utilization'
-metric_threshold = 40
# Get ${HOME} from local machine
home = str(Path.home())
# NS and VNF descriptor package folder
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'
+ns_name = 'sa_02'
# SSH keys to be used
publickey = home + '/.ssh/id_rsa.pub'
privatekey = home + '/.ssh/id_rsa'
${vnf_ip_addr} ${EMPTY}
${vnf_id} ${EMPTY}
${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
+${success_return_code} 0
*** Test Cases ***
Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}'
+Get Scale-Out Threshold From VNF
+ [Tags] vnf_vim_metrics_autoscaling sanity regression
+
+ ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-show ${vnfd_name} --literal | yq '.df[0]."scaling-aspect"[0]."scaling-policy"[0]."scaling-criteria"[0]."scale-out-threshold"' | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ ${scaleout_threshold}= Convert To Number ${stdout}
+ Set Suite Variable ${metric_threshold} ${scaleout_threshold}
+ log ${metric_threshold}
+
+
Create NS Descriptor
[Tags] vnf_vim_metrics_autoscaling sanity regression