Support charm specifying weight on pool creation

When a charm requests a pool in cannot specify the weight atm as
the create_pool function forces it to None.

Change-Id: I40a85cf5c0e943aef0b4ec507d8c9b3a24ba09a8
This commit is contained in:
Liam Young 2018-12-06 13:50:14 +00:00
parent 7cfed26220
commit aec6677875
1 changed files with 2 additions and 2 deletions

View File

@ -67,7 +67,7 @@ class CephClientRequires(RelationBase):
self.remove_state('{relation_name}.connected')
self.remove_state('{relation_name}.pools.available')
def create_pool(self, name, replicas=3):
def create_pool(self, name, replicas=3, weight=None):
"""
Request pool setup
@ -81,7 +81,7 @@ class CephClientRequires(RelationBase):
rq = CephBrokerRq()
rq.add_op_create_pool(name="{}".format(name),
replica_count=replicas,
weight=None)
weight=weight)
self.set_local(key='broker_req', value=rq.request)
send_request_if_needed(rq, relation=self.relation_name)
else: