summaryrefslogtreecommitdiffstats
path: root/tests/functest/odl-sfc/utils.py
diff options
context:
space:
mode:
authorVijayendra Radhakrishna <vradhakrishna@mvista.com>2016-12-08 21:19:18 +0530
committerVijayendra Radhakrishna <vradhakrishna@mvista.com>2016-12-09 19:02:47 +0530
commit04443eaf16effe54eff8eba35d04bfc1a1960d32 (patch)
tree755d0272285ccb10a5ad17a4ce7ee63ab1185452 /tests/functest/odl-sfc/utils.py
parentd3de20395d79daf9aa6b3c6fd4f9eea80791398e (diff)
remove dependancy of prepare_odl_sfc.py
Pre setup files below are not required anymore prepare_odl_sfc.py compute_presetup_CI.bash server_presetup_CI.bash Files are not removed yet. Change-Id: I26cc8ba1a7c61f84fa06809217963ebd7f6b4b20 Signed-off-by: Vijayendra Radhakrishna <vradhakrishna@mvista.com>
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 779e8490..f540f950 100644
--- a/tests/functest/odl-sfc/utils.py
+++ b/tests/functest/odl-sfc/utils.py
@@ -380,3 +380,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)