fix peering

This commit is contained in:
Andrew McLeod 2019-09-03 15:06:30 +02:00
parent 1fffc7c915
commit f4075ec5f2
1 changed files with 4 additions and 3 deletions

View File

@ -33,9 +33,10 @@ def check_check_state(magpie):
''' '''
Servers should only update their status after iperf has checked them Servers should only update their status after iperf has checked them
''' '''
if (magpie.get_iperf_checked() is not None) and \ if magpie.get_iperf_checked():
(hookenv.local_unit() in magpie.get_iperf_checked()): for units in magpie.get_iperf_checked():
set_state('iperf.checked') if units and hookenv.local_unit() in units:
set_state('iperf.checked')
@when('magpie.joined', 'leadership.is_leader') @when('magpie.joined', 'leadership.is_leader')