blob: 3085c1c5ea7446c5a070abfd4de482ba2dbd3e43 [file] [log] [blame]
yadavmra1cc2c62019-10-30 16:50:20 +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
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} ""
31
32
33*** Keywords ***
34Create 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} return_rc=True
38 log ${rc}
39 log ${stdout}
40 Should Be Equal As Integers ${rc} ${success_return_code}
41
42
43Get 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
50Show SDNC Account
51 [Documentation] Get sdnc account details
52
53 ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name} return_rc=True
54 log ${rc}
55 log ${stdout}
56 Should Be Equal As Integers ${rc} ${success_return_code}
57
58
59Delete SDNC Account
60 [Documentation] Get sdnc account details
61
62 ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name} return_rc=True
63 log ${rc}
64 log ${stdout}
65 Should Be Equal As Integers ${rc} ${success_return_code}