-
Notifications
You must be signed in to change notification settings - Fork 0
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 juju#17026 from wallyworld/storage-constraints-fac…
…ades juju#17026 This PR copies logic used to validate storage and configure default storage when adding an application from the state package to the new storage domain package. The logic is kept the same but is decoupled from state. So the `domain/storage/validation.*` and `domain/storage/defaults.*` are essentially the transplanted code from state. As well as when adding a new application, the logic is also used when setting a new charm on an application. The validation ensures the storage requested matches what the charm needs. The defaults handling ensures model config for block and filesystem sources is used if nothing is specified. With this change, the application service needs a storage provider registry to create apps or update the charm, so that is now provided to the service. A NotImplementedStorageRegistry is used for when the app service is used and no registry is needed, eg just removing apps in the cleanup facade. As well as putting the new defaults/validation logic in place, this PR wires up the application facade to call the domain service methods - aside from using the new validation and defaults logic, nothing is implemented yet to do the persistence, but a follow up will complete the end to end logic so that storage constraints are fully written to dqlite. ## QA steps For now, just bootstrap and deploy a charm with storage as a regression check. ## Links **Jira card:** JUJU-5634
- Loading branch information
Showing
48 changed files
with
1,593 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.