aboutsummaryrefslogtreecommitdiffstats
path: root/testcases/vPing/CI/libraries/vPing.py
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2015-05-12 16:45:43 +0200
committerjose.lausuch <jose.lausuch@ericsson.com>2015-05-12 16:48:22 +0200
commit68dafdc2fbdd0c2c425631b5b2348c4556206a87 (patch)
treeae4f3e026dbbb5c15b4f56bee318f185ead3f868 /testcases/vPing/CI/libraries/vPing.py
parentb96a2e41541561c18d02fdca38c2eff3bc312ae8 (diff)
config.py bug fix: NEUTRON_NET_NAME parameter changed to NEUTRON_PRIVATE_NET_NAME
JIRA: FUNCTEST-10 Change-Id: I4386f11a3658771ad66bc06848a478ded31bf924 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'testcases/vPing/CI/libraries/vPing.py')
-rw-r--r--testcases/vPing/CI/libraries/vPing.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing.py
index 45624de1f..b579830e7 100644
--- a/testcases/vPing/CI/libraries/vPing.py
+++ b/testcases/vPing/CI/libraries/vPing.py
@@ -141,11 +141,11 @@ def main():
networks=nova.networks.list()
network_found = False
for net in networks:
- if net.human_id == NEUTRON_NET_NAME:
+ if net.human_id == NEUTRON_PRIVATE_NET_NAME:
logger.info("Network found '%s'" %net.human_id)
network_found = True
if not network_found:
- logger.error("Neutron network %s not found." % NEUTRON_NET_NAME)
+ logger.error("Neutron network %s not found." % NEUTRON_PRIVATE_NET_NAME)
logger.info("Available networks are: ")
pMsg(nova.networks.list())
exit(-1)
@@ -164,7 +164,7 @@ def main():
m = NAME_VM_1
f = nova.flavors.find(name = FLAVOR)
i = nova.images.find(name = GLANCE_IMAGE_NAME)
- n = nova.networks.find(label = NEUTRON_NET_NAME)
+ n = nova.networks.find(label = NEUTRON_PRIVATE_NET_NAME)
u = "#cloud-config\npassword: opnfv\nchpasswd: { expire: False }\nssh_pwauth: True"
#k = "demo-key"
@@ -192,7 +192,7 @@ def main():
#pMsg(server.networks)
# theoretically there is only one IP address so we take the first element of the table
# Dangerous! To be improved!
- test_ip = server.networks.get(NEUTRON_NET_NAME)[0]
+ test_ip = server.networks.get(NEUTRON_PRIVATE_NET_NAME)[0]
logger.debug("Instance '%s' got %s" %(m,test_ip))
test_cmd = '/tmp/vping.sh %s'%test_ip
@@ -204,7 +204,7 @@ def main():
m = NAME_VM_2
f = nova.flavors.find(name = FLAVOR)
i = nova.images.find(name = GLANCE_IMAGE_NAME)
- n = nova.networks.find(label = NEUTRON_NET_NAME)
+ n = nova.networks.find(label = NEUTRON_PRIVATE_NET_NAME)
# use base 64 format becaus bad surprises with sh script with cloud-init but script is just pinging
#k = "demo-key"
u = "#cloud-config\npassword: opnfv\nchpasswd: { expire: False }\nssh_pwauth: True\nwrite_files:\n- encoding: b64\n path: /tmp/vping.sh\n permissions: '0777'\n owner: root:root\n content: IyEvYmluL2Jhc2gKCndoaWxlIHRydWU7IGRvCiBwaW5nIC1jIDEgJDEgMj4mMSA+L2Rldi9udWxsCiBSRVM9JD8KIGlmIFsgIlokUkVTIiA9ICJaMCIgXSA7IHRoZW4KICBlY2hvICJ2UGluZyBPSyIKICBzbGVlcCAxMAogIHN1ZG8gc2h1dGRvd24gLWggbm93CiAgYnJlYWsKIGVsc2UKICBlY2hvICJ2UGluZyBLTyIKIGZpCiBzbGVlcCAxCmRvbmUK\nruncmd:\n - [ sh, -c, %s]"%test_cmd
@@ -269,7 +269,7 @@ def main():
logger.debug("Instance %s terminated." % NAME_VM_2)
- logger.debug("EXIT_CODE=%s" % EXIT_CODE)
+ logger.debug("EXIT_CODE=%d" % EXIT_CODE)
exit(EXIT_CODE)