blob: 71680b899fcae6d317e4f22cfbcc0aa581c2a635 [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"
yadavmrf21d9da2019-11-05 11:42:57 +053030${dpid} "a7:2f:aa:be:C3:c1:fe:C9"
yadavmra1cc2c62019-10-30 16:50:20 +053031
32
33*** Keywords ***
34Create SDNC Account
35 [Documentation] create new sdnc account
36
yadavmrf21d9da2019-11-05 11:42:57 +053037 ${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}
yadavmra1cc2c62019-10-30 16:50:20 +053038 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
yadavmrf21d9da2019-11-05 11:42:57 +053053 ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name}
yadavmra1cc2c62019-10-30 16:50:20 +053054 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
yadavmrf21d9da2019-11-05 11:42:57 +053062 ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name}
yadavmra1cc2c62019-10-30 16:50:20 +053063 log ${rc}
64 log ${stdout}
65 Should Be Equal As Integers ${rc} ${success_return_code}