Remove tabs in robot files in favour of spaces, add chek in stage-test
[osm/tests.git] / robot-systest / testsuite / slice_02-shared_network_slicing.robot
index 7b9408c..b64a5ad 100644 (file)
@@ -29,8 +29,6 @@ Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ns_lib.robot
 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/connectivity_lib.robot
 Resource   %{ROBOT_DEVOPS_FOLDER}/lib/ssh_lib.robot
 
-Variables   %{ROBOT_DEVOPS_FOLDER}/resources/slice_02-shared_network_slicing_data.py
-
 Force Tags   slice_02   cluster_slices   daily   regression
 
 Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
@@ -38,16 +36,40 @@ Suite Teardown   Run Keyword And Ignore Error   Suite Cleanup
 
 *** Variables ***
 
-${ns_id}   ${EMPTY}
+# NS and VNF descriptor package files
+${vnfd1_pkg}   slice_basic_vnf
+${vnfd2_pkg}   slice_basic_middle_vnf
+${nsd1_pkg}   slice_basic_ns
+${nsd2_pkg}   slice_basic_middle_ns
+${nst}   slice_basic_nst/slice_basic_nst.yaml
+${nst2}   slice_basic_nst/slice_basic_2nd_nst.yaml
+
+# Instance names
+${slice_name}   slicebasic
+${slice2_name}   sliceshared
+${middle_ns_name}   slicebasic.slice_basic_nsd_2
+
+# Descriptor names
+${nst_name}   slice_basic_nst
+${nst2_name}   slice_basic_nst2
+${vnfd1_name}   slice_basic_vnf
+${vnfd2_name}   slice_basic_middle_vnf
+${nsd1_name}   slice_basic_ns
+${nsd2_name}   slice_basic_middle_ns
+
+# SSH keys and username to be used
+${publickey}   %{HOME}/.ssh/id_rsa.pub
+${privatekey}   %{HOME}/.ssh/id_rsa
 ${username}   ubuntu
 ${password}   ${EMPTY}
+
+${ns_id}   ${EMPTY}
 ${vnf_member_index}   middle
 ${vnf_ip_addr}   ${EMPTY}
 ${nst_config}   {netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: %{VIM_MGMT_NET}} ] }
 
 
 *** Test Cases ***
-
 Create Slice VNF Descriptors
     [Documentation]   Onboards all the VNFDs required for the test: vnfd1_pkg and vnfd2_pkg (in the variables file)
 
@@ -71,7 +93,7 @@ Network Slice First Instance
     [Documentation]   Instantiates the First NST recently onboarded (nst_name) and sets the instantiation id as a suite variable (nsi_id)
     ...               The slice contains 3 NS (1 shared)
 
-    ${id}=   Create Network Slice      ${nst_name}   %{VIM_TARGET}   ${slice_name}   ${nst_config}   ${publickey}
+    ${id}=   Create Network Slice   ${nst_name}   %{VIM_TARGET}   ${slice_name}   ${nst_config}   ${publickey}
     Set Suite Variable   ${nsi_id}   ${id}
 
 
@@ -79,15 +101,15 @@ Network Slice Second Instance
      [Documentation]   Instantiates the Second NST recently onboarded (nst2_name) and sets the instantiation id as a suite variable (nsi2_id)
     ...               The slice contains 2 NS (1 shared)
 
-    ${id}=   Create Network Slice      ${nst2_name}   %{VIM_TARGET}   ${slice2_name}   ${nst_config}   ${publickey}
+    ${id}=   Create Network Slicea    ${nst2_name}   %{VIM_TARGET}   ${slice2_name}   ${nst_config}   ${publickey}
     Set Suite Variable   ${nsi2_id}   ${id}
 
 
 First Network Slice Ns Count
     [Documentation]   Counts the NS in both slice instances and shoul be equal to 4
 
-    ${slice1_count}=   Get Slice Ns Count      ${slice_name}
-    ${slice2_count}=   Get Slice Ns Count      ${slice2_name}
+    ${slice1_count}=   Get Slice Ns Count   ${slice_name}
+    ${slice2_count}=   Get Slice Ns Count   ${slice2_name}
     ${together}=   Evaluate   ${slice1_count} + ${slice2_count}
     Should Be Equal As Integers   ${together}   4
 
@@ -143,8 +165,8 @@ Delete Slice One Instance
 Second Network Slice Ns Count
     [Documentation]   Counts the NS in both slice instances and should be equal to 2
     
-    ${slice1_count}=   Get Slice Ns Count      ${slice_name}
-    ${slice2_count}=   Get Slice Ns Count      ${slice2_name}
+    ${slice1_count}=   Get Slice Ns Count   ${slice_name}
+    ${slice2_count}=   Get Slice Ns Count   ${slice2_name}
     ${together}=   Evaluate   ${slice1_count} + ${slice2_count}
     Should Be Equal As Integers   ${together}   2