71680b899fcae6d317e4f22cfbcc0aa581c2a635
[osm/tests.git] / robot-systest / deprecated / lib / cli / sdnc_account_lib.robot
1 # -*- 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
22 *** Variables ***
23 ${success_return_code}    0
24 ${name}     "OpenSite"
25 ${user}     "admin"
26 ${password}     "admin"
27 ${ip}      "1.1.1.1"
28 ${type}     "onos"
29 ${port}     "5858"
30 ${dpid}   "a7:2f:aa:be:C3:c1:fe:C9"
31
32
33 *** Keywords ***
34 Create SDNC Account
35     [Documentation]  create new sdnc account
36
37      ${rc}    ${stdout}=      Run and Return RC and Output       osm sdnc-create --name ${name} --type ${type} --ip_address ${ip} --user ${user} --password ${password} --port ${port} --switch_dpid ${dpid}
38     log  ${rc}
39     log  ${stdout}
40     Should Be Equal As Integers    ${rc}    ${success_return_code}
41
42
43 Get SDNC List
44     [Documentation]  Get a sdnc account list
45
46     ${rc}    ${stdout}=      Run and Return RC and Output        osm sdnc-list
47     log     ${stdout}
48
49
50 Show SDNC Account
51     [Documentation]  Get sdnc account details
52
53     ${rc}    ${stdout}=      Run and Return RC and Output        osm sdnc-show ${name}
54     log  ${rc}
55     log  ${stdout}
56     Should Be Equal As Integers    ${rc}    ${success_return_code}
57
58
59 Delete SDNC Account
60     [Documentation]  Get sdnc account details
61
62     ${rc}    ${stdout}=      Run and Return RC and Output        osm sdnc-delete ${name}
63     log  ${rc}
64     log  ${stdout}
65     Should Be Equal As Integers    ${rc}    ${success_return_code}