Make ``mon_hosts`` a function and not a property

This commit is contained in:
Frode Nordahl 2019-02-26 11:59:00 +01:00
parent b54d497d91
commit 9f6570e970
No known key found for this signature in database
GPG Key ID: 6A5D59A3BA48373F
1 changed files with 7 additions and 1 deletions

View File

@ -137,8 +137,14 @@ class CephRBDMirrorRequires(Endpoint):
def key(self):
return self.all_joined_units.received[self.key_name]
@property
def mon_hosts(self):
"""
NOTE(fnordahl): As much as this should and could have been a property
we have pre-existing interfaces providing this as a function. To be
able to use the same code for relation adaption etc in
``charms.openstack`` we must keep having this as a function unless we
go back and change both to being properties.
"""
for relation in self.relations:
for unit in relation.units:
try: