Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
22 changes: 14 additions & 8 deletions src/azure-cli/azure/cli/command_modules/keyvault/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ def _permissions_distinct(permissions):

def set_policy(cmd, client, resource_group_name, vault_name,
object_id=None, spn=None, upn=None, key_permissions=None, secret_permissions=None,
certificate_permissions=None, storage_permissions=None):
certificate_permissions=None, storage_permissions=None, no_wait=False):
""" Update security policy settings for a Key Vault. """

VaultCreateOrUpdateParameters = cmd.get_models('VaultCreateOrUpdateParameters',
Expand Down Expand Up @@ -920,10 +920,12 @@ def set_policy(cmd, client, resource_group_name, vault_name,
parameters=VaultCreateOrUpdateParameters(
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties),
no_wait=no_wait)


def add_network_rule(cmd, client, resource_group_name, vault_name, ip_address=None, subnet=None, vnet_name=None): # pylint: disable=unused-argument
def add_network_rule(cmd, client, resource_group_name, vault_name, ip_address=None, subnet=None,
vnet_name=None, no_wait=False): # pylint: disable=unused-argument
""" Add a network rule to the network ACLs for a Key Vault. """

VirtualNetworkRule = cmd.get_models('VirtualNetworkRule', resource_type=ResourceType.MGMT_KEYVAULT)
Expand Down Expand Up @@ -965,10 +967,12 @@ def add_network_rule(cmd, client, resource_group_name, vault_name, ip_address=No
parameters=VaultCreateOrUpdateParameters(
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties),
no_wait=no_wait)


def remove_network_rule(cmd, client, resource_group_name, vault_name, ip_address=None, subnet=None, vnet_name=None): # pylint: disable=unused-argument
def remove_network_rule(cmd, client, resource_group_name, vault_name, ip_address=None, subnet=None,
vnet_name=None, no_wait=False): # pylint: disable=unused-argument
""" Remove a network rule from the network ACLs for a Key Vault. """

VaultCreateOrUpdateParameters = cmd.get_models('VaultCreateOrUpdateParameters',
Expand Down Expand Up @@ -1008,7 +1012,8 @@ def remove_network_rule(cmd, client, resource_group_name, vault_name, ip_address
parameters=VaultCreateOrUpdateParameters(
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties),
no_wait=no_wait)


def list_network_rules(cmd, client, resource_group_name, vault_name): # pylint: disable=unused-argument
Expand All @@ -1017,7 +1022,7 @@ def list_network_rules(cmd, client, resource_group_name, vault_name): # pylint:
return vault.properties.network_acls


def delete_policy(cmd, client, resource_group_name, vault_name, object_id=None, spn=None, upn=None):
def delete_policy(cmd, client, resource_group_name, vault_name, object_id=None, spn=None, upn=None, no_wait=False):
""" Delete security policy settings for a Key Vault. """
VaultCreateOrUpdateParameters = cmd.get_models('VaultCreateOrUpdateParameters',
resource_type=ResourceType.MGMT_KEYVAULT)
Expand Down Expand Up @@ -1048,7 +1053,8 @@ def delete_policy(cmd, client, resource_group_name, vault_name, object_id=None,
parameters=VaultCreateOrUpdateParameters(
location=vault.location,
tags=vault.tags,
properties=vault.properties))
properties=vault.properties),
no_wait=no_wait)
# endregion


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@ interactions:
dataserviceversion:
- 3.0;
date:
- Sat, 12 Sep 2020 05:27:58 GMT
- Tue, 15 Sep 2020 06:53:43 GMT
duration:
- '2283776'
- '2201599'
expires:
- '-1'
ocp-aad-diagnostics-server-name:
- r4tEev3be7u87PpO7+VPxPcExk2Mrz1MtcoSUZnMit4=
- h41duery3CPm5kxowuKN7pvEekwLyNG/wkcjkTUIbY0=
ocp-aad-session-key:
- VPMc8EG_38o54Ao2-kxg-AwEufsoZhY32dU2icfUWx7i_hdxrPzqweJvaTo3-5dy2jhtajUwCbffJCHFo6xluN75UUwPpCj7zPzaQq7XH1MQ7YrLe9kz4XHttx2XTAUk.PnIHMHXVlA1b_bGL5ntqHEInQQO3oxI2_Zdg1C44-Ew
- VdUDkwEtjuQlOhDjcDMOpmVyCZM-8s_UqfiOa3e9jLArJ0GG5VwJjZpPjAI6LuDtXNVjlob9TtNrEPmJ1YVYhBmxgT_A77rdTiIv9fX7f4DUl9djR_MkhHqgdG77xztc.Nu8NlaK2WdCTiSj8bjceK8LnK5-4d7FXJdjgEH1Mqoo
pragma:
- no-cache
request-id:
- 9b5a09e6-d42f-4632-8a2a-53b7b6df3690
- e21eae0a-228a-4276-aaf5-e03fecf75d93
strict-transport-security:
- max-age=31536000; includeSubDomains
x-aspnet-version:
Expand Down Expand Up @@ -97,7 +97,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:03 GMT
- Tue, 15 Sep 2020 06:53:50 GMT
expires:
- '-1'
pragma:
Expand All @@ -117,7 +117,7 @@ interactions:
x-ms-keyvault-service-version:
- 1.1.55.0
x-ms-ratelimit-remaining-subscription-writes:
- '1189'
- '1191'
x-powered-by:
- ASP.NET
status:
Expand Down Expand Up @@ -155,7 +155,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:05 GMT
- Tue, 15 Sep 2020 06:53:52 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -211,7 +211,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:05 GMT
- Tue, 15 Sep 2020 06:53:53 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -266,7 +266,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:06 GMT
- Tue, 15 Sep 2020 06:53:54 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -318,7 +318,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:07 GMT
- Tue, 15 Sep 2020 06:53:56 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -373,7 +373,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:09 GMT
- Tue, 15 Sep 2020 06:53:57 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -425,7 +425,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:10 GMT
- Tue, 15 Sep 2020 06:53:58 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -477,7 +477,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:11 GMT
- Tue, 15 Sep 2020 06:53:59 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -529,7 +529,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:12 GMT
- Tue, 15 Sep 2020 06:54:00 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -582,7 +582,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:14 GMT
- Tue, 15 Sep 2020 06:54:01 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -633,7 +633,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Sat, 12 Sep 2020 05:28:15 GMT
- Tue, 15 Sep 2020 06:54:01 GMT
expires:
- '-1'
pragma:
Expand Down
Loading