Remove policy.json file in favor of policy in code

This is a work-around for a package bug. The policy.json file
was deprecated in the wallaby release in favor of using a
policy.yaml file to override the default policy in code.
Therefore the policy.json file is not needed.

Closes-Bug: #1952763
Change-Id: I4b424869a23f28e8eb66ef6bfc42603b863afc40
This commit is contained in:
Corey Bryant 2022-03-15 15:41:50 +00:00
parent 9f3caabb33
commit bc86824524
1 changed files with 12 additions and 0 deletions

View File

@ -501,3 +501,15 @@ class ManilaCharmRocky(ManilaCharm):
]
python_version = 3
class ManilaCharmXena(ManilaCharmRocky):
release = 'xena'
def install(self):
super().install()
# remove deprecated policy.json in favor of policy in code
policy_json = '/etc/manila/policy.json'
if os.path.exists(policy_json):
os.remove(policy_json)