2 # Licensed under the Apache License, Version 2.0 (the "License");
3 # you may not use this file except in compliance with the License.
4 # You may obtain a copy of the License at
6 # http://www.apache.org/licenses/LICENSE-2.0
8 # Unless required by applicable law or agreed to in writing, software
9 # distributed under the License is distributed on an "AS IS" BASIS,
10 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11 # See the License for the specific language governing permissions and
12 # limitations under the License.
16 Documentation [LCMOP_01] Cancel an ongoing NS operation
18 Library OperatingSystem
24 Resource ../lib/vnfd_lib.resource
25 Resource ../lib/nsd_lib.resource
26 Resource ../lib/ns_lib.resource
27 Resource ../lib/ns_operation_lib.resource
28 Resource ../lib/connectivity_lib.resource
29 Resource ../lib/ssh_lib.resource
31 Test Tags lcmop_01 cluster_lcmop daily
33 Suite Teardown Run Keyword And Ignore Error Suite Cleanup
37 # NS and VNF descriptor package folder and ids
38 ${VNFD_PKG} simple_ee_vnf
39 ${VNFD_NAME} simple_ee-vnf
40 ${NSD_PKG} simple_ee_ns
41 ${NSD_NAME} simple_ee-ns
43 # NS instance name and configuration
44 ${NS_NAME} lcmop_01_cancel_operation_basic
45 ${NS_CONFIG} {vld: [ {name: mgmtnet, vim-network-name: %{VIM_MGMT_NET}} ] }
50 [Documentation] Create the VNF descriptor
51 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
54 [Documentation] Create the NS descriptor
55 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
57 Instantiate Network Service
58 [Documentation] Instantiate the Network service
59 ${id}= Instantiate Network Service ${NS_NAME} ${NSD_NAME} %{VIM_TARGET} --config '${NS_CONFIG}'
60 Set Suite Variable ${NS_ID} ${id}
63 [Documentation] Obtain the operation ID of the NS instantiation
64 ${id}= Get Operations By Type ${NS_ID} instantiate
65 Set Suite Variable ${OP_ID} ${id}
68 [Documentation] Cancel the ongoing NS instantiation
69 Sleep 5s Waiting before cancelling the operation
70 Cancel Operation By Id ${OP_ID}
72 Check That Operation Is Cancelled
73 [Documentation] Check that the operation is succesfully cancelled
74 Check For NS Operation Cancelled ${OP_ID}
76 Delete NS Instance Test
77 [Documentation] Delete the cancelled NS instance
81 Delete NS Descriptor Test
82 [Documentation] Delete the NS descriptor
84 Delete NSD ${NSD_NAME}
86 Delete VNF Descriptor Test
87 [Documentation] Delete the VNF descriptor
89 Delete VNFD ${VNFD_NAME}
94 [Documentation] Test Suit Cleanup: Deleting Descriptor, instance and vim
95 Run Keyword If Any Tests Failed Delete NS ${NS_NAME}
96 Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME}
97 Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}