Implement mapped collection create #898
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is a rebase of the prior work which I had on this, with some minimal cleanup to get things into a reasonable state. I'm opening it as a draft to improve visibility. It conflicts with the guest collection creation command and will need a rebase after that merges (so please ignore the conflicts).
I see a few things which need additional attention in here, and I especially note that there were no tests when I dusted this off. I think I had done some measure of manual testing which at this point is not very relevant.
Some areas of interest:
collection update
, and it will share some with guest creation as well -- we should move those to common helpers where possible.policies
sub-object is tricky. The current implementation has a small collection of mutually exclusive options which can be used. (These could be declared as mutex, but I believe mutex checking ofmultiple=True
options requires some care.) I would like it better if we could declare these usages separately somehow, but I think the current solution is likely to be a good pragmatic solution for the near-to-medium term.--storage-gateway
rather than--storage-gateway-id
. The expectation baked into this is that a typical endpoint will have only one or two gateways attached, and that typically when there are two (or more), there will only be one of each type. It is therefore a planned enhancement to support--storage-gateway posix
as a method for selecting the only POSIX gateway on the Endpoint. I think this branch of work should be updated to either implement that logic OR switch to--storage-gateway-id
. I'm not yet sure which.