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
Original file line number Diff line number Diff line change
Expand Up @@ -348,6 +348,8 @@
short-summary: The replication schedule, e.g. "_10minutely, hourly, daily, weekly, monthly"
- name: --tags
short-summary: Space-separated tags in `key[=value]` format
- name: --snapshot-id
short-summary: Create a volume created from this snapshot. UUID v4 or resource identifier used to identify the Snapshot. example snapshot_id "9760acf5-4638-11e7-9bdb-020073ca3333"
examples:
- name: Create an ANF volume
text: >
Expand Down
5 changes: 3 additions & 2 deletions src/azure-cli/azure/cli/command_modules/netappfiles/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def patch_pool(cmd, instance, size=None, service_level=None, tags=None):

# -- volume --
# pylint: disable=too-many-locals
def create_volume(cmd, client, account_name, pool_name, volume_name, resource_group_name, location, file_path, usage_threshold, vnet, subnet='default', service_level=None, protocol_types=None, volume_type=None, endpoint_type=None, replication_schedule=None, remote_volume_resource_id=None, tags=None):
def create_volume(cmd, client, account_name, pool_name, volume_name, resource_group_name, location, file_path, usage_threshold, vnet, subnet='default', service_level=None, protocol_types=None, volume_type=None, endpoint_type=None, replication_schedule=None, remote_volume_resource_id=None, tags=None, snapshot_id=None):
subs_id = get_subscription_id(cmd.cli_ctx)

# determine vnet - supplied value can be name or ARM resource Id
Expand Down Expand Up @@ -148,7 +148,8 @@ def create_volume(cmd, client, account_name, pool_name, volume_name, resource_gr
export_policy=volume_export_policy,
volume_type=volume_type,
data_protection=data_protection,
tags=tags)
tags=tags,
snapshot_id=snapshot_id)

return client.create_or_update(body, resource_group_name, account_name, pool_name, volume_name)

Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-02-20T15%3A35%3A11.9294844Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Creating"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-05-13T14%3A12%3A19.9697432Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Creating"}}'
headers:
access-control-expose-headers:
- Request-Context
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/be000641-c1b4-4e96-bf23-016ab3715b4a?api-version=2019-10-01
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/60349eec-8a13-4098-919e-f36c11f10b2e?api-version=2019-10-01
cache-control:
- no-cache
content-length:
- '457'
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:12 GMT
- Wed, 13 May 2020 14:12:21 GMT
etag:
- W/"datetime'2020-02-20T15%3A35%3A11.9294844Z'"
- W/"datetime'2020-05-13T14%3A12%3A19.9697432Z'"
expires:
- '-1'
pragma:
Expand All @@ -54,7 +54,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1197'
- '1190'
x-powered-by:
- ASP.NET
status:
Expand All @@ -74,13 +74,13 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/be000641-c1b4-4e96-bf23-016ab3715b4a?api-version=2019-10-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/60349eec-8a13-4098-919e-f36c11f10b2e?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/be000641-c1b4-4e96-bf23-016ab3715b4a","name":"be000641-c1b4-4e96-bf23-016ab3715b4a","status":"Succeeded","startTime":"2020-02-20T15:35:11.5055337Z","endTime":"2020-02-20T15:35:12.7553271Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/60349eec-8a13-4098-919e-f36c11f10b2e","name":"60349eec-8a13-4098-919e-f36c11f10b2e","status":"Succeeded","startTime":"2020-05-13T14:12:19.4659299Z","endTime":"2020-05-13T14:12:20.7472419Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
headers:
access-control-expose-headers:
- Request-Context
Expand All @@ -91,7 +91,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:43 GMT
- Wed, 13 May 2020 14:12:52 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -127,13 +127,13 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-02-20T15%3A35%3A12.6461585Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-05-13T14%3A12%3A20.6464005Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Succeeded"}}'
headers:
access-control-expose-headers:
- Request-Context
Expand All @@ -144,9 +144,9 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:43 GMT
- Wed, 13 May 2020 14:12:52 GMT
etag:
- W/"datetime'2020-02-20T15%3A35%3A12.6461585Z'"
- W/"datetime'2020-05-13T14%3A12%3A20.6464005Z'"
expires:
- '-1'
pragma:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,30 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-02-20T15%3A35%3A12.1036493Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Creating"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-05-13T14%3A13%3A41.9771119Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Succeeded"}}'
headers:
access-control-expose-headers:
- Request-Context
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/c01e3198-34e1-4e83-9340-e014c17d808c?api-version=2019-10-01
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/ad65be72-9552-419c-b00c-8d35c86ad973?api-version=2019-10-01
cache-control:
- no-cache
content-length:
- '457'
- '458'
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:11 GMT
- Wed, 13 May 2020 14:13:43 GMT
etag:
- W/"datetime'2020-02-20T15%3A35%3A12.1036493Z'"
- W/"datetime'2020-05-13T14%3A13%3A41.9771119Z'"
expires:
- '-1'
pragma:
Expand All @@ -54,7 +54,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1199'
- '1191'
x-powered-by:
- ASP.NET
status:
Expand All @@ -74,13 +74,13 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/c01e3198-34e1-4e83-9340-e014c17d808c?api-version=2019-10-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/ad65be72-9552-419c-b00c-8d35c86ad973?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/c01e3198-34e1-4e83-9340-e014c17d808c","name":"c01e3198-34e1-4e83-9340-e014c17d808c","status":"Succeeded","startTime":"2020-02-20T15:35:11.6689414Z","endTime":"2020-02-20T15:35:12.8667209Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westus2stage/operationResults/ad65be72-9552-419c-b00c-8d35c86ad973","name":"ad65be72-9552-419c-b00c-8d35c86ad973","status":"Succeeded","startTime":"2020-05-13T14:13:41.4666298Z","endTime":"2020-05-13T14:13:42.7657893Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
headers:
access-control-expose-headers:
- Request-Context
Expand All @@ -91,7 +91,7 @@ interactions:
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:42 GMT
- Wed, 13 May 2020 14:14:13 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -127,26 +127,26 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/3.6.4 (Darwin-19.2.0-x86_64-i386-64bit) msrest/0.6.11 msrest_azure/0.6.2
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.0.81
- python/3.7.5 (Windows-10-10.0.18362-SP0) msrest/0.6.11 msrest_azure/0.6.3
azure-mgmt-netapp/0.8.0 Azure-SDK-For-Python AZURECLI/2.5.1
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-10-01
response:
body:
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-02-20T15%3A35%3A12.7652717Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Succeeded"}}'
string: '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_netappfiles_test_pool_000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2020-05-13T14%3A13%3A42.654766Z''\"","location":"westus2stage","properties":{"name":"cli-acc-000002","provisioningState":"Succeeded"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- '458'
- '457'
content-type:
- application/json; charset=utf-8
date:
- Thu, 20 Feb 2020 15:35:43 GMT
- Wed, 13 May 2020 14:14:13 GMT
etag:
- W/"datetime'2020-02-20T15%3A35%3A12.7652717Z'"
- W/"datetime'2020-05-13T14%3A13%3A42.654766Z'"
expires:
- '-1'
pragma:
Expand Down
Loading