Enable deploying Azure Storage account File shares with user specified storage quota. #3611
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.
Changes done: Addition of "quota" int param to get_or_create_file_share() in commons.py and create_share() in features.py
Why? : Current code deploys a default 100GB volume when provisioning SMB/NFS shares using Azure Storage account. This may ( and in current scenario) cause tests such as XFSTest to fail for specific test cases ( FSStress, Zero fill perf, etc ).
Default Behavior: When called, get_or_create_file_share() will continue to deploy 100B shares unless param 'quota' is passed as an integer value corresponding to GiB of volume we want to provision. Existing extensions using this function will continue to behave as is without disruption.
Things to consider when using: Code currently does not check if quota > 100 is supplied as param. This will cause REST API to return with malformed header error for Storage_V2 and Premium types. Also, Azure Python API documentation states that quota is specified in Bytes, which is incorrect. All values passed should be in GiB ( 1000 MiB -> 1 GiB). This is done since we would eventually like to support PV2 billing model.