1616from azure .cli .core .commands .template_create import get_folded_parameter_help_string
1717from azure .cli .core .local_context import LocalContextAttribute , LocalContextAction , ALL
1818from azure .cli .command_modules .network ._validators import (
19- dns_zone_name_type , validate_cert , validate_inbound_nat_rule_id_list ,
19+ dns_zone_name_type , validate_inbound_nat_rule_id_list ,
2020 validate_address_pool_id_list , validate_inbound_nat_rule_name_or_id ,
2121 validate_address_pool_name_or_id , load_cert_file , validate_metadata ,
2222 validate_dns_record_type , validate_target_listener ,
3333 validate_user_assigned_identity , validate_virtul_network_gateway ,
3434 NWConnectionMonitorEndpointFilterItemAction , NWConnectionMonitorTestConfigurationHTTPRequestHeaderAction ,
3535 process_private_link_resource_id_argument , process_private_endpoint_connection_id_argument ,
36- validate_vpn_connection_name_or_id ,
37- process_vnet_name_or_id , validate_trusted_client_cert )
36+ validate_vpn_connection_name_or_id , process_vnet_name_or_id )
3837from azure .cli .command_modules .network ._completers import (
3938 subnet_completion_list , get_lb_subresource_completion_list , get_ag_subresource_completion_list ,
4039 ag_url_map_rule_completion_list , tm_endpoint_completion_list , get_sdk_completer )
@@ -180,10 +179,8 @@ def load_arguments(self, _):
180179 c .argument ('capacity' , help = 'The number of instances to use with the application gateway.' , type = int )
181180
182181 ag_subresources = [
183- {'name' : 'auth-cert' , 'display' : 'authentication certificate' , 'ref' : 'authentication_certificates' },
184182 {'name' : 'frontend-ip' , 'display' : 'frontend IP configuration' , 'ref' : 'frontend_ip_configurations' },
185183 {'name' : 'frontend-port' , 'display' : 'frontend port' , 'ref' : 'frontend_ports' },
186- {'name' : 'address-pool' , 'display' : 'backend address pool' , 'ref' : 'backend_address_pools' },
187184 {'name' : 'http-settings' , 'display' : 'backed HTTP settings' , 'ref' : 'backend_http_settings_collection' },
188185 {'name' : 'http-listener' , 'display' : 'HTTP listener' , 'ref' : 'http_listeners' },
189186 {'name' : 'rule' , 'display' : 'request routing rule' , 'ref' : 'request_routing_rules' },
@@ -192,8 +189,6 @@ def load_arguments(self, _):
192189 {'name' : 'redirect-config' , 'display' : 'redirect configuration' , 'ref' : 'redirect_configurations' },
193190 {'name' : 'private-link' , 'display' : 'private link' , 'ref' : 'private_link_configurations' }
194191 ]
195- if self .supported_api_version (min_api = '2018-08-01' ):
196- ag_subresources .append ({'name' : 'root-cert' , 'display' : 'trusted root certificate' , 'ref' : 'trusted_root_certificates' })
197192 if self .supported_api_version (min_api = '2018-12-01' ):
198193 ag_subresources .append ({'name' : 'rewrite-rule set' , 'display' : 'rewrite rule set' , 'ref' : 'rewrite_rule_sets' })
199194 if self .supported_api_version (min_api = '2021-08-01' ):
@@ -219,16 +214,6 @@ def load_arguments(self, _):
219214 with self .argument_context ('network application-gateway {}' .format (item )) as c :
220215 c .argument ('connection_draining_timeout' , min_api = '2016-12-01' , type = int , help = 'The time in seconds after a backend server is removed during which on open connection remains active. Range: 0 (disabled) to 3600' , arg_group = 'Gateway' if item == 'create' else None )
221216
222- with self .argument_context ('network application-gateway address-pool' ) as c :
223- c .argument ('servers' , ag_servers_type , arg_group = None )
224-
225- for scope in ['auth-cert' , 'root-cert' ]:
226- with self .argument_context ('network application-gateway {}' .format (scope )) as c :
227- c .argument ('cert_data' , options_list = '--cert-file' , help = 'Certificate file path.' , type = file_type , completer = FilesCompleter (), validator = validate_cert )
228-
229- with self .argument_context ('network application-gateway root-cert' ) as c :
230- c .argument ('keyvault_secret' , help = 'KeyVault secret ID.' )
231-
232217 with self .argument_context ('network application-gateway frontend-ip create' ) as c :
233218 c .argument ('public_ip_address' , validator = get_public_ip_validator (), help = 'The name or ID of the public IP address.' , completer = get_resource_name_completion_list ('Microsoft.Network/publicIPAddresses' ))
234219
@@ -456,16 +441,6 @@ def load_arguments(self, _):
456441 with self .argument_context ('network application-gateway identity' , min_api = '2019-04-01' ) as c :
457442 c .argument ('application_gateway_name' , app_gateway_name_type )
458443
459- with self .argument_context ('network application-gateway client-cert' , min_api = '2020-06-01' , id_part = None ) as c :
460- c .argument ('application_gateway_name' , app_gateway_name_type )
461- c .argument ('client_cert_name' , options_list = '--name' , help = 'Name of the trusted client certificate that is unique within an Application Gateway' )
462-
463- with self .argument_context ('network application-gateway client-cert add' , min_api = '2020-06-01' ) as c :
464- c .argument ('client_cert_data' , options_list = '--data' , type = file_type , completer = FilesCompleter (), help = 'Certificate public data.' , validator = validate_trusted_client_cert )
465-
466- with self .argument_context ('network application-gateway client-cert update' , min_api = '2020-06-01' ) as c :
467- c .argument ('client_cert_data' , options_list = '--data' , type = file_type , completer = FilesCompleter (), help = 'Certificate public data.' , validator = validate_trusted_client_cert )
468-
469444 with self .argument_context ('network application-gateway show-backend-health' ) as c :
470445 c .argument ('expand' , help = 'Expands BackendAddressPool and BackendHttpSettings referenced in backend health.' )
471446
0 commit comments