Markup properties

Ensure that various data items are available via the relation
adapters in charms.openstack by marking functions as properties.

This equates to the auto_accessors lists in the ceph-client and
ceph-mds RelationBase endpoint implementations.

Change-Id: I240552158475635d6996c622bf17eb6dd73b5d81
This commit is contained in:
James Page 2020-08-26 12:05:20 +01:00
parent 1f86962275
commit 22600e77f1
2 changed files with 3 additions and 0 deletions

View File

@ -44,6 +44,7 @@ class CephClient(base_requires.CephRequires):
def broken(self):
super().broken()
@property
def fsid(self):
return self.all_joined_units.received.get('fsid')

View File

@ -31,9 +31,11 @@ class CephRequires(reactive.Endpoint):
def joined(self):
reactive.set_flag(self.expand_name('{endpoint_name}.connected'))
@property
def key(self):
return self.all_joined_units.received.get('key')
@property
def auth(self):
return self.all_joined_units.received.get('auth')