diff options
author | Brian Freeman <bf1936@att.com> | 2018-11-11 22:36:20 -0500 |
---|---|---|
committer | Brian Freeman <bf1936@att.com> | 2018-11-12 10:28:55 -0500 |
commit | 81f6e9ee662695a818bdb5f24c17f09fac5c962f (patch) | |
tree | a60da066457b1746ab63e0f023b192d14eeadbf6 /test/vcpe/healthcheck-k8s.py | |
parent | a71e3709faa5f281361ddfcd79eb4bd11550edca (diff) |
Updates for Casbalanca vcpe.py
Issue-ID: INT-717
Change-Id: I0d5978da205fcc02935e9547424578f90e5a5c38
Signed-off-by: Brian Freeman <bf1936@att.com>
Diffstat (limited to 'test/vcpe/healthcheck-k8s.py')
-rw-r--r-- | test/vcpe/healthcheck-k8s.py | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/test/vcpe/healthcheck-k8s.py b/test/vcpe/healthcheck-k8s.py new file mode 100644 index 000000000..0aea3fb9e --- /dev/null +++ b/test/vcpe/healthcheck-k8s.py @@ -0,0 +1,36 @@ +#! /usr/bin/python + +import logging +import json +from vcpecommon import * +import commands +import sys + +if len(sys.argv) <2: + print('namespace not provided') + print('Usage: healthcheck-k8s.py onap') + sys.exit() + +namespace=sys.argv[1] + +logging.basicConfig(level=logging.INFO, format='%(message)s') +common = VcpeCommon() + +print('Checking vGMUX REST API from SDNC') +cmd = 'curl -u admin:admin -X GET http://10.0.101.21:8183/restconf/config/ietf-interfaces:interfaces' +ret = commands.getstatusoutput("kubectl -n {0} exec dev-sdnc-sdnc-0 -- bash -c '{1}'".format(namespace,cmd)) +sz = ret[-1].split('\n')[-1] +print('\n') +print(sz) + +print('Checking vBRG REST API from SDNC') +cmd = 'curl -u admin:admin -X GET http://10.3.0.2:8183/restconf/config/ietf-interfaces:interfaces' +ret = commands.getstatusoutput("kubectl -n {0} exec dev-sdnc-sdnc-0 -- bash -c '{1}'".format(namespace,cmd)) +sz = ret[-1].split('\n')[-1] +print('\n') +print(sz) + +print('Checking SDNC DB for vBRG MAC address') +mac = common.get_brg_mac_from_sdnc() +print(mac) + |