Skip to content

Commit

Permalink
contrib/ceph: Update ErasurePool op initialization
Browse files Browse the repository at this point in the history
Allow initialization of class both from kwargs and passing in op
for the 'allow-ec-overwrites' parameter.
  • Loading branch information
fnordahl committed Aug 24, 2020
1 parent c192e3e commit 921c87f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions charmhelpers/contrib/storage/linux/ceph.py
Original file line number Diff line number Diff line change
Expand Up @@ -705,12 +705,12 @@ def __init__(self, service, name=None, erasure_code_profile=None,
# from different handling of this in the `charms.ceph` library.
self.erasure_code_profile = op.get('erasure-profile',
'default-canonical')
self.allow_ec_overwrites = op.get('allow-ec-overwrites')
else:
# We keep the class default when initialized from keyword arguments
# to not break the API for any other consumers.
self.erasure_code_profile = erasure_code_profile or 'default'

self.allow_ec_overwrites = allow_ec_overwrites
self.allow_ec_overwrites = allow_ec_overwrites

def _create(self):
# Try to find the erasure profile information in order to properly
Expand Down

0 comments on commit 921c87f

Please sign in to comment.