Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1053 from luissimas/fix-storage-constraints
#1053 #### Description Fixes: #1052. Parses the storage constraints when deploying applications. Before this change the storage constraints where not parsing, resulting in an error when deploying bundles that contained applications with storage definitions. #### QA Steps The following python script can be used to verify both the bug in the current version as well as the fix implemented: ```python import asyncio from juju.model import Model bundle_file = "./bundle.yaml" bundle = """ name: sample-bundle series: jammy machines: "0": constraints: instance-type=type1 applications: swift-storage: charm: swift-storage channel: yoga/stable num_units: 1 to: - "0" storage: block-devices: cinder,1,5G """ async def main(): with open(bundle_file, "w") as f: f.write(bundle) model = Model() await model.connect() await model.deploy(bundle_file) asyncio.run(main()) ``` All CI tests need to pass. #### Notes & Discussion I wasn't able to add a regression test for this fix since the `juju-qa-test` charm does not support the addition of storage devices. With that said, I'm open to suggestions on how to test this behavior to make sure it's correct and that it stays that way on future changes.
- Loading branch information