X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=robot-systest%2Ftestsuite%2Fslice_02-shared_network_slicing.robot;h=0595480501eb83d7a126efa707ed710297a7d657;hb=f47542be165ebd69b91945041697181b4df63954;hp=79010ad49263edd069dd2884fc6f5b2ec469ae3c;hpb=1508145b35a553b357abfbfac57e58bc00d6d9e0;p=osm%2Ftests.git diff --git a/robot-systest/testsuite/slice_02-shared_network_slicing.robot b/robot-systest/testsuite/slice_02-shared_network_slicing.robot index 79010ad..0595480 100644 --- a/robot-systest/testsuite/slice_02-shared_network_slicing.robot +++ b/robot-systest/testsuite/slice_02-shared_network_slicing.robot @@ -13,6 +13,8 @@ # limitations under the License. *** Settings *** +Documentation [SLICE-02] Shared Network Slicing. + Library OperatingSystem Library String Library Collections @@ -27,28 +29,50 @@ 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 *** 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) - [Tags] shared_network_slicing SLICING-02 sanity regression - Create VNFD '%{PACKAGES_FOLDER}/${vnfd1_pkg}' Create VNFD '%{PACKAGES_FOLDER}/${vnfd2_pkg}' @@ -56,16 +80,12 @@ Create Slice VNF Descriptors Create Slice NS Descriptors [Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file) - [Tags] shared_network_slicing SLICING-02 sanity regression - Create NSD '%{PACKAGES_FOLDER}/${nsd1_pkg}' Create NSD '%{PACKAGES_FOLDER}/${nsd2_pkg}' Create Slice Templates [Documentation] Onboards the Network Slice Templates: nst, nst2 (in the variables file) - [Tags] shared_network_slicing SLICING-02 sanity regression - Create NST '%{PACKAGES_FOLDER}/${nst}' Create NST '%{PACKAGES_FOLDER}/${nst2}' @@ -73,8 +93,6 @@ 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) - [Tags] shared_network_slicing SLICING-02 sanity regression - ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} Set Suite Variable ${nsi_id} ${id} @@ -83,8 +101,6 @@ 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) - [Tags] shared_network_slicing SLICING-02 sanity regression - ${id}= Create Network Slice ${nst2_name} %{VIM_TARGET} ${slice2_name} ${nst_config} ${publickey} Set Suite Variable ${nsi2_id} ${id} @@ -92,8 +108,6 @@ Network Slice Second Instance First Network Slice Ns Count [Documentation] Counts the NS in both slice instances and shoul be equal to 4 - [Tags] shared_network_slicing SLICING-02 sanity regression - ${slice1_count}= Get Slice Ns Count ${slice_name} ${slice2_count}= Get Slice Ns Count ${slice2_name} ${together}= Evaluate ${slice1_count} + ${slice2_count} @@ -103,8 +117,6 @@ First Network Slice Ns Count Get Middle Vnf Management Ip [Documentation] Obtains the management IP of the shared NS main (only) VNF and sets it as a suite variable (mgmt_vnf_ip) - [Tags] shared_network_slicing SLICING-02 sanity regression - ${middle_ns_id}= Run and Return RC and Output osm ns-list | grep ${middle_ns_name} | awk '{print $4}' 2>&1 ${vnf_ip} Get Vnf Management Ip Address ${middle_ns_id}[1] ${vnf_member_index} Run Keyword If '${vnf_ip}' == '${EMPTY}' Fatal Error Variable \$\{ vnf_ip\} Empty @@ -114,8 +126,6 @@ Get Middle Vnf Management Ip Get First Slice Vnf IPs [Documentation] Obtains the list of IPs addresses in the first slice and sets the list as a suite variable (slice1_vnfs_ips) - [Tags] shared_network_slicing SLICING-02 sanity regression - # Get all the ns_id in the slice except the middle one @{ip_list} Get Slice Vnf Ip Addresses ${slice_name} Should Be True ${ip_list} is not None @@ -125,8 +135,6 @@ Get First Slice Vnf IPs Test Middle Ns Ping [Documentation] Pings the slice middle vnf (mgmt_vnf_ip) - [Tags] shared_network_slicing SLICING-02 sanity regression - Sleep 60s Waiting for the network to be up # Ping to the middle VNF Test Connectivity ${mgmt_vnf_ip} @@ -135,8 +143,6 @@ Test Middle Ns Ping Test Middle Vnf SSH Access [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file - [Tags] shared_network_slicing SLICING-02 sanity regression - Sleep 30s Waiting ssh daemon to be up Test SSH Connection ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @@ -145,15 +151,13 @@ Test First Slice Connectivity [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file ... and pings all the IP addresses in the list (slice1_vnfs_ips) - [Tags] shared_network_slicing SLICING-02 sanity regression - Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice1_vnfs_ips} Delete Slice One Instance [Documentation] Stops the slice instance (slice_name) - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete NSI ${slice_name} @@ -161,8 +165,6 @@ Delete Slice One Instance Second Network Slice Ns Count [Documentation] Counts the NS in both slice instances and should be equal to 2 - [Tags] shared_network_slicing SLICING-02 sanity regression - ${slice1_count}= Get Slice Ns Count ${slice_name} ${slice2_count}= Get Slice Ns Count ${slice2_name} ${together}= Evaluate ${slice1_count} + ${slice2_count} @@ -171,8 +173,6 @@ Second Network Slice Ns Count Get Second Slice Vnf IPs [Documentation] Obtains the list of IPs addresses in the second slice and sets the list as a suite variable (slice2_vnfs_ips) - [Tags] shared_network_slicing SLICING-02 sanity regression - # Get all the ns_id in the slice @{ip_list} Get Slice Vnf Ip Addresses ${slice2_name} Should Be True ${ip_list} is not None @@ -183,15 +183,13 @@ Test Second Slice Connectivity [Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file ... and pings all the IP addresses in the list (slice2_vnfs_ips) - [Tags] shared_network_slicing SLICING-02 sanity regression - Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice2_vnfs_ips} Delete Slice Two Instance [Documentation] Stops the slice instance (slice2_name) - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete NSI ${slice2_name} @@ -199,7 +197,7 @@ Delete Slice Two Instance Delete Slice One Template [Documentation] Deletes the NST (nst_name) from OSM - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete NST ${nst_name} @@ -207,7 +205,7 @@ Delete Slice One Template Delete Slice Two Template [Documentation] Deletes the NST (nst2_name) from OSM - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete NST ${nst2_name} @@ -215,7 +213,7 @@ Delete Slice Two Template Delete NS Descriptors [Documentation] Deletes all the NSDs created for the test: nsd1_name, nsd2_name - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete NSD ${nsd1_name} Delete NSD ${nsd2_name} @@ -224,7 +222,7 @@ Delete NS Descriptors Delete VNF Descriptors [Documentation] Deletes all the VNFDs created for the test: vnfd1_name, vnfd2_name - [Tags] shared_network_slicing SLICING-02 sanity regression cleanup + [Tags] cleanup Delete VNFD ${vnfd1_name} Delete VNFD ${vnfd2_name}