Feature 10296 Pip Standardization
Cleanup of Dockerfile
Moved requirements from devops/docker/tests/Dockerfile into this
module so they are visible.
Added pylint and safety hooks.
Added place for unit tests, but none are written yet, so does not
run them.
Change-Id: I75ce40c558bd9bc8975269dca681ba84678e6de6
Signed-off-by: beierlm <mark.beierl@canonical.com>
diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot
index 065a562..501bee2 100644
--- a/robot-systest/lib/ns_lib.robot
+++ b/robot-systest/lib/ns_lib.robot
@@ -117,6 +117,8 @@
Check For Ns Instance To Configured
[arguments] ${ns_name}
+ ${rc} ${stdout}= Run and Return RC and Output openstack server list
+ log ${stdout}
${rc} ${stdout}= run and return rc and output osm ns-list --filter name="${ns_name}"
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
@@ -125,6 +127,8 @@
Check For NS Instance For Failure
[Arguments] ${ns_name}
+ ${rc} ${stdout}= Run and Return RC and Output openstack server list
+ log ${stdout}
${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}"
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
@@ -133,6 +137,8 @@
Check For NS Instance To Be Deleted
[Arguments] ${ns}
+ ${rc} ${stdout}= Run and Return RC and Output openstack server list
+ log ${stdout}
${rc} ${stdout}= Run and Return RC and Output osm ns-list | awk '{print $2}' | grep ${ns}
Should Not Be Equal As Strings ${stdout} ${ns}
@@ -233,7 +239,7 @@
[Arguments] ${ns_operation_id}
- ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq r - operationState
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-op-show ${ns_operation_id} --literal | yq .operationState | tr -d \\"
log ${stdout}
Should Be Equal As Integers ${rc} ${success_return_code}
Should Contain ${stdout} COMPLETED msg=Timeout waiting for ns-action with id ${ns_operation_id} values=False
@@ -255,8 +261,19 @@
[Arguments] ${vnf_id}
- ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq r - vdur.*.name
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --literal | yq .vdur[].name | tr -d \\"
Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
@{vdur} = Split String ${stdout}
[Return] @{vdur}
+
+Get Vnf Kdu Replica Count
+ [Documentation] Return the number of KDU replicas (empty if none) of a VNF instance.
+
+ [Arguments] ${vnf_id} ${kdu_name}
+
+ ${rc} ${stdout}= Run and Return RC and Output osm vnf-show ${vnf_id} --kdu ${kdu_name} | yq .config.replicaCount | tr -d \\"
+ Should Be Equal As Integers ${rc} ${success_return_code} msg=${stdout} values=False
+ ${return} = Set Variable If '${stdout}' == 'null' ${EMPTY} ${stdout}
+ [Return] ${return}
+
diff --git a/robot-systest/resources/__init__.py b/robot-systest/resources/__init__.py
new file mode 100644
index 0000000..d10c534
--- /dev/null
+++ b/robot-systest/resources/__init__.py
@@ -0,0 +1,17 @@
+#######################################################################################
+# Copyright ETSI Contributors and Others.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#######################################################################################
+