{Network} workaround for load balancers about change of 'zone'#17088
{Network} workaround for load balancers about change of 'zone'#17088
Conversation
|
Network |
| if item.zones is not None and len(item.zones) >= 3: | ||
| item.zones = None |
There was a problem hiding this comment.
If user set zones [1, 2, 3] on purpose, the output of zones will be None?
There was a problem hiding this comment.
I have a test and it does not influence.
There was a problem hiding this comment.
Can user set zones as [1, 2, 3] in current version? If they can what's the response now?
There was a problem hiding this comment.
(1)'zones' don't support input more than 1
| if next((x for x in getattr(result, prop) or [] if x.name.lower() == item_name.lower()), None): | ||
| raise CLIError("Failed to delete '{}' on '{}'".format(item_name, resource_name)) | ||
|
|
||
| func_name = 'delete_network_resource_property_entry_{}_{}'.format(resource, prop) |
There was a problem hiding this comment.
Should be delete_lb_resource_property_entry_
There was a problem hiding this comment.
good job. Will be fixed in another PR
| # workaround for : https://github.com/Azure/azure-cli/issues/17071 | ||
| def lb_get_operation(lb): | ||
| for item in lb.frontend_ip_configurations: | ||
| if item.zones is not None and len(item.zones) >= 3: |
There was a problem hiding this comment.
Is it possible that zones is [1, 2], [1, 2, 3, 4]?
Is it possible that lb.frontend_ip_configurations is None?
There was a problem hiding this comment.
(1)'zones' don't support input more than 1
(2)'frontend_ip_configurations' will not be None when get. Because it will be set to default value even customers do not set any parameters
Description
#17071
replace 'zone=[1,2,3]' with 'zone=null' to avoid breaking change for existing cmd.
Testing Guide
test_network_lb_sku
test_network_private_endpoints
test_network_lb_zone
test_network_cross_region_lb_address_pool
test_network_cross_region_lb_address_pool_addresses
test_network_lb
test_network_load_balancer_ip_config
test_network_lb_nat_rules
test_network_lb_nat_pools
test_network_lb_address_pool
test_network_lb_address_pool_addresses
test_network_lb_probes
test_network_lb_rules
test_network_nic
test_network_nic_app_gateway
test_network_nic_lb_address_pools
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 feature.
This 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.