From 04443eaf16effe54eff8eba35d04bfc1a1960d32 Mon Sep 17 00:00:00 2001 From: Vijayendra Radhakrishna Date: Thu, 8 Dec 2016 21:19:18 +0530 Subject: 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 --- tests/functest/odl-sfc/utils.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'tests/functest/odl-sfc/utils.py') 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) -- cgit 1.2.3-korg