-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
AzCli support for checkpoint operations and added deleteFromHost flag for VM delete #6300
Conversation
Hi @mchoubey2021, |
Hi @mchoubey2021, |
Thank you for your contribution! We will review the pull request and get back to you soon. |
Please add test for the new added commands |
Accepted. Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Co-authored-by: Yan Zhu <105691024+yanzhudd@users.noreply.github.com>
Added test cases for newly added scenarios |
self.cmd( | ||
'az scvmm vm create-checkpoint -g {resource_group} --name {vm_name} --checkpoint-name {checkpoint_name} --checkpoint-description {checkpoint_description}', | ||
) | ||
alias_sub = self.cmd('az scvmm vm show -g {resource_group} --name {vm_name}').get_output_in_json() | ||
checkpoint_id = alias_sub['checkpoints'][0]['checkpointId'] | ||
self.kwargs.update({'checkpoint_id': checkpoint_id}) | ||
|
||
self.cmd( | ||
'az scvmm vm restore-checkpoint -g {resource_group} --name {vm_name} --checkpoint-id {checkpoint_id}', | ||
) | ||
|
||
self.cmd( | ||
'az scvmm vm delete-checkpoint -g {resource_group} --name {vm_name} --checkpoint-id {checkpoint_id}', | ||
) | ||
|
||
self.cmd('az scvmm vm delete -g {resource_group} --name {vm_name} --deleteFromHost -y') |
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.
It is suggested to add some checks for the commands.
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.
Added checks. Pulled vm states and made checks.
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
az scvmm vm create-checkpoint --subscription contoso-sub
--resource-group contoso-rg --name contoso-vm --checkpoint-name contoso-chkpt-name
--checkpoint-description contoso-chkpt-description
az scvmm vm delete-checkpoint --subscription contoso-sub
--resource-group contoso-rg --name contoso-vm --checkpoint-id checkpoint-guid
az scvmm vm restore-checkpoint --subscription contoso-sub
--resource-group contoso-rg --name contoso-vm --checkpoint-id checkpoint-guid
az scvmm vm delete --subscription contoso-sub
--resource-group contoso-rg --name contoso-avset --deleteFromHost
General Guidelines
azdev style <scvmm>
locally? (pip install azdev
required)python scripts/ci/test_index.py -q
locally?For new extensions:
About Extension Publish
There is a pipeline to automatically build, upload and publish extension wheels.
Once your pull request is merged into main branch, a new pull request will be created to update
src/index.json
automatically.You only need to update the version information in file setup.py and historical information in file HISTORY.rst in your PR but do not modify
src/index.json
.