summaryrefslogtreecommitdiffstats
path: root/test/vcpe/healthcheck.py
diff options
context:
space:
mode:
authorKang Xi <kang.xi@huawei.com>2018-04-06 16:56:04 -0400
committerKang Xi <kang.xi@huawei.com>2018-04-13 14:52:52 -0400
commit11d278c5adf571bbc1b9d184e78ad3309f8f04d4 (patch)
treec9d2b2aeb990be44e58b4e2d3ffb120d4b1d260c /test/vcpe/healthcheck.py
parentf5b6edf04f07ff98c41a0d25e5639e8844d9377c (diff)
Initial code import for vcpe automation.
Initial code import for vCPE use case automation. Source code was validated for Amsterdam release. Changes may be needed for Bejing. - Remove unneeded files: test.py and onap_dev Issue-ID: INT-461 Change-Id: Ifc2665bf8069fdcebd052cecc95266a4b831d2e8 Signed-off-by: Kang Xi <kang.xi@huawei.com>
Diffstat (limited to 'test/vcpe/healthcheck.py')
-rwxr-xr-xtest/vcpe/healthcheck.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/test/vcpe/healthcheck.py b/test/vcpe/healthcheck.py
new file mode 100755
index 000000000..b94848e13
--- /dev/null
+++ b/test/vcpe/healthcheck.py
@@ -0,0 +1,30 @@
+#! /usr/bin/python
+
+import logging
+import json
+from vcpecommon import *
+import commands
+
+
+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("ssh -i onap_dev root@sdnc '{0}'".format(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("ssh -i onap_dev root@sdnc '{0}'".format(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)
+
+