blob: a45159a7f387c215d76e681f721fdb2dc74cf22e [file] [log] [blame]
garciadeblas7a9e0312023-12-11 22:24:46 +01001*** Comments ***
bravof25ab58b2021-11-09 18:52:30 -03002# 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
5#
6# http://www.apache.org/licenses/LICENSE-2.0
7#
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.
13
garciadeblas7a9e0312023-12-11 22:24:46 +010014
bravof25ab58b2021-11-09 18:52:30 -030015*** Settings ***
garciadeblasf4ebaa82022-06-23 13:33:26 +020016Documentation [BASIC-23] Creation and deletion of SOL004 and SOL007 packages.
bravof25ab58b2021-11-09 18:52:30 -030017
18Library OperatingSystem
19Library String
20Library Collections
21Library Process
22Library SSHLibrary
23
garciadeblas7a9e0312023-12-11 22:24:46 +010024Resource ../lib/vnfd_lib.resource
25Resource ../lib/nsd_lib.resource
bravof25ab58b2021-11-09 18:52:30 -030026
garciadeblas7a9e0312023-12-11 22:24:46 +010027Test Tags basic_23 cluster_main daily regression azure
bravof25ab58b2021-11-09 18:52:30 -030028
29Suite Teardown Run Keyword And Ignore Error Suite Cleanup
30
31
32*** Variables ***
33# NS and VNF descriptor package folder and ids
garciadeblas7a9e0312023-12-11 22:24:46 +010034${VNFD_PKG} sol004_hackfest_basic_vnf
35${VNFD_NAME} sol004_hackfest_basic-vnf
36${NSD_PKG} sol007_hackfest_basic_ns
37${NSD_NAME} sol007_hackfest_basic-ns
bravof25ab58b2021-11-09 18:52:30 -030038
39
40*** Test Cases ***
41Create VNF Package
garciadeblas7a9e0312023-12-11 22:24:46 +010042 [Documentation] Upload VNF package for the testsuite.
43 Create VNFD '%{PACKAGES_FOLDER}/${VNFD_PKG}'
bravof25ab58b2021-11-09 18:52:30 -030044
45Create NS Package
garciadeblas7a9e0312023-12-11 22:24:46 +010046 [Documentation] Upload NS package for the testsuite.
47 Create NSD '%{PACKAGES_FOLDER}/${NSD_PKG}'
bravof25ab58b2021-11-09 18:52:30 -030048
49Cannot Delete VNF Package
garciadeblas7a9e0312023-12-11 22:24:46 +010050 [Documentation] Assert that the VNF package cannot be deleted before the NS package is deleted.
51 Assert Failure Delete VNFD ${VNFD_NAME}
bravof25ab58b2021-11-09 18:52:30 -030052
53Delete NS Package
garciadeblas7a9e0312023-12-11 22:24:46 +010054 [Documentation] Delete NS package.
bravof25ab58b2021-11-09 18:52:30 -030055 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010056 Delete NSD ${NSD_NAME}
bravof25ab58b2021-11-09 18:52:30 -030057
58Delete VNF Package
garciadeblas7a9e0312023-12-11 22:24:46 +010059 [Documentation] Delete VNF package.
bravof25ab58b2021-11-09 18:52:30 -030060 [Tags] cleanup
garciadeblas7a9e0312023-12-11 22:24:46 +010061 Delete VNFD ${VNFD_NAME}
bravof25ab58b2021-11-09 18:52:30 -030062
63
64*** Keywords ***
65Suite Cleanup
garciadeblasf4ebaa82022-06-23 13:33:26 +020066 [Documentation] Test Suit Cleanup: Deleting NS and VNF packages
garciadeblas7a9e0312023-12-11 22:24:46 +010067 Run Keyword If Any Tests Failed Delete NSD ${NSD_NAME}
68 Run Keyword If Any Tests Failed Delete VNFD ${VNFD_NAME}