Skip to content
This repository has been archived by the owner on Oct 22, 2019. It is now read-only.

Support checking BGP daemon status from multiple choices #173

Merged
merged 1 commit into from
Dec 6, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion calico_test/tests/st/utils/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,14 +167,17 @@ def check_bird_status(host, expected):
if len(columns) != 7:
continue

if type(state) is not list:
state = [state]

# Find the entry matching this peer.
if columns[1] == ipaddr and columns[2] == peertype:

# Check that the connection state is as expected. We check
# that the state starts with the expected value since there
# may be additional diagnostic information included in the
# info field.
if columns[5].startswith(state):
if any(columns[5].startswith(s) for s in state):
break
else:
msg = "Error in BIRD status for peer %s:\n" \
Expand Down