Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
support --no-wait for 'search create' and 'search shared-private-link…
…-resource create'
  • Loading branch information
Bolun Huang committed Mar 25, 2021
commit ac87ef2bac2cd94a9155cadf89013ae3c77cb396
10 changes: 6 additions & 4 deletions src/azure-cli/azure/cli/command_modules/search/commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,9 @@ def load_command_table(self, _):
g.command('list', 'list_by_resource_group')
g.show_command('show', 'get')
g.command('delete', 'delete', confirmation=True)
g.generic_update_command('update', custom_func_name='update_search_service', setter_name='begin_create_or_update', setter_arg_name='service')
g.custom_command('create', 'create_search_service')
g.generic_update_command('update', supports_no_wait=True, custom_func_name='update_search_service', setter_name='begin_create_or_update', setter_arg_name='service')
g.custom_command('create', 'create_search_service', supports_no_wait=True)
g.wait_command('wait')

with self.command_group('search private-endpoint-connection', search_private_endpoint_connections_sdk) as g:
g.command('list', 'list_by_service')
Expand All @@ -62,8 +63,9 @@ def load_command_table(self, _):
g.command('list', 'list_by_service')
g.show_command('show', 'get')
g.command('delete', 'begin_delete', confirmation=True)
g.custom_command('create', 'create_shared_private_link_resource')
g.custom_command('update', 'update_shared_private_link_resource')
g.custom_command('create', 'create_shared_private_link_resource', supports_no_wait=True)
g.custom_command('update', 'update_shared_private_link_resource', supports_no_wait=True)
g.wait_command('wait')

with self.command_group('search admin-key', search_admin_keys_sdk) as g:
g.show_command('show', 'get')
Expand Down
18 changes: 9 additions & 9 deletions src/azure-cli/azure/cli/command_modules/search/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create_search_service(cmd, resource_group_name, search_service_name, sku, lo
:param public_network_access: Public accessibility to the search service;
allowed values are "enabled" or "disabled".
:param ip_rules: Public IP(v4) addresses or CIDR ranges to the search service, seperated by comma or semicolon;
These IP rules are applicable only when public_network_access is "enabled".
these IP rules are applicable only when --public-network-access is "enabled".
:param identity_type: The identity type; possible values include: "None", "SystemAssigned".
"""
from azure.mgmt.search.models import SearchService, Sku, NetworkRuleSet, IpRule, Identity
Expand Down Expand Up @@ -76,7 +76,7 @@ def update_search_service(instance, partition_count=0, replica_count=0, public_n
:param public_network_access: Public accessibility to the search service;
allowed values are "enabled" or "disabled".
:param ip_rules: Public IP(v4) addresses or CIDR ranges to the search service, seperated by comma(',') or
semicolon(';'); If spaces (ex - ' '), ',' or ';' is provided, any existing IP rule will be
semicolon(';'); If spaces (' '), ',' or ';' is provided, any existing IP rule will be
nullified and no public IP rule is applied. These IP rules are applicable only when
public_network_access is "enabled".
:param identity_type: The identity type; possible values include: "None", "SystemAssigned".
Expand Down Expand Up @@ -117,8 +117,8 @@ def update_private_endpoint_connection(cmd, resource_group_name, search_service_

:param resource_group_name: Name of resource group.
:param search_service_name: Name of the search service.
:param private_endpoint_connection_name: Name of the private endpoint connection resource.
Ex - {the name of the private endpoint resource}.{guid}.
:param private_endpoint_connection_name: Name of the private endpoint connection resource;
for example: {the name of the private endpoint resource}.{guid}.
:param private_link_service_connection_status: The updated status of the private endpoint connection resource.
Possible values include: "Pending", "Approved", "Rejected", "Disconnected".
:param private_link_service_connection_description: Custom description when updating
Expand Down Expand Up @@ -158,9 +158,9 @@ def create_shared_private_link_resource(cmd, resource_group_name, search_service
:param search_service_name: Name of the search service.
:param shared_private_link_resource_name: Name of the shared private link resource.
:param shared_private_link_resource_id: Fully qualified resource ID for the resource.
Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/
for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/
{resourceProviderNamespace}/{resourceType}/{resourceName}.
:param shared_private_link_resource_group_id: The group id of the resource. Ex, blob, sql or vault.
:param shared_private_link_resource_group_id: The group id of the resource; for example: blob, sql or vault.
:param shared_private_link_resource_request_message: Custom request message when creating or updating the shared
privatelink resources.
"""
Expand Down Expand Up @@ -190,10 +190,10 @@ def update_shared_private_link_resource(cmd, resource_group_name, search_service
:param resource_group_name: Name of resource group.
:param search_service_name: Name of the search service.
:param shared_private_link_resource_name: Name of the shared private link resource.
:param shared_private_link_resource_id: Fully qualified resource ID for the resource.
Ex - /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/
:param shared_private_link_resource_id: Fully qualified resource ID for the resource;
for example: /subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/
{resourceProviderNamespace}/{resourceType}/{resourceName}.
:param shared_private_link_resource_group_id: The group id of the resource. Ex, blob, sql or vault.
:param shared_private_link_resource_group_id: The group id of the resource; for example: blob, sql or vault.
:param shared_private_link_resource_request_message: Custom request message when creating or updating the shared
privatelink resources.
"""
Expand Down