| yadavmr | a1cc2c6 | 2019-10-30 16:50:20 +0530 | [diff] [blame] | 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" |
| yadavmr | f21d9da | 2019-11-05 11:42:57 +0530 | [diff] [blame] | 30 | ${dpid} "a7:2f:aa:be:C3:c1:fe:C9" |
| yadavmr | a1cc2c6 | 2019-10-30 16:50:20 +0530 | [diff] [blame] | 31 | |
| 32 | |
| 33 | *** Keywords *** |
| 34 | Create SDNC Account |
| 35 | [Documentation] create new sdnc account |
| 36 | |
| yadavmr | f21d9da | 2019-11-05 11:42:57 +0530 | [diff] [blame] | 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} |
| yadavmr | a1cc2c6 | 2019-10-30 16:50:20 +0530 | [diff] [blame] | 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 | |
| yadavmr | f21d9da | 2019-11-05 11:42:57 +0530 | [diff] [blame] | 53 | ${rc} ${stdout}= Run and Return RC and Output osm sdnc-show ${name} |
| yadavmr | a1cc2c6 | 2019-10-30 16:50:20 +0530 | [diff] [blame] | 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 | |
| yadavmr | f21d9da | 2019-11-05 11:42:57 +0530 | [diff] [blame] | 62 | ${rc} ${stdout}= Run and Return RC and Output osm sdnc-delete ${name} |
| yadavmr | a1cc2c6 | 2019-10-30 16:50:20 +0530 | [diff] [blame] | 63 | log ${rc} |
| 64 | log ${stdout} |
| 65 | Should Be Equal As Integers ${rc} ${success_return_code} |