blob: 08a4e0ead26ba94736c0f3dfa37e4e5e4c70615a [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}
45@{vim}
46#${vim_name} robot_test
47
48
49*** Test Cases ***
50Create VNF Descriptor Test
51 [Tags] sanity smoke
52
53 Build VNF Descriptor ${vnfdPckgPath}
54 ${vnfd_id}= Create VNFD '${CURDIR}${/}../../..${vnfdPckgPath}${vnfdPckg}'
55 Append To List ${vnfd_ids} ${vnfd_id}
56
57
58Create NS Descriptor Test
59 [Tags] sanity smoke
60
61 Build NS Descriptor ${nsdPckgPath}
62 ${nsd_id}= Create NSD '${CURDIR}${/}../../..${nsdPckgPath}${nsdPckg}'
63 Append To List ${nsd_ids} ${nsd_id}
64
65
66Network Service Instance Test
67 [Documentation] Launch and terminate network services
68 [Tags] sanity
69 [Setup] VIM Setup To Launch Network Services
70 [Teardown] Run Keyword And Ignore Error Network Service Instance Cleanup
71
72 Should Not Be Empty ${vim} VIM details not provided
73 :FOR ${vim_name} IN @{vim}
74 \ Launch Network Services and Return ${vim_name}
75
76
77Delete NS Descriptor Test
78 [Tags] sanity smoke
79
80 :FOR ${nsd} IN @{nsd_ids}
81 \ Delete NSD ${nsd}
82
83
84Delete VNF Descriptor Test
85 [Tags] sanity smoke
86
87 :FOR ${vnfd} IN @{vnfd_ids}
88 \ Delete VNFD ${vnfd}
89
90
91*** Keywords ***
92Test Cleanup
93 [Documentation] Test Suit Cleanup: Forcefully delete NSD and VNFD
94
95 :FOR ${nsd} IN @{nsd_ids}
96 \ Force Delete NSD ${nsd}
97
98 :FOR ${vnfd} IN @{vnfd_ids}
99 \ Force Delete VNFD ${vnfd}
100
101
102Network Service Instance Cleanup
103 [Documentation] Forcefully delete created network service instances and vim account
104
105 :FOR ${ns} IN @{ns_ids}
106 \ Force Delete NS ${ns}
107
108 :FOR ${vim_id} IN @{vim}
109 \ Force Delete Vim Account ${vim_id}