-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Compute] az snapshot create
: Add new parameter --instant-access-duration-minutes
to support creating instant access snapshot for premium SSD v2 and ultra disk
#31891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
️✔️AzureCLI-FullTest
|
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
snapshot create | cmd snapshot create added parameter instant_access_duration_minutes |
Thank you for your contribution! We will review the pull request and get back to you soon. |
The git hooks are available for azure-cli and azure-cli-extensions repos. They could help you run required checks before creating the PR. Please sync the latest code with latest dev branch (for azure-cli) or main branch (for azure-cli-extensions). pip install azdev --upgrade
azdev setup -c <your azure-cli repo path> -r <your azure-cli-extensions repo path>
|
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds support for creating instant access snapshots for Premium SSD v2 and Ultra Disk by introducing a new --enable-instant-access
parameter to the az snapshot create
command.
- Adds a new test case to verify the
--enable-instant-access
functionality - Updates test recordings to reflect the new parameter usage
- Adds test skips for failing tests unrelated to the main feature
Reviewed Changes
Copilot reviewed 15 out of 30 changed files in this pull request and generated 1 comment.
File | Description |
---|---|
src/azure-cli/azure/cli/command_modules/vm/tests/latest/test_vm_commands.py | Adds new test for instant access snapshot functionality and skips failing tests |
src/azure-cli/azure/cli/command_modules/vm/tests/latest/recordings/test_vm_snapshot_incremental.yaml | Updates recorded HTTP interactions with API version changes and new response fields |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
self.kwargs.update({ | ||
'disk': self.create_random_name('disk', 15), | ||
'snapshot': self.create_random_name('snapshot', 15) | ||
}) | ||
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS') | ||
self.cmd('snapshot create -g {rg} -n {snapshot} --enable-instant-access 300 --incremental true --source {disk}', checks=[ | ||
self.check('incremental', True), | ||
self.check('creationData.instantAccessDurationMinutes', 300) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The command uses a hard-coded value of 300 for the instant access duration. Consider using a variable or constant to make the test more maintainable and self-documenting about what this value represents (e.g., duration in minutes).
self.kwargs.update({ | |
'disk': self.create_random_name('disk', 15), | |
'snapshot': self.create_random_name('snapshot', 15) | |
}) | |
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS') | |
self.cmd('snapshot create -g {rg} -n {snapshot} --enable-instant-access 300 --incremental true --source {disk}', checks=[ | |
self.check('incremental', True), | |
self.check('creationData.instantAccessDurationMinutes', 300) | |
instant_access_duration_minutes = 300 | |
self.kwargs.update({ | |
'disk': self.create_random_name('disk', 15), | |
'snapshot': self.create_random_name('snapshot', 15) | |
}) | |
self.cmd('disk create -g {rg} -n {disk} --size-gb 10 --sku UltraSSD_LRS') | |
self.cmd(f'snapshot create -g {{rg}} -n {{snapshot}} --enable-instant-access {instant_access_duration_minutes} --incremental true --source {{disk}}', checks=[ | |
self.check('incremental', True), | |
self.check('creationData.instantAccessDurationMinutes', instant_access_duration_minutes) |
Copilot uses AI. Check for mistakes.
az snapshot create
: Add new parameter --enable-instant-access
to support creating instant access snapshot for premium SSD v2 and ultra diskaz snapshot create
: Add new parameter --instant-access-duration-minutes
to support creating instant access snapshot for premium SSD v2 and ultra disk
License check: @microsoft-github-policy-service rerun |
/azp run |
Azure Pipelines successfully started running 3 pipeline(s). |
Related command
az snapshot create
Description
Instant Access Snapshot for Premium SSD v2 and Ultra Disk
close: #31717
AAZ: Azure/aaz#836
Testing Guide
History Notes
[Component Name 1] BREAKING CHANGE:
az command a
: Make some customer-facing breaking change[Component Name 2]
az command b
: Add some customer-facing featureThis checklist is used to make sure that common guidelines for a pull request are followed.
The PR title and description has followed the guideline in Submitting Pull Requests.
I adhere to the Command Guidelines.
I adhere to the Error Handling Guidelines.