Refactor healthcheck-k8s.py 34/95634/2
authorBartek Grzybowski <b.grzybowski@partner.samsung.com>
Fri, 13 Sep 2019 10:50:59 +0000 (12:50 +0200)
committerDaniel Rose <dr695h@att.com>
Fri, 13 Sep 2019 14:00:13 +0000 (14:00 +0000)
commit0ca3d400f25810df7b1eb811dc529e0d1231a184
tree0d66de7bd407ce7f3e4101ac8681b609ab6cac7b
parentbfeeb24819035523222149d4fffdf9f7de363fc2
Refactor healthcheck-k8s.py

Error reporting was improved by returning actual
error message from subprocess call to 'kubectl' command.

Code readability was improved by defining a dictionary
of endpoint names to check and their IPs.

Unsecure 'shell=True' property in Popen constructor for
kubectl command in SDNC DB was removed and command string
itself sanitized.

Overall code readability was improved by reusing common
commands in a loop.

Change-Id: I19f8f71e27196bb55a9be3d58cd0885ceba3af0c
Issue-ID: TEST-213
Signed-off-by: Bartek Grzybowski <b.grzybowski@partner.samsung.com>
test/vcpe/healthcheck-k8s.py