Fix bug 2331: override VNF and NS package names for lcmop_01 test 45/15545/3
authorgarciadeblas <gerardo.garciadeblas@telefonica.com>
Tue, 25 Nov 2025 16:48:05 +0000 (17:48 +0100)
committergarciadeblas <gerardo.garciadeblas@telefonica.com>
Wed, 26 Nov 2025 15:02:07 +0000 (16:02 +0100)
Change-Id: Ife174de28c15c236589c1fc0eef05e2970cc6a50
Signed-off-by: garciadeblas <gerardo.garciadeblas@telefonica.com>
robot-systest/lib/nsd_lib.resource
robot-systest/testsuite/lcmop_01-cancel_operation_basic.robot

index 0821b1f..4f136fc 100644 (file)
@@ -38,8 +38,13 @@ Get NSDs List
 
 Create NSD
     [Documentation]   Upload a NS package to OSM and return the id.
-    [Arguments]   ${nsd_pkg}
-    ${rc}   ${stdout}=   Run And Return Rc And Output   osm nspkg-create ${nsd_pkg}
+    ...               - Parameters:
+    ...                 - nsd_pkg: Name (and location) of the NF Package
+    ...                 - overrides (optional): String with options to override the NS.
+    ...                   Valid strings are the same as in the command. E.g.:
+    ...                   - `--override "name=newname"`: changes the name of the NS package to `newname`.
+    [Arguments]   ${nsd_pkg}   ${overrides}=${EMPTY}
+    ${rc}   ${stdout}=   Run And Return Rc And Output   osm nspkg-create ${overrides} ${nsd_pkg}
     Log   ${stdout}
     Should Be Equal As Integers   ${rc}   ${SUCCESS_RETURN_CODE}
     ${lines}=   Get Line Count   ${stdout}
index 219c7c9..47bc464 100644 (file)
@@ -36,10 +36,11 @@ Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
 *** Variables ***
 # NS and VNF descriptor package folder and ids
 ${VNFD_PKG}   simple_ee_vnf
-${VNFD_NAME}   simple_ee-vnf
+${VNFD_NAME}   lcmop_01_vnf
+${VNFD_OVERRIDE}   --override "id=lcmop_01_vnf;product-name=lcmop_01_vnf;df.0.lcm-operations-configuration.operate-vnf-op-config.day1-2.0.id=lcmop_01_vnf"
 ${NSD_PKG}   simple_ee_ns
-${NSD_NAME}   simple_ee-ns
-
+${NSD_NAME}   lcmop_01_ns
+${NSD_OVERRIDE}   --override "id=lcmop_01_ns;name=lcmop_01_ns;df.0.vnf-profile.0.vnfd-id=lcmop_01_vnf;vnfd-id.0=lcmop_01_vnf"
 # NS instance name and configuration
 ${NS_NAME}   lcmop_01_cancel_operation_basic
 ${NS_CONFIG}   {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
@@ -48,11 +49,11 @@ ${NS_CONFIG}   {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
 *** Test Cases ***
 Create VNF Descriptor
     [Documentation]   Create the VNF descriptor
-    Create VNFD   '%{PACKAGES_FOLDER}/${VNFD_PKG}'
+    Create VNFD   '%{PACKAGES_FOLDER}/${VNFD_PKG}'   ${VNFD_OVERRIDE}
 
 Create NS Descriptor
     [Documentation]   Create the NS descriptor
-    Create NSD   '%{PACKAGES_FOLDER}/${NSD_PKG}'
+    Create NSD   '%{PACKAGES_FOLDER}/${NSD_PKG}'   ${NSD_OVERRIDE}
 
 Instantiate Network Service
     [Documentation]   Instantiate the Network service