Feature 10908: Update charm in running VNF instance
Adding robot test Basic 25
This test instantiates NS, updates the VNFD, update the VNF instance
by upgrading charm. Then it executes the new added action on this VNF.
Change-Id: I68140f01fadf791a512870ff0f6b0babfcb67e0c
Signed-off-by: aticig <gulsum.atici@canonical.com>
diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot
index 623d43e..a7c6cb9 100644
--- a/robot-systest/lib/ns_lib.robot
+++ b/robot-systest/lib/ns_lib.robot
@@ -54,6 +54,15 @@
[Return] ${stdout}
+Update Network Service
+ [Arguments] ${ns_id} ${update_type} ${ns_update_config} ${ns_update_timeout}
+
+ ${rc} ${stdout}= Run and Return RC and Output osm ns-update ${ns_id} --updatetype ${update_type} --config ${ns_update_config} --timeout ${ns_update_timeout} --wait
+ log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ [Return] ${stdout}
+
+
Get Vnf Management Ip Address
[Arguments] ${ns_id} ${vnf_member_index}
diff --git a/robot-systest/lib/ssh_lib.robot b/robot-systest/lib/ssh_lib.robot
index 23e5ae4..216cd59 100644
--- a/robot-systest/lib/ssh_lib.robot
+++ b/robot-systest/lib/ssh_lib.robot
@@ -30,6 +30,16 @@
Close All Connections
Should Be Equal As Integers ${rc} 0
+Check If Remote Folder Exists
+ [Arguments] ${host} ${username} ${password} ${privatekey} ${folder}
+
+ Open Connection ${host}
+ Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password}
+ ... ELSE Login With Public Key ${username} ${privatekey}
+ ${output}= Execute Command ls -d ${folder}
+ Close All Connections
+ Should Be Equal As Strings ${output} ${folder}
+
Get Remote File Content
[Arguments] ${host} ${username} ${password} ${privatekey} ${file}
diff --git a/robot-systest/lib/vnfd_lib.robot b/robot-systest/lib/vnfd_lib.robot
index f1cc95e..2d50170 100644
--- a/robot-systest/lib/vnfd_lib.robot
+++ b/robot-systest/lib/vnfd_lib.robot
@@ -71,6 +71,24 @@
[Return] ${id}
+Update VNFD
+ [Documentation] Onboards ("Updates") a NF Package into OSM.
+ ... - Parameters:
+ ... - vnfd_pkg: Name (and location) of the NF Package
+ ... - vnfd_name: Name of the existing NF Package
+
+ [Arguments] ${vnfd_pkg} ${vnfd_name}
+
+ # Proceedes with the onboarding with the appropriate arguments
+ ${rc} ${stdout}= Run and Return RC and Output osm vnfpkg-update --content ${vnfd_pkg} ${vnfd_name}
+ log ${stdout}
+ Should Be Equal As Integers ${rc} ${success_return_code}
+ ${lines}= Get Line Count ${stdout}
+ ${last}= Evaluate ${lines} - 1
+ ${id}= Get Line ${stdout} ${last}
+ [Return] ${id}
+
+
Create VNFD Overriding Fields
[Documentation] Onboards ("creates") a NF Package into OSM.
... - Parameters: