diff options
author | Romanos Skiadas <rski@intracom-telecom.com> | 2017-03-14 10:11:54 +0200 |
---|---|---|
committer | Romanos Skiadas <rski@intracom-telecom.com> | 2017-03-16 11:18:09 +0200 |
commit | 6674049b09d02fe0dc7e11e007e710643cdd49ca (patch) | |
tree | 4935a0089507b42189b8fc3fa89d257b794bfa93 /sdnvpn/lib/quagga.py | |
parent | 1ad4cd4d35bcd0d4d9898650eb0452b184b55f77 (diff) |
Fix most end-to-end issues with testcase 3 and reenable it
- Make the test work end-to-end on Fuel
- Use the instance log to verify quagga started
- Don't attempt to check for peering, as that is for
a future release
- Use the external IP of the controller for peering
- Fix not getting the output of OpenDaylight commands
Change-Id: Ia7bb533ab65e0fca6b7f48bb64133f6d8f3ff8ae
JIRA: SDNVPN-114
Signed-off-by: Romanos Skiadas <rski@intracom-telecom.com>
Diffstat (limited to 'sdnvpn/lib/quagga.py')
-rw-r--r-- | sdnvpn/lib/quagga.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/sdnvpn/lib/quagga.py b/sdnvpn/lib/quagga.py index 9f8a4cd..dc80657 100644 --- a/sdnvpn/lib/quagga.py +++ b/sdnvpn/lib/quagga.py @@ -13,10 +13,14 @@ logger = ft_logger.Logger("sdnvpn-quagga").getLogger() COMMON_CONFIG = config.CommonConfig() -def odl_add_neighbor(neighbor_ip, controller): +def odl_add_neighbor(neighbor_ip, controller_ip, controller): + # Explicitly pass controller_ip because controller.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) + command += ' --ip %s --use-source-ip %s' % (neighbor_ip, controller_ip) success = run_odl_cmd(controller, command) + # The run_cmd api is really whimsical + logger.info("Maybe stdout of %s: %s", command, success) return success @@ -41,7 +45,7 @@ def gen_quagga_setup_script(controller_ip, def check_for_peering(controller): - cmd = 'show-bgp --cmd "ip bgp neighbors"' + cmd = 'show-bgp --cmd \\"ip bgp neighbors\\"' tries = 20 neighbors = None bgp_state_regex = re.compile("(BGP state =.*)") |