Skip to content

{Network} workaround for load balancers about change of 'zone'#17088

Merged
msyyc merged 3 commits intoAzure:devfrom
msyyc:network-bump-fix-for-loadbalancer-2020-08-01
Feb 25, 2021
Merged

{Network} workaround for load balancers about change of 'zone'#17088
msyyc merged 3 commits intoAzure:devfrom
msyyc:network-bump-fix-for-loadbalancer-2020-08-01

Conversation

@msyyc
Copy link
Member

@msyyc msyyc commented Feb 25, 2021

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.

@yonzhan
Copy link
Collaborator

yonzhan commented Feb 25, 2021

Network

@yonzhan yonzhan added this to the S183 - For Ignite milestone Feb 25, 2021
Comment on lines +3315 to +3316
if item.zones is not None and len(item.zones) >= 3:
item.zones = None
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If user set zones [1, 2, 3] on purpose, the output of zones will be None?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have a test and it does not influence.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can user set zones as [1, 2, 3] in current version? If they can what's the response now?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(1)'zones' don't support input more than 1

@msyyc msyyc merged commit 6075b8a into Azure:dev Feb 25, 2021
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)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be delete_lb_resource_property_entry_

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:
Copy link
Member

@jsntcy jsntcy Feb 25, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible that zones is [1, 2], [1, 2, 3, 4]?
Is it possible that lb.frontend_ip_configurations is None?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants