aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/utils.py
diff options
context:
space:
mode:
authorManuel Buil <manuelbuil87@gmail.com>2016-12-09 14:29:58 +0000
committerGerrit Code Review <gerrit@opnfv.org>2016-12-09 14:29:58 +0000
commitcf27d8c61ee456fdd05f5e7d558bb8fadbff2fdc (patch)
tree58f97648d368788a75fc1954187d014355b484d1 /tests/functest/odl-sfc/utils.py
parent4cf88806b7342d6e9674664799a906d18520a06b (diff)
parent04443eaf16effe54eff8eba35d04bfc1a1960d32 (diff)
Merge "remove dependancy of prepare_odl_sfc.py"
Diffstat (limited to 'tests/functest/odl-sfc/utils.py')
-rw-r--r--tests/functest/odl-sfc/utils.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/functest/odl-sfc/utils.py b/tests/functest/odl-sfc/utils.py
index f8483170..de23b812 100644
--- a/tests/functest/odl-sfc/utils.py
+++ b/tests/functest/odl-sfc/utils.py
@@ -385,3 +385,13 @@ def get_compute_nodes(nova_client, required_node_number=2):
logger.debug("Compute nodes: %s" % compute_nodes)
return compute_nodes
+
+
+def setup_compute_node(cidr):
+ logger.info("bringing up br-int iface")
+ run_cmd_on_compute("ifconfig br-int up")
+ if not run_cmd_on_compute("ip route|grep -o %s" % cidr):
+ logger.info("adding route %s" % cidr)
+ return run_cmd_on_compute("ip route add %s" % cidr)
+ else:
+ logger.info("route %s exists" % cidr)