-
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] Fix public IP resource name; Add option to skip public IP creation #7820
base: main
Are you sure you want to change the base?
Conversation
|
rule | cmd_name | rule_message | suggest_message |
---|---|---|---|
vm repair create | cmd vm repair create added parameter no |
vm-repair |
Thank you for your contribution GISGuy! We will review the pull request and get back to you soon. |
@microsoft-github-policy-service agree company="Microsoft" |
|
@@ -33,6 +33,7 @@ def load_arguments(self, _): | |||
c.argument('associate_public_ip', help='Option to create repair vm with public ip') | |||
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|suse12|ubuntu20|centos7|oracle7)') | |||
c.argument('yes', help='Option to skip prompt for associating public ip and confirm yes to it in no Tty mode') | |||
c.argument('no', help='Option to skip prompt for associating public ip and confirm no to it in no Tty mode') |
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.
Instead of yes and no as separate options. Is it good to add one command as public ip address yes or no?
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.
I dont know if we have to maintain the backward compatibility of passing yes.
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.
I personally don't like the parameter name --yes
or --no
, and I agree with you that using a new parameter like createPublicIp
makes more sense. However, for the sake of backward compatibility, I think it's better to use --no
in this situation.
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.
+1. We cannot break backward compat. I also don't like --yes, --no. Another option could be to introduce a new param and have it enable yes and no. That way, users can use the new param to specify yes/no and the old value van remain with yes support only. We can update documentation to remove --yes over time.
@@ -33,6 +33,7 @@ def load_arguments(self, _): | |||
c.argument('associate_public_ip', help='Option to create repair vm with public ip') | |||
c.argument('distro', help='Option to create repair vm from a specific linux distro (rhel7|rhel8|suse12|ubuntu20|centos7|oracle7)') | |||
c.argument('yes', help='Option to skip prompt for associating public ip and confirm yes to it in no Tty mode') | |||
c.argument('no', help='Option to skip prompt for associating public ip and confirm no to it in no Tty mode') |
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.
+1. We cannot break backward compat. I also don't like --yes, --no. Another option could be to introduce a new param and have it enable yes and no. That way, users can use the new param to specify yes/no and the old value van remain with yes support only. We can update documentation to remove --yes over time.
@@ -1,6 +1,11 @@ | |||
|
|||
Release History | |||
=============== | |||
1.0.8 | |||
++++++ | |||
Add option `--no` to skip public IP creation during `az vm repair create` command. |
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.
This feature is not in the critical path as we don't have many asks for it. So, we could wait this out till after the CrowdStrike usage dips.
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.
CrowdStrick fix script is pretty stable as of now. Do you think we should merge this change now?
I tried the unit test on the main branch and it doesn't work at all. Based on that, I can barely add new unit tests. |
When the extension prompts the user for public IP creation, if the user chooses
y
, it currently creates a public IP with the nameFalse
.After the fix, it will create the public IP resource using the default naming convention.
![image](https://private-user-images.githubusercontent.com/6434268/351145208-314ed85d-4ff6-425a-9dd8-c44cee2ba4a4.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjU5Mzk2NTMsIm5iZiI6MTcyNTkzOTM1MywicGF0aCI6Ii82NDM0MjY4LzM1MTE0NTIwOC0zMTRlZDg1ZC00ZmY2LTQyNWEtOWRkOC1jNDRjZWUyYmE0YTQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDkxMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA5MTBUMDMzNTUzWiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9NDg2MjA3YmU4NDU0ZTBlYjY0MjFiODlkMTViMGExMzYyYTE3YmM5ODJlNDQ0ZjhjMDdlMGFiYWFkMTgyZDA1NiZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.tkOzUufLbUDBiGI5jNNQYIekWinG663zaWYsaRuEcMw)
--no
to skip public IP creationWhen the user adds
--no
to the command parameter, the extension will skip prompting the user for the public IP creation and bypass the creation process.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? (pip install wheel==0.30.0
required)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
.