remove unit from relation_set
This commit is contained in:
parent
dd4a7ac0fb
commit
f8dd5395c3
|
@ -227,8 +227,7 @@ def update_rsync_acls():
|
|||
settings = {'rsync_allowed_hosts': rsync_hosts,
|
||||
'timestamp': time.time()}
|
||||
for rid in relation_ids('swift-storage'):
|
||||
for unit in related_units(rid):
|
||||
relation_set(unit=unit, relation_id=rid, **settings)
|
||||
relation_set(relation_id=rid, **settings)
|
||||
|
||||
|
||||
@hooks.hook('swift-storage-relation-changed')
|
||||
|
|
|
@ -157,9 +157,5 @@ class SwiftHooksTestCase(unittest.TestCase):
|
|||
mock_get_host_ip.side_effect = fake_get_host_ip
|
||||
swift_hooks.update_rsync_acls()
|
||||
calls = [call(rsync_allowed_hosts='10.0.0.1 10.0.0.2',
|
||||
relation_id='storage:1',
|
||||
unit='unit/0', timestamp=1234),
|
||||
call(rsync_allowed_hosts='10.0.0.1 10.0.0.2',
|
||||
relation_id='storage:1',
|
||||
unit='unit/1', timestamp=1234)]
|
||||
relation_id='storage:1', timestamp=1234)]
|
||||
mock_rel_set.assert_has_calls(calls)
|
||||
|
|
Loading…
Reference in New Issue