X-Git-Url: https://osm.etsi.org/gitweb/?p=osm%2Ftests.git;a=blobdiff_plain;f=robot-systest%2Ftestsuite%2Flcmop_01-cancel_operation_basic.robot;fp=robot-systest%2Ftestsuite%2Flcmop_01-cancel_operation_basic.robot;h=01c0e7e797e8840f6c5c7cbc1380a9e39da4075c;hp=3b9d215843e76cb6c0948e410d84fd86e6303b43;hb=5e001f506b744021d5ef25999c9da28cf56d8fbc;hpb=b0db4577db692b0d6c9210099c58c808cbc993c1 diff --git a/robot-systest/testsuite/lcmop_01-cancel_operation_basic.robot b/robot-systest/testsuite/lcmop_01-cancel_operation_basic.robot index 3b9d215..01c0e7e 100644 --- a/robot-systest/testsuite/lcmop_01-cancel_operation_basic.robot +++ b/robot-systest/testsuite/lcmop_01-cancel_operation_basic.robot @@ -1,3 +1,4 @@ +*** Comments *** # 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 @@ -10,6 +11,7 @@ # See the License for the specific language governing permissions and # limitations under the License. + *** Settings *** Documentation [LCMOP_01] Cancel an ongoing NS operation @@ -19,97 +21,77 @@ Library Collections Library Process Library SSHLibrary -Resource %{ROBOT_DEVOPS_FOLDER}/lib/vnfd_lib.robot -Resource %{ROBOT_DEVOPS_FOLDER}/lib/nsd_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/ns_lib.resource +Resource ../lib/ns_operation_lib.resource +Resource ../lib/connectivity_lib.resource +Resource ../lib/ssh_lib.resource -Force Tags lcmop_01 cluster_lcmop daily +Test Tags lcmop_01 cluster_lcmop daily 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 -${nsd_pkg} simple_ee_ns -${nsd_name} simple_ee-ns +${VNFD_PKG} simple_ee_vnf +${VNFD_NAME} simple_ee-vnf +${NSD_PKG} simple_ee_ns +${NSD_NAME} simple_ee-ns # NS instance name and configuration -${ns_name} lcmop_01_cancel_operation_basic -${ns_config} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } +${NS_NAME} lcmop_01_cancel_operation_basic +${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] } *** Test Cases *** Create VNF Descriptor [Documentation] Create the VNF descriptor - - ${id}= Create VNFD '%{PACKAGES_FOLDER}/${vnfd_pkg}' - Set Suite Variable ${vnfd_id} ${id} - + Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}' Create NS Descriptor [Documentation] Create the NS descriptor - - Create NSD '%{PACKAGES_FOLDER}/${nsd_pkg}' - + Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}' Instantiate Network Service [Documentation] Instantiate the Network service - - ${id}= Instantiate Network Service ${ns_name} ${nsd_name} %{VIM_TARGET} --config '${ns_config}' - Set Suite Variable ${ns_id} ${id} - + ${id}= Instantiate Network Service ${NS_NAME} ${NSD_NAME} %{VIM_TARGET} --config '${NS_CONFIG}' + Set Suite Variable ${NS_ID} ${id} Get operation ID [Documentation] Obtain the operation ID of the NS instantiation - - ${id}= Get Operations By Type ${ns_id} instantiate - Set Suite Variable ${op_id} ${id} - + ${id}= Get Operations By Type ${NS_ID} instantiate + Set Suite Variable ${OP_ID} ${id} Cancel operation [Documentation] Cancel the ongoing NS instantiation - Sleep 5s Waiting before cancelling the operation - Cancel operation By Id ${op_id} - + Cancel Operation By Id ${OP_ID} Check that operation is cancelled [Documentation] Check that the operation is succesfully cancelled - - Check For NS Operation Cancelled ${op_id} - + Check For NS Operation Cancelled ${OP_ID} Delete NS Instance Test [Documentation] Delete the cancelled NS instance [Tags] cleanup - - Delete NS ${ns_name} - + Delete NS ${NS_NAME} Delete NS Descriptor Test [Documentation] Delete the NS descriptor [Tags] cleanup - - Delete NSD ${nsd_name} - + Delete NSD ${NSD_NAME} Delete VNF Descriptor Test [Documentation] Delete the VNF descriptor [Tags] cleanup - - Delete VNFD ${vnfd_name} + Delete VNFD ${VNFD_NAME} *** Keywords *** Suite Cleanup [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim - - Run Keyword If Any Tests Failed Delete NS ${ns_name} - - Run Keyword If Any Tests Failed Delete NSD ${nsd_name} - - Run Keyword If Any Tests Failed Delete VNFD ${vnfd_name} + Run Keyword If Any Tests Failed Delete NS ${NS_NAME} + Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME} + Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}