Repository navigation
Conversation
…parameter for ip configuration name customization
|
Validation for Azure CLI Full Test Starting...
Thanks for your contribution! |
|
Validation for Breaking Change Starting...
Thanks for your contribution! |
|
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>
|
|
unfortunately, it's by design. |
|
wait could you elaborate instead of closing it straight away? does that mean it will always be fixed at "ipconfig1". Because my concern is that if I use "ipconfig1" in things like adding a nic to a load balancer by name, I don't know if it's guaranteed it will always be "ipconfig1". I wanted to understand more the thinking why it's fixed at "ipconfig1" by design. |
|
it will always be "ipconfig1", the original intention might have been to reduce some input and to create certain dependencies by default. |
|
I would like to get another contributor / maintainers thoughts on it Yong Zhang (@yonzhan). Could you please give me your thoughts on the discussion and help me see how my code doesn't conform to the overall intention and design. This will be more helpful and beneficial for my own understanding because I want to try and help contribute more to this tool as I use it every day for work. |
|
Just a quick thought here:
Source: |

Related command
az network nic createDescription
az network nic ip-config address-pool add --resource-group {rg} --nic-name {nic} --lb-name {lb} --ip-config-name {ip_config_name} --address-pool {backend_pool_name}instead of hardcoding "ipconfig1" into the --ip-config-name parameter).Testing Guide
To test the command run:
az network nic create --resource-group {rg} --name {nic} --subnet {subnet_id} --ip-config-name {ip_config_name}I tested this in practice by updating the file: azure-cli/azure/cli/command_modules/network/custom.py and running the command with the new parameter and it worked.
But I wasn't sure how to integrate it fully into the testing framework provided. After trying my best to read through the code base I think the way to test this is to:
properties.set_prop("ipConfigName", AAZStrType, ".ip_config_name")self.check('NewNIC.ipConfigName", {ip_config_name})(where{ip_config_name}is obtained by the following code also in the same file):But I'm not sure how to run the tests themselves. Any help on this would be appreciated!
PR Checklist
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.