Check Port Security Is Disabled
${rc} ${disabled_ports}= Run and Return RC and Output osm ns-show ${ns_name} --literal | grep -c '${port_disabled_msg}'
- Run Keyword Unless ${disabled_ports} > 0 Fail msg=Found '${disabled_ports}' matches for '${port_disabled_msg}'
+ Run Keyword If ${disabled_ports} <= 0 Fail msg=Found '${disabled_ports}' matches for '${port_disabled_msg}'
Delete NS Instance
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
+ Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
Perform Manual Vdu Scale In
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
+ Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
Delete NS Instance
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
Set Suite Variable ${initial_vdur_count} ${vdurs}
- Run Keyword Unless ${init_instances} == ${initial_vdur_count} Fail msg=Instantiated VDUs (${initial_vdur_count}) don't match specified number in descriptor (${init_instances})
+ Run Keyword If ${init_instances} != ${initial_vdur_count} Fail msg=Instantiated VDUs (${initial_vdur_count}) don't match specified number in descriptor (${init_instances})
Perform Manual Vdu Scale Out
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + ${delta_instances} Fail msg=VDU instances in the VNF (${vdurs}) don't match after Scale Out (${initial_vdur_count} + ${delta_instances})
+ Run Keyword If ${vdurs} != ${initial_vdur_count} + ${delta_instances} Fail msg=VDU instances in the VNF (${vdurs}) don't match after Scale Out (${initial_vdur_count} + ${delta_instances})
Perform Manual Vdu Scale In
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
+ Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
Delete NS Instance
[Documentation] Check the application names if there are 2 application name in the application list.
${count_duplicated}= Get Length ${application_list}
- Run Keyword Unless ${count_duplicated} == 2 Fail msg=There are not 2 application name in the application list before Scale Out
+ Run Keyword If ${count_duplicated} != 2 Fail msg=There are not 2 application name in the application list before Scale Out
Perform Manual Vdu Scale Out
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
+ Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
Get Application Name After Scale Out
[Documentation] Check the application names if there are 3 application name in the application list.
${count_duplicated}= Get Length ${application_list}
- Run Keyword Unless ${count_duplicated} == 3 Fail msg=There are not 2 application name in the application list after Scale Out
+ Run Keyword If ${count_duplicated} != 3 Fail msg=There are not 2 application name in the application list after Scale Out
Perform Manual Vdu Scale In
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
+ Run Keyword If ${vdurs} != ${initial_vdur_count} Fail msg=There is the same number of VDU records in the VNF after Scale In
Get Application Name After Scale In
[Documentation] Check the application names if there are 2 application name in the application list.
${count_duplicated}= Get Length ${application_list}
- Run Keyword Unless ${count_duplicated} == 2 Fail msg=There are not 2 application name in the application list after Scale In
+ Run Keyword If ${count_duplicated} != 2 Fail msg=There are not 2 application name in the application list after Scale In
Delete NS Instance
Execute Manual VNF Scale ${ns_name} ${vnf_charm_index} ${vnf_charm_scaling_group} SCALE_OUT ${scale_wait_time}
@{vdur_list}= Get Vnf Vdur Names ${vnf_charm_id}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
+ Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
Get Charm VNF Info
Execute Manual VNF Scale ${ns_name} ${vnf_charm_index} ${vnf_charm_scaling_group} SCALE_OUT ${scale_wait_time}
@{vdur_list}= Get Vnf Vdur Names ${vnf_charm_id}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} == ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
+ Run Keyword If ${vdurs} != ${initial_vdur_count} + 1 Fail msg=There is no new VDU records in the VNF after Scale Out
Get Charm VNF Info
Variable Should Exist ${initial_kdu_count} msg=Initial KDU count is not available
${kdu_count}= Get Scale Number %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${application_name} ${model_name}
- Run Keyword Unless ${kdu_count} == ${initial_kdu_count} + 1 Fail msg=There is no new KDU in the model after Scale Out
+ Run Keyword If ${kdu_count} != ${initial_kdu_count} + 1 Fail msg=There is no new KDU in the model after Scale Out
Perform Manual KDU Scale In
[Documentation] Scale in the application of network service k8s instance.
[Documentation] Check whether the scale count is one less.
${kdu_count}= Get Scale Number %{OSM_HOSTNAME} ${username} ${password} ${privatekey} ${application_name} ${model_name}
- Run Keyword Unless ${kdu_count} == ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In
+ Run Keyword If ${kdu_count} != ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In
Delete NS K8s Instance Test
[Tags] cleanup
Variable Should Exist ${initial_kdu_count} msg=Initial KDU count is not available
${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
log ${kdu_count}
- Run Keyword Unless ${kdu_count} == ${initial_kdu_count} + 2 Fail msg=There is no new KDU in the model after Scale Out
+ Run Keyword If ${kdu_count} != ${initial_kdu_count} + 2 Fail msg=There is no new KDU in the model after Scale Out
Perform Manual KDU Scale In
[Documentation] Scale in the application of network service k8s instance.
[Documentation] Check whether the scale count is one less.
${kdu_count}= Get Vnf Kdu Replica Count ${vnf_id} ${kdu_name}
- Run Keyword Unless ${kdu_count} == ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In
+ Run Keyword If ${kdu_count} != ${initial_kdu_count} Fail msg=There is the same number of KDU in the model after Scale In
Delete NS K8s Instance Test
[Tags] cleanup
Variable Should Exist ${metric_1_name} msg=Prometheus first metric name is not available
Variable Should Exist ${metric_2_name} msg=Prometheus second metric name is not available
${metric_1_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_1_name}
- Run Keyword Unless ${metric_1_value} > 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}'
+ Run Keyword If ${metric_1_value} <= 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}'
${metric_2_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_2_name}
- Run Keyword Unless ${metric_2_value} > 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}'
+ Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}'
Delete NS Instance
Variable Should Exist ${prometheus_port} msg=Prometheus port is not available
Variable Should Exist ${metric_name} msg=Prometheus metric name is not available
${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_name}
- Run Keyword Unless ${metric_value} > 0 Fail msg=The metric '${metric_name}' value is '${metric_value}'
- Run Keyword Unless ${metric_value} < ${metric_threshold} Fail msg=The metric '${metric_name}' value is higher than '${metric_threshold}' before scaling
+ Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}'
+ Run Keyword If ${metric_value} >= ${metric_threshold} Fail msg=The metric '${metric_name}' value is higher than '${metric_threshold}' before scaling
Increase VIM-based Metric To Force Auto-scaling
@{vdur_list}= Get Vnf Vdur Names ${vnf_id}
Log List ${vdur_list}
${vdurs}= Get Length ${vdur_list}
- Run Keyword Unless ${vdurs} > 1 Fail msg=There is no new VDU after auto-scaling
+ Run Keyword If ${vdurs} <= 1 Fail msg=There is no new VDU after auto-scaling
Delete NS Instance
Variable Should Exist ${prometheus_port} msg=Prometheus port is not available
Variable Should Exist ${metric_name} msg=Prometheus metric name is not available
${metric_value}= Get Metric ${prometheus_host} ${prometheus_port} ${metric_name}
- Run Keyword Unless ${metric_value} > ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}'
+ Run Keyword If ${metric_value} <= ${metric_threshold} Fail msg=The metric '${metric_name}' value is '${metric_value}' which is lower than '${metric_threshold}'
Variable Should Exist ${prometheus_port} msg=Prometheus port is not available
Variable Should Exist ${metric_name} msg=Prometheus metric name is not available
${metric_value}= Wait Until Keyword Succeeds ${prometheus_poll_retries} ${prometheus_poll_timeout} Get Metric ${prometheus_host} ${prometheus_port} ${metric_name}
- Run Keyword Unless ${metric_value} > 0 Fail msg=The metric '${metric_name}' value is '${metric_value}'
+ Run Keyword If ${metric_value} <= 0 Fail msg=The metric '${metric_name}' value is '${metric_value}'
Check Alarms Were Received
Variable Should Exist ${metric_1_name} msg=Prometheus first metric name is not available
Variable Should Exist ${metric_2_name} msg=Prometheus second metric name is not available
${metric_1_value}= Wait Until Keyword Succeeds 6 times 1 minutes Get Metric ${prometheus_host} ${prometheus_port} ${metric_1_name} ${metric_1_filter}
- Run Keyword Unless ${metric_1_value} > 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}'
+ Run Keyword If ${metric_1_value} <= 0 Fail msg=The metric '${metric_1_name}' value is '${metric_1_value}'
${metric_2_value}= Wait Until Keyword Succeeds 6 times 1 minutes Get Metric ${prometheus_host} ${prometheus_port} ${metric_2_name} ${metric_2_filter}
- Run Keyword Unless ${metric_2_value} > 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}'
+ Run Keyword If ${metric_2_value} <= 0 Fail msg=The metric '${metric_2_name}' value is '${metric_2_value}'
Delete NS Instance