summaryrefslogtreecommitdiffstats
path: root/sdnvpn/lib/quagga.py
diff options
context:
space:
mode:
authorStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-11 15:13:33 +0300
committerStamatis Katsaounis <mokats@intracom-telecom.com>2018-10-31 14:45:50 +0200
commitb17b3d80849b9c9989fb4deeb6001a6ff78261c1 (patch)
tree901e100e7e315fa5033018d84b5e1dfcd57cbee1 /sdnvpn/lib/quagga.py
parent2a584266524ace3cbcd8e906e971726706eb5ce5 (diff)
Add suport for fuel installer
JIRA: FUEL-393 This patch adds support for fuel installer by modifying relevant pieces of code. Change-Id: I5245e84022dd258c96648b0985660e093ca98b52 Signed-off-by: Stamatis Katsaounis <mokats@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/lib/quagga.py')
-rw-r--r--sdnvpn/lib/quagga.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/sdnvpn/lib/quagga.py b/sdnvpn/lib/quagga.py
index f11e188..6efd6a9 100644
--- a/sdnvpn/lib/quagga.py
+++ b/sdnvpn/lib/quagga.py
@@ -22,12 +22,12 @@ logger = logging.getLogger('sdnvpn-quagga')
COMMON_CONFIG = config.CommonConfig()
-def odl_add_neighbor(neighbor_ip, controller_ip, controller):
- # Explicitly pass controller_ip because controller.ip
+def odl_add_neighbor(neighbor_ip, odl_ip, odl_node):
+ # Explicitly pass odl_ip because odl_node.ip
# Might not be accessible from the Quagga instance
command = 'configure-bgp -op add-neighbor --as-num 200'
- command += ' --ip %s --use-source-ip %s' % (neighbor_ip, controller_ip)
- success = run_odl_cmd(controller, command)
+ command += ' --ip %s --use-source-ip %s' % (neighbor_ip, odl_ip)
+ success = run_odl_cmd(odl_node, command)
# The run_cmd api is really whimsical
logger.info("Maybe stdout of %s: %s", command, success)
return success
@@ -42,20 +42,20 @@ def bootstrap_quagga(fip_addr, controller_ip):
return rc == 0
-def gen_quagga_setup_script(controller_ip,
+def gen_quagga_setup_script(odl_ip,
fake_floating_ip,
ext_net_mask,
ip_prefix, rd, irt, ert):
with open(COMMON_CONFIG.quagga_setup_script_path) as f:
template = f.read()
- script = template.format(controller_ip,
+ script = template.format(odl_ip,
fake_floating_ip,
ext_net_mask,
ip_prefix, rd, irt, ert)
return script
-def check_for_peering(controller):
+def check_for_peering(odl_node):
cmd = 'show-bgp --cmd \\"ip bgp neighbors\\"'
tries = 20
neighbors = None
@@ -64,7 +64,7 @@ def check_for_peering(controller):
while tries > 0:
if neighbors and 'Established' in neighbors:
break
- neighbors = run_odl_cmd(controller, cmd)
+ neighbors = run_odl_cmd(odl_node, cmd)
logger.info("Output of %s: %s", cmd, neighbors)
if neighbors:
opens = opens_regex.search(neighbors)