blob: 84e1f92721d53255a1cef924b57eb08c5c2a31ae [file] [log] [blame]
yadavmr58af6b12019-09-18 15:33:25 +05301# -*- coding: utf-8 -*-
2
3##
4# Copyright 2019 Tech Mahindra Limited
5#
6# All Rights Reserved.
7#
8# Licensed under the Apache License, Version 2.0 (the "License"); you may
9# not use this file except in compliance with the License. You may obtain
10# a copy of the License at
11#
12# http://www.apache.org/licenses/LICENSE-2.0
13#
14# Unless required by applicable law or agreed to in writing, software
15# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17# License for the specific language governing permissions and limitations
18# under the License.
19##
20
21## Change log:
22# 1. Feature 7829: Mrityunjay Yadav, Jayant Madavi : MY00514913@techmahindra.com : 06-aug-2019
23##
24
25
26*** Settings ***
27Documentation Test Suite to test basic cirros VNF and NS using osm-client
28Library OperatingSystem
29Library String
30Library Collections
31Resource ../../lib/cli/vnfd_lib.robot
32Resource ../../lib/cli/nsd_lib.robot
33Resource ../../lib/cli/ns_lib.robot
34Resource ../../lib/cli/vim_account_lib.robot
35Library ../../lib/custom_lib.py
36Variables ../../resource/cli/test_vnf_data.py
37
38Suite Teardown Run Keyword And Ignore Error Test Cleanup
39
40
41*** Variables ***
42@{vnfd_ids}
43@{nsd_ids}
44@{ns_ids}
yadavmr58af6b12019-09-18 15:33:25 +053045
46
47*** Test Cases ***
48Create VNF Descriptor Test
49 [Tags] sanity smoke
50
51 Build VNF Descriptor ${vnfdPckgPath}
52 ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
53 Append To List ${vnfd_ids} ${vnfd_id}
54
55
56Create NS Descriptor Test
57 [Tags] sanity smoke
58
59 Build NS Descriptor ${nsdPckgPath}
60 ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
61 Append To List ${nsd_ids} ${nsd_id}
62
63
64Network Service Instance Test
65 [Documentation] Launch and terminate network services
66 [Tags] sanity
yadavmr58af6b12019-09-18 15:33:25 +053067
yadavmr58af6b12019-09-18 15:33:25 +053068 :FOR ${vim_name} IN @{vim}
69 \ Launch Network Services and Return ${vim_name}
70
71
yadavmr07847332019-11-28 12:01:48 +053072Delete NS Instance Test
73 [Tags] sanity
74
75 :FOR ${ns} IN @{ns_ids}
76 \ Delete NS ${ns}
77
78
yadavmr58af6b12019-09-18 15:33:25 +053079Delete NS Descriptor Test
80 [Tags] sanity smoke
81
82 :FOR ${nsd} IN @{nsd_ids}
83 \ Delete NSD ${nsd}
84
85
86Delete VNF Descriptor Test
87 [Tags] sanity smoke
88
89 :FOR ${vnfd} IN @{vnfd_ids}
90 \ Delete VNFD ${vnfd}
91
92
93*** Keywords ***
94Test Cleanup
yadavmr07847332019-11-28 12:01:48 +053095 [Documentation] Test Suit Cleanup: Deliting Descriptor, instance and vim
yadavmr58af6b12019-09-18 15:33:25 +053096
97 :FOR ${ns} IN @{ns_ids}
yadavmr07847332019-11-28 12:01:48 +053098 \ Delete NS ${ns}
99
100 :FOR ${nsd} IN @{nsd_ids}
101 \ Delete NSD ${nsd}
102
103 :FOR ${vnfd} IN @{vnfd_ids}
104 \ Delete VNFD ${vnfd}
105
106# :FOR ${vim_id} IN @{vim}
107# \ Delete Vim Account ${vim_id}