Skip to content

Commit

Permalink
record the tst
Browse files Browse the repository at this point in the history
  • Loading branch information
Myron committed Feb 6, 2020
1 parent b99f57b commit cd10054
Show file tree
Hide file tree
Showing 4 changed files with 404 additions and 586 deletions.
1 change: 1 addition & 0 deletions src/azure-cli/azure/cli/command_modules/network/_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -760,6 +760,7 @@ def load_arguments(self, _):
c.argument('private_endpoint_connections', nargs='+', help='Space-separated list of private endpoint connections.')
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')

with self.argument_context('network private-link-service', arg_group='IP Configuration') as c:
c.argument('private_ip_address', private_ip_address_type)
Expand Down
9 changes: 6 additions & 3 deletions src/azure-cli/azure/cli/command_modules/network/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -2454,7 +2454,8 @@ def create_private_link_service(cmd, resource_group_name, service_name, subnet,
private_ip_address_version=None,
virtual_network_name=None, public_ip_address=None,
location=None, tags=None, load_balancer_name=None,
visibility=None, auto_approval=None, fqdns=None):
visibility=None, auto_approval=None, fqdns=None,
enable_proxy_protocol=None):
client = network_client_factory(cmd.cli_ctx).private_link_services
FrontendIPConfiguration, PrivateLinkService, PrivateLinkServiceIpConfiguration, PublicIPAddress, Subnet = \
cmd.get_models('FrontendIPConfiguration', 'PrivateLinkService', 'PrivateLinkServiceIpConfiguration',
Expand All @@ -2476,13 +2477,14 @@ def create_private_link_service(cmd, resource_group_name, service_name, subnet,
visbility=visibility,
auto_approval=auto_approval,
fqdns=fqdns,
tags=tags
tags=tags,
enable_proxy_protocol=enable_proxy_protocol
)
return client.create_or_update(resource_group_name, service_name, link_service)


def update_private_link_service(instance, cmd, tags=None, frontend_ip_configurations=None, load_balancer_name=None,
visibility=None, auto_approval=None, fqdns=None):
visibility=None, auto_approval=None, fqdns=None, enable_proxy_protocol=None):
FrontendIPConfiguration = cmd.get_models('FrontendIPConfiguration')
with cmd.update_context(instance) as c:
c.set_param('tags', tags)
Expand All @@ -2492,6 +2494,7 @@ def update_private_link_service(instance, cmd, tags=None, frontend_ip_configurat
c.set_param('visibility', visibility)
c.set_param('auto_approval', auto_approval)
c.set_param('fqdns', fqdns)
c.set_param('enable_proxy_protocol', enable_proxy_protocol)
return instance


Expand Down
Loading

0 comments on commit cd10054

Please sign in to comment.