diff options
Diffstat (limited to 'tests/functest/odl-sfc/utils.py')
-rw-r--r-- | tests/functest/odl-sfc/utils.py | 10 |
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) |