aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYang Xu <yang.xu3@huawei.com>2019-01-02 12:05:40 -0500
committerYang Xu <yang.xu3@huawei.com>2019-01-02 17:09:41 +0000
commitaa8c584d3330ed3fe291f792ee01c323dcbc182c (patch)
tree97874303e5e0912334ca21ed948e441e27bf6a2d
parent65b84a4aa2b3973cb7aa65d8a1c58e036f6c99c9 (diff)
Fix mac address table access in vCPE healthcheck
Change-Id: I01f7de6e9e0a26b25a91df125f31008091d0076f Issue-ID: INT-791 Signed-off-by: Yang Xu <yang.xu3@huawei.com>
-rwxr-xr-xtest/vcpe/healthcheck-k8s.py23
-rwxr-xr-xtest/vcpe/soutils.py2
2 files changed, 12 insertions, 13 deletions
diff --git a/test/vcpe/healthcheck-k8s.py b/test/vcpe/healthcheck-k8s.py
index 0aea3fb9e..0a728a429 100755
--- a/test/vcpe/healthcheck-k8s.py
+++ b/test/vcpe/healthcheck-k8s.py
@@ -2,9 +2,9 @@
import logging
import json
-from vcpecommon import *
import commands
import sys
+import subprocess
if len(sys.argv) <2:
print('namespace not provided')
@@ -13,24 +13,23 @@ if len(sys.argv) <2:
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'
+cmd = 'curl -s -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(json.dumps(json.loads(sz), indent=4))
+print('\n')
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'
+cmd = 'curl -s -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(json.dumps(json.loads(sz), indent=4))
+print('\n')
print('Checking SDNC DB for vBRG MAC address')
-mac = common.get_brg_mac_from_sdnc()
-print(mac)
+cmd = "kubectl -n onap exec dev-sdnc-sdnc-db-0 -c sdnc-db -- mysql -usdnctl -pgamma sdnctl -e 'select * from DHCP_MAP;'"
+p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
+(output, error) = p.communicate()
+print(output)
diff --git a/test/vcpe/soutils.py b/test/vcpe/soutils.py
index 6cddd6d08..5cfe46408 100755
--- a/test/vcpe/soutils.py
+++ b/test/vcpe/soutils.py
@@ -340,7 +340,7 @@ class SoUtils:
vnf_instance_id, vnf_model)
self.logger.debug(json.dumps(req, indent=2, sort_keys=True))
req_id, vfmodule_instance_id = self.submit_create_req(req, 'vfmodule', svc_instance_id, vnf_instance_id)
- if not self.check_progress(req_id, eta=70, interval=5):
+ if not self.check_progress(req_id, eta=70, interval=50):
self.logger.error('Failed to create VF Module {0}.'.format(vfmodule_instance_name))
return None