88d8b5cb288c5ecce7433a9adbd2a776cdef18f7
[osm/tests.git] / robot-systest / deprecated / testsuite / client_library / TS01__OSMClient_Library_Test.robot
1 ##
2 # Copyright 2019 Tech Mahindra Limited
3 #
4 # All Rights Reserved.
5 #
6 # Licensed under the Apache License, Version 2.0 (the "License"); you may
7 # not use this file except in compliance with the License. You may obtain
8 # a copy of the License at
9 #
10 #         http://www.apache.org/licenses/LICENSE-2.0
11 #
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
14 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
15 # License for the specific language governing permissions and limitations
16 # under the License.
17 ##
18
19
20 *** Settings ***
21 Documentation    Test suite to test osmclient python library
22 Library     OperatingSystem
23
24 Suite Setup    Setup OSM Client
25
26
27 *** Variables ***
28 ${name}     helloworld-os
29 ${user}     robottest
30 ${password}     fred
31 ${authurl}      https://169.254.169.245/
32 ${type}     openstack
33 ${desc}     a test vim
34 ${tenant}    robottest
35
36
37 *** Test Cases ***
38 Get VIM Account List Test
39     [Tags]    comprehensive    osmclient_lib
40     [Documentation]    Using python's osmclient library to get vim account list
41
42     ${vim_list}=    osmclient.get_vim_list
43     log to console    ${vim_list}
44     log  ${vim_list}
45
46
47 Get VNF Descriptor List Test
48     [Tags]    comprehensive    osmclient_lib
49     [Documentation]    Using python's osmclient library to get vnfd list
50
51     ${vnfd_list}=    osmclient.get_vnfd_list
52     log to console    ${vnfd_list}
53     log  ${vnfd_list}
54
55
56 Get NS Descriptor List Test
57     [Tags]    comprehensive    osmclient_lib
58     [Documentation]    Using python's osmclient library to get nsd list
59
60     ${nsd_list}=    osmclient.get_nsd_list
61     log to console    ${nsd_list}
62     log  ${nsd_list}
63
64
65 Create Vim Account Test
66     [Tags]    comprehensive    osmclient_lib
67     [Documentation]    Using python's osmclient library to create vim account
68     [Template]    osmclient.create_vim_account
69     ${name}  ${type}  ${user}  ${password}  ${authurl}  ${tenant}  ${desc}
70
71
72 Delete Vim Account Test
73     [Tags]    comprehensive    osmclient_lib
74     [Documentation]    Using python's osmclient library to delete vim account
75     osmclient.delete_vim_account    ${name}
76
77
78 *** Keywords ***
79 Setup OSM Client
80     evaluate    sys.path.append('${CURDIR}${/}../../lib/client_lib')    modules=sys
81     ${host}=    Get Environment Variable    OSM_HOSTNAME    127.0.0.1
82     Import Library    client_lib.ClientLib    host=${host}    WITH NAME    osmclient