-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
[Network] az network lb create
: Support cross-subscription resource ID
#28247
Conversation
️✔️AzureCLI-FullTest
|
Hi @ReaNAiveD, |
️✔️AzureCLI-BreakingChangeTest
|
Network |
az network lb create
: support cross-subscription resource IDaz network lb create
: Support cross-subscription resource ID
def resource_exists(cli_ctx, resource_group, name, namespace, type, **_): # pylint: disable=redefined-builtin | ||
def resource_exists(cli_ctx, subscription, resource_group, name, namespace, type, | ||
**_): # pylint: disable=redefined-builtin |
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.
Have you confirmed that inserting subscription
parameter in the middle of the parameter list will not cause parameter misalignment issues in previous calls?
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.
Please note that this is a method in the azure-cli-core, so we also need to consider the invocation of other external dependencies such as CLI extensions. If you are not 100% confident, it is recommended to insert subscription
parameter at the end of the parameter list.
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 have checked the usage of this function in azure-cli and azure-cli-extensions.
It is only used by two functions: get_folded_parameter_validator
(in core/commands/templated_create.py) and _resource_not_exists
(in vm/_actions.py).
get_folded_parameter_validator
uses **resource_id_parts
and there is always a subscription
in the parts.
And I have updated the call in _resource_not_exists
accordingly.
Related command
az network lb create
Description
Resolve #28003
Support cross subscription resource id for
--subnet
and--public-ip-address
Testing Guide
network lb create -g myRG -n myLB --subnet SubnetId --sku Standard
network lb create -g myRG -n myLB --public-ip-address PublicIpAddressId --sku Standard
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.