# See the License for the specific language governing permissions and
# limitations under the License.
# See the License for the specific language governing permissions and
# limitations under the License.
-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
+Resource ../lib/vnfd_lib.resource
+Resource ../lib/nsd_lib.resource
+Resource ../lib/nst_lib.resource
+Resource ../lib/nsi_lib.resource
+Resource ../lib/ns_lib.resource
+Resource ../lib/connectivity_lib.resource
+Resource ../lib/ssh_lib.resource
-${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
+${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
-${nst_name} slice_basic_nst
-${vnfd1_name} slice_basic_vnf
-${vnfd2_name} slice_basic_middle_vnf
-${nsd1_name} slice_basic_ns
-${nsd2_name} slice_basic_middle_ns
+${NST_NAME} slice_basic_nst
+${VNFD1_NAME} slice_basic_vnf
+${VNFD2_NAME} slice_basic_middle_vnf
+${NSD1_NAME} slice_basic_ns
+${NSD2_NAME} slice_basic_middle_ns
-${ns_id} ${EMPTY}
-${vnf_member_index} middle
-${vnf_ip_addr} ${EMPTY}
-${mgmt_vnf_ip} ${EMPTY}
-${nst_config} {netslice-vld: [ {name: slice_vld_mgmt, vim-network-name: %{VIM_MGMT_NET}} ] }
+${VNF_MEMBER_INDEX} middle
+${VNF_IP_ADDR} ${EMPTY}
+${MGMT_VNF_IP} ${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)
*** Test Cases ***
Create Slice VNF Descriptors
[Documentation] Onboards all the VNFDs required for the test: vnfd1_pkg and vnfd2_pkg (in the variables file)
Create Slice NS Descriptors
[Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file)
Create Slice NS Descriptors
[Documentation] Onboards all the NSDs required for the test: nsd1_pkg and nsd2_pkg (in the variables file)
Network Slice Instance Test
[Documentation] Instantiates the NST recently onboarded and sets the instantiation id as a suite variable (nsi_id)
Network Slice Instance Test
[Documentation] Instantiates the NST recently onboarded and sets the instantiation id as a suite variable (nsi_id)
-
- ${id}= Create Network Slice ${nst_name} %{VIM_TARGET} ${slice_name} ${nst_config} ${publickey}
- Set Suite Variable ${nsi_id} ${id}
-
+ ${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)
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)
-
- ${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
- Set Suite Variable ${mgmt_vnf_ip} ${vnf_ip}
-
+ ${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}
+ IF '${vnf_ip}' == '${EMPTY}' Fatal Error Variable \$\{ vnf_ip\} Empty
+ 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)
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)
- @{slice_ns_list} Get Slice Ns List Except One ${slice_name} ${middle_ns_name}
- log many @{slice_ns_list}
- @{temp_list}= Create List
+ @{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}
# For each ns_id in the list, get all the vnf_id and their IP addresses
FOR ${ns_id} IN @{slice_ns_list}
- @{ns_ip_list} Get Ns Ip List @{vnf_id_list}
- @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list}
+ @{ns_ip_list}= Get Ns Ip List @{vnf_id_list}
+ @{temp_list}= Combine Lists ${temp_list} ${ns_ip_list}
Test Middle Vnf SSH Access
[Documentation] SSH access to the slice middle vnf (mgmt_vnf_ip) with the credentials provided in the variables file
Test Middle Vnf SSH Access
[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)
-
- Ping Many ${mgmt_vnf_ip} ${username} ${password} ${privatekey} @{slice_vnfs_ips}
-
+ ... and pings all the IP addresses in the list (slice_vnfs_ips)
+ Ping Many ${MGMT_VNF_IP} ${USERNAME} ${PASSWORD} ${PRIVATEKEY} @{SLICE_VNFS_IPS}
- [Documentation] Test Suit Cleanup: Deleting Descriptors, instance and template
-
- Run Keyword If Any Tests Failed Delete NSI ${slice_name}
-
- Run Keyword If Any Tests Failed Delete NST ${nst_name}
-
- Run Keyword If Any Tests Failed Delete NSD ${nsd1_name}
- Run Keyword If Any Tests Failed Delete NSD ${nsd2_name}
-
- Run Keyword If Any Tests Failed Delete VNFD ${vnfd1_name}
- Run Keyword If Any Tests Failed Delete VNFD ${vnfd2_name}
-
-
-
+ [Documentation] Test Suit Cleanup: Deleting Descriptors, instance and template
+ Run Keyword If Any Tests Failed Delete NSI ${SLICE_NAME}
+ Run Keyword If Any Tests Failed Delete NST ${NST_NAME}
+ Run Keyword If Any Tests Failed Delete NSD ${NSD1_NAME}
+ Run Keyword If Any Tests Failed Delete NSD ${NSD2_NAME}
+ Run Keyword If Any Tests Failed Delete VNFD ${VNFD1_NAME}
+ Run Keyword If Any Tests Failed Delete VNFD ${VNFD2_NAME}