def __init__(self,
addresses: List[str],
access_type: str,
- squash: str):
+ squash: str,
+ delegations: str):
self.addresses = addresses
self.access_type = access_type
self.squash = squash
+ self.delegations: delegations
@classmethod
def from_client_block(cls, client_block: RawBlock) -> 'Client':
addresses = [addresses]
return cls(addresses,
client_block.values.get('access_type', None),
- client_block.values.get('squash', None))
+ client_block.values.get('squash', None),
+ client_block.values.get('delegations', None))
def to_client_block(self) -> RawBlock:
result = RawBlock('CLIENT', values={'clients': self.addresses})
result.values['access_type'] = self.access_type
if self.squash:
result.values['squash'] = self.squash
+ if self.delegations:
+ result.values['delegations'] = self.delegations
return result
@classmethod
def from_dict(cls, client_dict: Dict[str, Any]) -> 'Client':
return cls(client_dict['addresses'], client_dict['access_type'],
- client_dict['squash'])
+ client_dict['squash'], client_dict['delegations'])
def to_dict(self) -> Dict[str, Any]:
return {
'addresses': self.addresses,
'access_type': self.access_type,
- 'squash': self.squash
+ 'squash': self.squash,
+ 'delegations': self.delegations
}
class CephBlock: