summaryrefslogtreecommitdiffstats
path: root/testing/robot/data
diff options
context:
space:
mode:
authorJuraj Linkes <jlinkes@cisco.com>2016-08-11 14:08:57 +0200
committerJuraj Linkes <jlinkes@cisco.com>2016-08-11 14:08:57 +0200
commit6318a416890600c739208c228c2be8527aac61af (patch)
tree4f121566b23b095cf5f672bd0b770b09422c56b6 /testing/robot/data
parent6bbc3752ca506eb93db73cc89eced650bec52281 (diff)
added headers and added a non-working first draft of nodhcp ping test
Change-Id: I0c02184cc2b6f43cc8a8a6ede4ca3fcf3a2285d3 Signed-off-by: Juraj Linkes <jlinkes@cisco.com>
Diffstat (limited to 'testing/robot/data')
-rw-r--r--testing/robot/data/test_data.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/testing/robot/data/test_data.py b/testing/robot/data/test_data.py
index cd3b170..d78ce4f 100644
--- a/testing/robot/data/test_data.py
+++ b/testing/robot/data/test_data.py
@@ -1,3 +1,12 @@
+##############################################################################
+# Copyright (c) 2016 Juraj Linkes (Cisco) and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
+
import uuid
run_uuid = str(uuid.uuid4())
@@ -12,3 +21,7 @@ port2_name = 'fds_smoke_port2_' + run_uuid
subnet_cidr = '192.168.10.0/24'
vm_flavor = 'm1.small'
vm_image = 'cirros-0.3.3'
+userdata1 = "#!/bin/sh\n\nsudo ip a add {}/24 dev eth0\n".format(vm1_address)
+userdata2 = "#!/bin/sh\n\nsudo ip a add {}/24 dev eth0\nwhile true; do\n ping -c 1 {} 2>&1 >/dev/null\n " \
+ "RES=$?\n if [ \"Z$RES\" = \"Z0\" ] ; then\n echo 'ping PASSED'\n break\n else\n echo " \
+ "'ping FAILED'\n fi\n sleep 1\ndone\n".format(vm2_address, vm1_address)