Kang Xi | 11d278c | 2018-04-06 16:56:04 -0400 | [diff] [blame] | 1 | #! /usr/bin/python |
| 2 | |
| 3 | import logging |
| 4 | import json |
| 5 | from vcpecommon import * |
| 6 | import commands |
| 7 | |
| 8 | |
| 9 | logging.basicConfig(level=logging.INFO, format='%(message)s') |
| 10 | common = VcpeCommon() |
| 11 | |
| 12 | print('Checking vGMUX REST API from SDNC') |
| 13 | cmd = 'curl -u admin:admin -X GET http://10.0.101.21:8183/restconf/config/ietf-interfaces:interfaces' |
| 14 | ret = commands.getstatusoutput("ssh -i onap_dev root@sdnc '{0}'".format(cmd)) |
| 15 | sz = ret[-1].split('\n')[-1] |
| 16 | print('\n') |
| 17 | print(sz) |
| 18 | |
| 19 | print('Checking vBRG REST API from SDNC') |
| 20 | cmd = 'curl -u admin:admin -X GET http://10.3.0.2:8183/restconf/config/ietf-interfaces:interfaces' |
| 21 | ret = commands.getstatusoutput("ssh -i onap_dev root@sdnc '{0}'".format(cmd)) |
| 22 | sz = ret[-1].split('\n')[-1] |
| 23 | print('\n') |
| 24 | print(sz) |
| 25 | |
| 26 | print('Checking SDNC DB for vBRG MAC address') |
| 27 | mac = common.get_brg_mac_from_sdnc() |
| 28 | print(mac) |
| 29 | |
| 30 | |