-
Notifications
You must be signed in to change notification settings - Fork 3.3k
{Network} Network support extendedLocation #17623
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -111,6 +111,7 @@ def load_arguments(self, _): | |
| help='Space-separated list of availability zones into which to provision the resource.', | ||
| choices=['1', '2', '3'] | ||
| ) | ||
| edge_zone = CLIArgumentType(help='The name of edge zone.', is_preview=True, min_api='2020-08-01') | ||
|
|
||
| # region NetworkRoot | ||
| with self.argument_context('network') as c: | ||
|
|
@@ -857,6 +858,7 @@ def load_arguments(self, _): | |
| c.argument('manual_request', help="Use manual request to establish the connection. Configure it as 'true' when you don't have access to the subscription of private link service.", arg_type=get_three_state_flag()) | ||
| c.argument('connection_name', help='Name of the private link service connection.') | ||
| c.ignore('expand') | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| with self.argument_context('network private-endpoint dns-zone-group') as c: | ||
| c.argument('private_dns_zone', help='Name or ID of the private dns zone.', validator=validate_private_dns_zone) | ||
|
|
@@ -877,6 +879,7 @@ def load_arguments(self, _): | |
| c.argument('fqdns', nargs='+', help='Space-separated list of FQDNs.') | ||
| c.argument('location', get_location_type(self.cli_ctx), validator=get_default_location_from_resource_group) | ||
| c.argument('enable_proxy_protocol', help='Enable proxy protocol for private link service.', arg_type=get_three_state_flag(), min_api='2019-09-01') | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| with self.argument_context('network private-link-service', arg_group='IP Configuration') as c: | ||
| c.argument('private_ip_address', private_ip_address_type) | ||
|
|
@@ -941,6 +944,7 @@ def load_arguments(self, _): | |
| c.argument('frontend_ip_zone', zone_type, min_api='2017-06-01', options_list=['--frontend-ip-zone'], help='used to create internal facing Load balancer') | ||
| c.argument('validate', help='Generate and validate the ARM template without creating any resources.', action='store_true') | ||
| c.argument('sku', min_api='2017-08-01', help='Load balancer SKU', arg_type=get_enum_type(LoadBalancerSkuName, default='basic')) | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| with self.argument_context('network lb create', arg_group='Public IP') as c: | ||
| public_ip_help = get_folded_parameter_help_string('public IP address', allow_none=True, allow_new=True) | ||
|
|
@@ -1127,6 +1131,7 @@ def load_arguments(self, _): | |
| with self.argument_context('network nic create') as c: | ||
| c.argument('private_ip_address_version', min_api='2016-09-01', help='The private IP address version to use.', default=IPVersion.I_PV4.value if IPVersion else '') | ||
| c.argument('network_interface_name', nic_type, options_list=['--name', '-n'], id_part=None) | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| public_ip_help = get_folded_parameter_help_string('public IP address', allow_none=True, default_none=True) | ||
| c.argument('public_ip_address', help=public_ip_help, completer=get_resource_name_completion_list('Microsoft.Network/publicIPAddresses')) | ||
|
|
@@ -1687,6 +1692,7 @@ def load_arguments(self, _): | |
| c.argument('sku', min_api='2017-08-01', help='Name of a public IP address SKU', arg_type=get_enum_type(PublicIPAddressSkuName)) | ||
| c.argument('tier', min_api='2020-07-01', help='Tier of a public IP address SKU and Global tier is only supported for standard SKU public IP addresses', arg_type=get_enum_type(PublicIPAddressSkuTier)) | ||
| c.ignore('dns_name_type') | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| for item in ['create', 'update']: | ||
| with self.argument_context('network public-ip {}'.format(item)) as c: | ||
|
|
@@ -1707,6 +1713,7 @@ def load_arguments(self, _): | |
| c.argument('zone', zone_compatible_type, min_api='2020-08-01') | ||
|
|
||
| with self.argument_context('network public-ip prefix create') as c: | ||
| c.argument('edge_zone', edge_zone) | ||
| c.argument('version', min_api='2019-08-01', help='IP address type.', arg_type=get_enum_type(IPVersion, 'ipv4')) | ||
| # endregion | ||
|
|
||
|
|
@@ -1829,6 +1836,7 @@ def load_arguments(self, _): | |
| c.argument('location', get_location_type(self.cli_ctx)) | ||
| c.argument('vnet_name', virtual_network_name_type, options_list=['--name', '-n'], completer=None, | ||
| local_context_attribute=LocalContextAttribute(name='vnet_name', actions=[LocalContextAction.SET], scopes=[ALL])) | ||
| c.argument('edge_zone', edge_zone) | ||
|
|
||
| with self.argument_context('network vnet create', arg_group='Subnet') as c: | ||
| c.argument('subnet_name', help='Name of a new subnet to create within the VNet.', | ||
|
|
@@ -1925,6 +1933,7 @@ def load_arguments(self, _): | |
| vnet_help = "Name or ID of an existing virtual network which has a subnet named 'GatewaySubnet'." | ||
| c.argument('virtual_network', options_list='--vnet', help=vnet_help) | ||
| c.argument('vpn_gateway_generation', arg_type=get_enum_type(['Generation1', 'Generation2']), min_api='2019-07-01', help='The generation for the virtual network gateway. vpn_gateway_generation should not be provided if gateway_type is not Vpn.') | ||
| c.ignore('edge_zone') # wait for service ready | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you need to expose this parameter as service not ready?
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 'az network vnet-gateway create' need new swagger : https://github.com/Azure/azure-rest-api-specs/pull/13864/files
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It is ignored. So customers could not use it.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I think customer can see it in command help message. Why not expose it when service is ready? |
||
|
|
||
| with self.argument_context('network vnet-gateway update') as c: | ||
| c.argument('enable_bgp', help='Enable BGP (Border Gateway Protocol)', arg_group='BGP Peering', arg_type=get_enum_type(['true', 'false'])) | ||
|
|
||
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.
You could use this type for edge zone and add min_api version for your parameter
azure-cli/src/azure-cli-core/azure/cli/core/commands/parameters.py
Line 251 in 3f3aafd