From 80a16cff90f91039ff47c7f9b662fdf0470ddadc Mon Sep 17 00:00:00 2001 From: Javier Melian Date: Tue, 19 May 2020 07:39:12 +0000 Subject: [PATCH] SLICING-01 - Basic Network Slicing robot test Change-Id: I3696b4f2ad207c0d6f4fc26f317d241b40f2ee59 Signed-off-by: melian --- robot-systest/lib/ns_lib.robot | 47 +++- robot-systest/lib/nsi_lib.robot | 206 ++++++++++++++++++ robot-systest/lib/nst_lib.robot | 53 +++++ robot-systest/lib/ssh_lib.robot | 17 +- .../resources/basic_network_slicing_data.py | 37 ++++ .../resources/slice_shared_ns_data.py | 39 ++++ .../testsuite/basic_network_slicing.robot | 184 ++++++++++++++++ 7 files changed, 579 insertions(+), 4 deletions(-) create mode 100644 robot-systest/lib/nsi_lib.robot create mode 100644 robot-systest/lib/nst_lib.robot create mode 100644 robot-systest/resources/basic_network_slicing_data.py create mode 100644 robot-systest/resources/slice_shared_ns_data.py create mode 100644 robot-systest/testsuite/basic_network_slicing.robot diff --git a/robot-systest/lib/ns_lib.robot b/robot-systest/lib/ns_lib.robot index 4be7fe44..fb4561e1 100644 --- a/robot-systest/lib/ns_lib.robot +++ b/robot-systest/lib/ns_lib.robot @@ -36,6 +36,7 @@ Create Network Service Check For NS Instance For Failure ${ns_name} [Return] ${ns_id} + Instantiate Network Service [Arguments] ${ns_name} ${nsd} ${vim_name} ${ns_extra_args} @@ -44,6 +45,7 @@ Instantiate Network Service Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} + Get Vnf Management Ip Address [Arguments] ${ns_id} ${vnf_member_index} @@ -54,10 +56,49 @@ Get Vnf Management Ip Address Should Be Equal As Integers ${rc} ${success_return_code} [Return] ${stdout} -Check For NS Instance To Configured - [Arguments] ${ns_name} - ${rc} ${stdout}= Run and Return RC and Output osm ns-list --filter name="${ns_name}" +Get Ns Vnf List + [Arguments] ${ns_id} + + Should Not Be Empty ${ns_id} + @{vnf_list_string}= Run and Return RC and Output osm vnf-list | grep ${ns_id} | awk '{print $2}' 2>&1 + # Returns a String of vnf_id and needs to be converted into a list + @{vnf_list} = Split String ${vnf_list_string}[1] + Log List ${vnf_list} + [Return] @{vnf_list} + + +Get Ns Ip List + [Arguments] @{vnf_list} + + should not be empty @{vnf_list} + @{temp_list}= Create List + FOR ${vnf_id} IN @{vnf_list} + log ${vnf_id} + @{vnf_ip_list} Get Vnf Ip List ${vnf_id} + @{temp_list}= Combine Lists ${temp_list} ${vnf_ip_list} + END + should not be empty ${temp_list} + [return] @{temp_list} + + +Get Vnf Ip List + [arguments] ${vnf_id} + + should not be empty ${vnf_id} + @{vnf_ip_list_string}= run and return rc and output osm vnf-show ${vnf_id} --filter vdur --literal | grep -o '[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}\\.[0-9]\\{1,3\\}' | sort -t: -u -k1,1 2>&1 + # returns a string of ip addresses and needs to be converted into a list + should not be empty ${vnf_ip_list_string}[1] + @{vnf_ip_list} = split string ${vnf_ip_list_string}[1] + log list ${vnf_ip_list} + should not be empty ${vnf_ip_list} + [return] @{vnf_ip_list} + + +Check For Ns Instance To Configured + [arguments] ${ns_name} + + ${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} Should Contain Any ${stdout} READY BROKEN diff --git a/robot-systest/lib/nsi_lib.robot b/robot-systest/lib/nsi_lib.robot new file mode 100644 index 00000000..28bb872a --- /dev/null +++ b/robot-systest/lib/nsi_lib.robot @@ -0,0 +1,206 @@ +# Copyright 2020 Atos +# +# 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. + +*** Settings *** +Library Collections + + +*** Variables *** +${success_return_code} 0 +${slice_launch_max_wait_time} 5min +${slice_launch_pol_time} 30sec +${slice_delete_max_wait_time} 1min +${slice_delete_pol_time} 15sec + +*** Keywords *** + +Create Network Slice + [Documentation] Instantiates a NST and returns an instantiation id (nsi), verifying the slice is successfully instantiated + ... Parameters: + ... nst: Name of the slice template + ... vim_name: Name of the VIM entry already in OSM + ... slice_name: Name of the slice instance + ... slice_config: Extra parameters that might require the slice instantiation i.e. configuration attributes + ... publickey: SSH public key of the local machine + ... Execution example: + ... \${nsi}= Create Network Slice \${nst} \${vim_name} \${slice_name} \${slice_config} \${publickey} + + [Arguments] ${nst} ${vim_name} ${slice_name} ${slice_config} ${publickey} + + ${config_attr} Set Variable If '${slice_config}'!='${EMPTY}' --config '${slice_config}' \ + ${sshkeys_attr} Set Variable If '${publickey}'!='${EMPTY}' --ssh_keys ${publickey} \ + + ${nsi_id}= Instantiate Network Slice ${slice_name} ${nst} ${vim_name} ${config_attr} #${sshkeys_attr} + log ${nsi_id} + + WAIT UNTIL KEYWORD SUCCEEDS ${slice_launch_max_wait_time} ${slice_launch_pol_time} Check For Network Slice Instance To Configured ${slice_name} + Check For Network Slice Instance For Failure ${slice_name} + [Return] ${nsi_id} + + +Instantiate Network Slice + [Documentation] Instantiates a NST and returns an instantiation id (nsi) + ... Parameters: + ... slice_name: Name of the slice instance + ... nst: Name of the slice template + ... vim_name: Name of the VIM entry already in OSM + ... slice_extra_args: Extra parameters that might require the slice instantiation i.e. configuration attributes + ... Execution example: + ... \${nsi}= Instantiate Network Slice \${slice_name} \${nst} \${vim_name} \${config_attr} + + [Arguments] ${slice_name} ${nst} ${vim_name} ${slice_extra_args} + + ${rc} ${stdout}= Run and Return RC and Output osm nsi-create --nsi_name ${slice_name} --nst_name ${nst} --vim_account ${vim_name} ${slice_extra_args} + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} + + +Get Slice Ns List + [Documentation] Retrieves the list of NS in a slice + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... \@{slice_ns_list}= Get Slice Ns List \${slice_name} + + [Arguments] ${slice_name} + + Should Not Be Empty ${slice_name} + @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '{print $4}' 2>&1 + # Returns a String of ns_id and needs to be converted into a list + @{ns_list} = Split String ${ns_list_string}[1] + Log List ${ns_list} + [Return] @{ns_list} + + +Get Slice Ns List Except One + [Documentation] Retrieves the list of NS in a slice removing one from the list. This is done to save time in the tests, avoiding one VNF to ping itself. + ... Parameters: + ... slice_name: Name of the slice instance + ... exception_ns: Name of the ns that will not appear in the final list + ... Execution example: + ... \@{slice_ns_list}= Get Slice Ns List Except One \${slice_name} \${exception_ns} + + [Arguments] ${slice_name} ${exception_ns} + + Should Not Be Empty ${slice_name} + Should Not Be Empty ${exception_ns} + + @{ns_list_string}= Run and Return RC and Output osm ns-list | grep ${slice_name} | awk '!/${exception_ns}/' | awk '{print $4}' 2>&1 + # Returns a String of ns_id and needs to be converted into a list + @{ns_list} = Split String ${ns_list_string}[1] + Log List ${ns_list} + [Return] @{ns_list} + + +Get Slice Ns Count + [Documentation] Returns the count of all the NS in a slice + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... \${slice_ns_count}= Get Slice Ns Count \${slice_name} + + [Arguments] ${slice_name} + + Should Not Be Empty ${slice_name} + ${rc} ${stdout}= Run and Return RC and Output osm ns-list | grep ${slice_name} | wc -l 2>&1 + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} + + +Get Slice Vnf Ip Addresses + [Documentation] Retrieves the list of IP addresses that belong to each of the VNFs in the slice + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... \@{slice_ip_address_list}= Get Slice Vnf Ip Addresses \${slice_name} + + [Arguments] ${slice_name} + + # Get all the ns_id in the slice + @{slice_ns_list} Get Slice Ns List ${slice_name} + log many @{slice_ns_list} + @{temp_list}= Create List + # For each ns_id in the list, get all the vnf_id and their IP addresses + FOR ${ns_id} IN @{slice_ns_list} + log ${ns_id} + @{vnf_id_list} Get Ns Vnf List ${ns_id} + # For each vnf_id in the list, get all its IP addresses + @{ns_ip_list} Get Ns Ip List @{vnf_id_list} + @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list} + END + Log List ${temp_list} + [Return] @{temp_list} + + +Check For Network Slice Instance To Configured + [Documentation] Verify the slice has been instantiated + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... Check For Network Slice Instance To Configured \${slice_name} + + [Arguments] ${slice_name} + + ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}" + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + Should Contain Any ${stdout} READY BROKEN configured + + +Check For Network Slice Instance For Failure + [Documentation] Verify the slice instance is not in failure + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... Check For Network Slice Instance For Failure \${slice_name} + + [Arguments] ${slice_name} + + ${rc} ${stdout}= Run and Return RC and Output osm nsi-list --filter name="${slice_name}" + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + Should Not Contain ${stdout} BROKEN + + +Delete NSI + [Documentation] Delete Network Slice Instance (NSI) + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... Delete NST \${slice_name} + + [Arguments] ${slice_name} + + ${rc} ${stdout}= Run and Return RC and Output osm nsi-delete ${slice_name} + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + + WAIT UNTIL KEYWORD SUCCEEDS ${slice_delete_max_wait_time} ${slice_delete_pol_time} Check For Network Slice Instance To Be Deleted ${slice_name} + + +Check For Network Slice Instance To Be Deleted + [Documentation] Verify the slice instance is not present + ... Parameters: + ... slice_name: Name of the slice instance + ... Execution example: + ... Check For Network Slice Instance \${slice_name} + + [Arguments] ${slice_name} + + ${rc} ${stdout}= Run and Return RC and Output osm nsi-list | awk '{print $2}' | grep ${slice_name} + Should Not Be Equal As Strings ${stdout} ${slice_name} + + diff --git a/robot-systest/lib/nst_lib.robot b/robot-systest/lib/nst_lib.robot new file mode 100644 index 00000000..60d874a4 --- /dev/null +++ b/robot-systest/lib/nst_lib.robot @@ -0,0 +1,53 @@ +# Copyright 2020 Atos +# +# 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. + +*** Variables *** +${success_return_code} 0 +${ns_launch_max_wait_time} 5min +${ns_launch_pol_time} 30sec +${ns_delete_max_wait_time} 1min +${ns_delete_pol_time} 15sec + +*** Keywords *** +Get NST List + ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list + log ${stdout} + log ${rc} + Should Be Equal As Integers ${rc} ${success_return_code} + + +Create NST + [Arguments] ${nst} + + ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-create ${nst} + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + [Return] ${stdout} + + +Delete NST + [Arguments] ${nst_id} + + ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-delete ${nst_id} + log ${stdout} + Should Be Equal As Integers ${rc} ${success_return_code} + WAIT UNTIL KEYWORD SUCCEEDS ${delete_max_wait_time} ${delete_pol_time} Check For NST ${nst_id} + + +Check For NST + [Arguments] ${nst_id} + + ${rc} ${stdout}= Run and Return RC and Output osm netslice-template-list | awk '{print $2}' | grep ${nst_id} + Should Not Be Equal As Strings ${stdout} ${nst_id} + diff --git a/robot-systest/lib/ssh_lib.robot b/robot-systest/lib/ssh_lib.robot index 3d2d708d..23e5ae49 100644 --- a/robot-systest/lib/ssh_lib.robot +++ b/robot-systest/lib/ssh_lib.robot @@ -40,6 +40,20 @@ Get Remote File Content Close All Connections [Return] ${output} +Ping Many + [Arguments] ${host} ${username} ${password} ${privatekey} @{ip_list} + + Open Connection ${host} + Run Keyword If '${password}'!='${EMPTY}' Login ${username} ${password} + ... ELSE Login With Public Key ${username} ${privatekey} + FOR ${ip} IN @{ip_list} + ${result}= Execute Command ping -c 5 -W 1 ${ip} > /dev/null && echo OK shell=True + Log ${result} + Should Contain ${result} OK + END + Close All Connections + + Execute Remote Command Check Rc Return Output [Arguments] ${host} ${username} ${password} ${privatekey} ${command} @@ -51,4 +65,5 @@ Execute Remote Command Check Rc Return Output log ${stdout} Close All Connections Should Be Equal As Integers ${rc} 0 - [Return] ${stdout} \ No newline at end of file + [Return] ${stdout} + diff --git a/robot-systest/resources/basic_network_slicing_data.py b/robot-systest/resources/basic_network_slicing_data.py new file mode 100644 index 00000000..7ad30f4b --- /dev/null +++ b/robot-systest/resources/basic_network_slicing_data.py @@ -0,0 +1,37 @@ +# Copyright 2020 Atos +# +# 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. + +from pathlib import Path + +# Get ${HOME} from local machine +home = str(Path.home()) +# NS and VNF descriptor package files +vnfd1_pkg = 'slice_basic_vnf' +vnfd2_pkg = 'slice_basic_middle_vnfd' +nsd1_pkg = 'slice_basic_ns' +nsd2_pkg = 'slice_basic_middle_nsd' +nst = 'slice_basic_nst/slice_basic_nst.yaml' +# Instance names +slice_name = 'slicebasic' +middle_ns_name = 'slicebasic.slice_basic_nsd_2' +# Descriptor names +nst_name = 'slice_basic_nst' +vnfd1_name = 'slice_basic_vnfd' +vnfd2_name = 'slice_basic_middle_vnfd' +nsd1_name = 'slice_basic_nsd' +nsd2_name = 'slice_basic_middle_nsd' +# SSH keys to be used +publickey = home + '/.ssh/id_rsa.pub' +privatekey = home + '/.ssh/id_rsa' + diff --git a/robot-systest/resources/slice_shared_ns_data.py b/robot-systest/resources/slice_shared_ns_data.py new file mode 100644 index 00000000..e345f378 --- /dev/null +++ b/robot-systest/resources/slice_shared_ns_data.py @@ -0,0 +1,39 @@ +# Copyright 2020 Atos +# +# 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. + +from pathlib import Path + +# Get ${HOME} from local machine +home = str(Path.home()) +# NS and VNF descriptor package files +vnfd1_pkg = 'slice_hackfest_vnf.tar.gz' +vnfd2_pkg = 'slice_hackfest_middle_vnfd.tar.gz' +nsd1_pkg = 'slice_hackfest_ns.tar.gz' +nsd2_pkg = 'slice_hackfest_middle_nsd.tar.gz' +nst = 'slice_hackfest_nst.yaml' +nst2 = 'slice_hackfest2_nst.yaml' +# Instance names +slice_name = 'slicehfbasic' +slice2_name = 'sliceshared' +middle_ns_name = 'slicehfbasic.slice_hackfest_nsd_2' +# Descriptor names +nst_name = 'slice_hackfest_nst' +nst2_name = 'slice_hackfest2_nst' +vnfd1_name = 'slice_hackfest_vnfd' +vnfd2_name = 'slice_hackfest_middle_vnfd' +nsd1_name = 'slice_hackfest_nsd' +nsd2_name = 'slice_hackfest_middle_nsd' +# SSH keys to be used +publickey = home + '/.ssh/id_rsa.pub' +privatekey = home + '/.ssh/id_rsa' diff --git a/robot-systest/testsuite/basic_network_slicing.robot b/robot-systest/testsuite/basic_network_slicing.robot new file mode 100644 index 00000000..d28c6775 --- /dev/null +++ b/robot-systest/testsuite/basic_network_slicing.robot @@ -0,0 +1,184 @@ +# Copyright 2020 Atos +# +# 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. + +*** Settings *** +Library OperatingSystem +Library String +Library Collections +Library Process +Library SSHLibrary +Library yaml + +Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/nst_lib.robot +Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsi_lib.robot +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/basic_network_slicing_data.py + +Suite Teardown Run Keyword And Ignore Error Test Cleanup + + +*** Variables *** + +${ns_id} ${EMPTY} +${username} osm +${password} osm4u +${vnf_member_index} 1 +${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] basic_network_slicing SLICING-01 + + Create VNFD '%{PACKAGES_FOLDER}/${vnfd1_pkg}' + Create VNFD '%{PACKAGES_FOLDER}/${vnfd2_pkg}' + + +Create Slice NS Descriptors + [Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file) + + [Tags] basic_network_slicing SLICING-01 + + Create NSD '%{PACKAGES_FOLDER}/${nsd1_pkg}' + Create NSD '%{PACKAGES_FOLDER}/${nsd2_pkg}' + +Create Slice Template + [Documentation] Onboards the Network Slice Template: nst (in the variables file) + + [Tags] basic_network_slicing SLICING-01 + + Create NST '%{PACKAGES_FOLDER}/${nst}' + +Network Slice Instance Test + [Documentation] Instantiates the NST recently onboarded and sets the instantiation id as a suite variable (nsi_id) + + [Tags] basic_network_slicing SLICING-01 + + ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey} + Set Suite Variable ${nsi_id} ${id} + + +Get Middle Vnf Management Ip + [Documentation] Obtains the management IP of the slice middle VNF (name in the reources file) and sets the ip as a suite variable (mgmt_vnf_ip) + + [Tags] basic_network_slicing SLICING-01 + + ${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} + Set Suite Variable ${mgmt_vnf_ip} ${vnf_ip} + + +Get Slice Vnf Ip Addresses + [Documentation] Obtains the list of IPs addresses in the slice and sets the list as a suite variable (slice_vnfs_ips) + + [Tags] basic_network_slicing SLICING-01 + + # Get all the ns_id in the slice except the middle one to avoid self ping + @{slice_ns_list} Get Slice Ns List Except One ${slice_name} ${middle_ns_name} + log many @{slice_ns_list} + @{temp_list}= Create List + # For each ns_id in the list, get all the vnf_id and their IP addresses + FOR ${ns_id} IN @{slice_ns_list} + log ${ns_id} + @{vnf_id_list} Get Ns Vnf List ${ns_id} + # For each vnf_id in the list, get all its IP addresses + @{ns_ip_list} Get Ns Ip List @{vnf_id_list} + @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list} + END + Log List ${temp_list} + Set Suite Variable ${slice_vnfs_ips} ${temp_list} + + +Test Middle Ns Ping + [Documentation] Pings the slice middle vnf (mgmt_vnf_ip) + + [Tags] basic_network_slicing SLICING-01 + Sleep 60s Waiting for the network to be up + # Ping to the middle VNF + Test Connectivity ${mgmt_vnf_ip} + + +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] basic_network_slicing SLICING-01 + Sleep 30s Waiting ssh daemon to be up + Test SSH Connection ${mgmt_vnf_ip} ${username} ${password} ${privatekey} + + +Test 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 (slice_vnfs_ips) + + [Tags] basic_network_slicing SLICING-01 + Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice_vnfs_ips} + + +Stop Slice Instance + [Documentation] Stops the slice instance (slice_name) + + [Tags] basic_network_slicing SLICING-01 cleanup + + Delete NSI ${slice_name} + + +Delete Slice Template + [Documentation] Deletes the NST (nst_name) from OSM + + [Tags] basic_network_slicing SLICING-01 cleanup + + Delete NST ${nst_name} + + +Delete NS Descriptors + [Documentation] Deletes all the NSDs created for the test: nsd1_name, nsd2_name + + [Tags] basic_network_slicing SLICING-01 cleanup + + Delete NSD ${nsd1_name} + Delete NSD ${nsd2_name} + + +Delete VNF Descriptors + [Documentation] Deletes all the VNFDs created for the test: vnfd1_name, vnfd2_name + + [Tags] basic_network_slicing SLICING-01 cleanup + + Delete VNFD ${vnfd1_name} + Delete VNFD ${vnfd2_name} + + +*** Keywords *** +Test Cleanup + [Documentation] Test Suit Cleanup: Deleting Descriptors, instance and template + + Run Keyword If Test Failed Delete NST ${nst_name} + + Run Keyword If Test Failed Delete NSD ${nsd1_name} + Run Keyword If Test Failed Delete NSD ${nsd2_name} + + Run Keyword If Test Failed Delete VNFD ${vnfd1_name} + Run Keyword If Test Failed Delete VNFD ${vnfd2_name} + + + -- 2.17.1