-
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
[vm-repair] Adding repair-and-restore one command flow for fstab scripts #6244
Conversation
vm-repair |
examples: | ||
- name: Repair and restore a VM. | ||
text: > | ||
az vm repair repair-and-restore --name "vmrepairtest" --resource-group "MyResourceGroup" --verbose |
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.
az vm repair repair-and-restore --name "vmrepairtest" --resource-group "MyResourceGroup" --verbose | |
az vm repair repair-and-restore --name vmrepairtest --resource-group MyResourceGroup --verbose |
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.
Commit change
namespace.repair_username = "azureuser" | ||
validate_vm_username(namespace.repair_username, is_linux) | ||
namespace.repair_password = "!AzureUser@123" | ||
validate_vm_password(namespace.repair_password, is_linux) |
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.
May I ask if this operation tries to set the default values of repair_username
and repair_password
?
namespace.repair_username = "azureuser" | |
validate_vm_username(namespace.repair_username, is_linux) | |
namespace.repair_password = "!AzureUser@123" | |
validate_vm_password(namespace.repair_password, is_linux) | |
if not namespace.repair_username: | |
namespace.repair_username = "azureuser" | |
validate_vm_username(namespace.repair_username, is_linux) | |
if not namespace.repair_password: | |
namespace.repair_password = "!AzureUser@123" | |
validate_vm_password(namespace.repair_password, is_linux) |
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.
Thanks for suggesting but I fixed this to remove the default values.
return urns[0] | ||
|
||
|
||
def _suse_image_selector_gen2(distro): | ||
fetch_urn_command = 'az vm image list --publisher SUSE --offer {offer} --sku gen2 --verbose --all --query "[].urn | reverse(sort(@))" -o json'.format(offer=distro) | ||
logger.info('Fetching compatible SUSE OS images from gallery...') | ||
# logger.info('Fetching compatible SUSE OS images from gallery...') |
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 recommended to remove deprecated code instead of commenting them.
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.
Fixed
Please add test for the new feature and fix the CI. |
Co-authored-by: Yan Zhu <[email protected]>
…e-cli-extensions into haagha/repairrestore
@yanzhudd Thanks for reviewing. I made the changes suggested. |
[Release] Update index.json for extension [ vm-repair ] : https://dev.azure.com/azclitools/internal/_build/results?buildId=67280&view=results |
This checklist is used to make sure that common guidelines for a pull request are followed.
Related command
General Guidelines
azdev style <YOUR_EXT>
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
.