aboutsummaryrefslogtreecommitdiffstats
path: root/sfc/lib/utils.py
diff options
context:
space:
mode:
authorManuel Buil <mbuil@suse.com>2017-08-29 12:33:58 +0200
committerBrady Johnson <bjohnson@inocybe.com>2017-09-01 13:51:01 +0000
commitf2d9ca06bd9a70b4ee50c0dd51fcb061cf2baaca (patch)
treed4cb3697178a2120832ed131567efca0c2a61860 /sfc/lib/utils.py
parentb864bfbdff816dc621e5b4cd91431ec9ac4a47c0 (diff)
Remove setup_compute_node and configure_iptables
We are going to use ODL Nitrogen which does not require the NSH hack as packets reaching the VNF will use ETH+NSH encapsulation Change-Id: I5a55fde84e8f17860783ec9de8b99242fc38b9a9 Signed-off-by: Manuel Buil <mbuil@suse.com>
Diffstat (limited to 'sfc/lib/utils.py')
-rw-r--r--sfc/lib/utils.py27
1 files changed, 0 insertions, 27 deletions
diff --git a/sfc/lib/utils.py b/sfc/lib/utils.py
index bc7a9ddc..cb831969 100644
--- a/sfc/lib/utils.py
+++ b/sfc/lib/utils.py
@@ -58,19 +58,6 @@ def run_cmd_remote(ip, cmd, username="root", passwd="opnfv"):
return run_cmd(ssh_cmd)
-def configure_iptables(controller_nodes):
- """Configures IPTABLES on OpenStack Controller"""
- iptable_cmds = ["iptables -P INPUT ACCEPT",
- "iptables -t nat -P INPUT ACCEPT",
- "iptables -A INPUT -m state \
- --state NEW,ESTABLISHED,RELATED -j ACCEPT"]
-
- for cmd in iptable_cmds:
- logger.info("Configuring %s on contoller" % cmd)
- for controller in controller_nodes:
- controller.run_cmd(cmd)
-
-
def download_image(url, image_path):
image_filename = os.path.basename(image_path)
image_url = "%s/%s" % (url, image_filename)
@@ -530,20 +517,6 @@ def wait_for_classification_rules(ovs_logger, compute_nodes, odl_ip, odl_port,
logger.error('Error when waiting for classification rules: %s' % e)
-def setup_compute_node(cidr, compute_nodes):
- logger.info("bringing up br-int iface and flushing arp tables")
- grep_cidr_routes = ("ip route | grep -o {0} || true".format(cidr)).strip()
- add_cidr = "ip route add {0} dev br-int".format(cidr)
- for compute in compute_nodes:
- compute.run_cmd("ip -s -s neigh flush all")
- compute.run_cmd("ifconfig br-int up")
- if not compute.run_cmd(grep_cidr_routes):
- logger.info("adding route %s in %s" % (cidr, compute.ip))
- compute.run_cmd(add_cidr)
- else:
- logger.info("route %s already exists" % cidr)
-
-
def get_nova_id(tacker_client, resource, vnf_id=None, vnf_name=None):
vnf = os_tacker.get_vnf(tacker_client, vnf_id, vnf_name)
try: