Skip to content

Commit a119dd5

Browse files
authored
[exabgp] Fix start/restart verification condition (#1400)
Fix the issue when checking the return from status API. Previously the check was done outside the module and the return was in a form of hash map. With relocation of the condition to the exabgp module, the return type is strig and is not a map. signed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
1 parent d537abd commit a119dd5

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

ansible/library/exabgp.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ def start_exabgp(module, name):
142142

143143
for count in range(0, 60):
144144
time.sleep(1)
145-
ret = get_exabgp_status(module, name)
146-
if u'RUNNING' == ret['status']:
145+
status = get_exabgp_status(module, name)
146+
if u'RUNNING' == status:
147147
break
148-
assert u'RUNNING' == ret['status']
148+
assert u'RUNNING' == status
149149

150150
def restart_exabgp(module, name):
151151
refresh_supervisord(module)
@@ -154,9 +154,9 @@ def restart_exabgp(module, name):
154154
for count in range(0, 60):
155155
time.sleep(1)
156156
ret = get_exabgp_status(module, name)
157-
if u'RUNNING' == ret['status']:
157+
if u'RUNNING' == status:
158158
break
159-
assert u'RUNNING' == ret['status']
159+
assert u'RUNNING' == status
160160

161161
def stop_exabgp(module, name):
162162
exec_command(module, cmd="supervisorctl stop exabgp-%s" % name, ignore_error=True)

0 commit comments

Comments
 (0)