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
1 change: 1 addition & 0 deletions src/azure-cli/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ Release History

**NetAppFiles**

* Update for R4.5 version of the RP and API version 2019-06-01 including provision of protocol types.
* Initial version relating to the R4 version of the RP.

**Profile**
Expand Down
4 changes: 3 additions & 1 deletion src/azure-cli/azure/cli/command_modules/netappfiles/_help.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,12 +254,14 @@
short-summary: The vnet for the volume
- name: --subnet
short-summary: The subnet. If omitted 'default' will be used
- name: --protocol-types
short-summary: Space seperated list of protocols that the volume can use
- name: --tags
short-summary: Space-separated tags in `key[=value]` format
examples:
- name: Create an ANF volume
text: >
az netappfiles volume create -g mygroup --account-name myaccname --pool-name mypoolname --name myvolname -l westus2 --service-level premium --usage-threshold 100 --creation-token "unique-file-path" --vnet myvnet --subnet mysubnet
az netappfiles volume create -g mygroup --account-name myaccname --pool-name mypoolname --name myvolname -l westus2 --service-level premium --usage-threshold 100 --creation-token "unique-file-path" --vnet myvnet --subnet mysubnet --protocol-types NFSv3 NFSv4
"""

helps['netappfiles volume update'] = """
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ def load_arguments(self, _):
with self.argument_context('netappfiles') as c:
c.argument('resource_group', resource_group_name_type)
c.argument('tags', arg_type=tags_type)
c.argument('protocol_types', arg_type=tags_type)
c.argument('account_name', account_name_type)
c.argument('pool_name', pool_name_type)
c.argument('volume_name', volume_name_type)
Expand Down
8 changes: 4 additions & 4 deletions src/azure-cli/azure/cli/command_modules/netappfiles/custom.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,7 @@ def patch_pool(cmd, instance, size=None, service_level=None, tags=None):
_update_mapper(instance, body, ['service_level', 'size', 'tags'])
return body


def create_volume(cmd, client, account_name, pool_name, volume_name, resource_group_name, location, creation_token, usage_threshold, vnet, subnet='default', service_level=None, tags=None):
def create_volume(cmd, client, account_name, pool_name, volume_name, resource_group_name, location, creation_token, usage_threshold, vnet, subnet='default', service_level=None, protocol_types=None, tags=None):
subs_id = get_subscription_id(cmd.cli_ctx)
subnet_id = "/subscriptions/%s/resourceGroups/%s/providers/Microsoft.Network/virtualNetworks/%s/subnets/%s" % (subs_id, resource_group_name, vnet, subnet)
body = Volume(
Expand All @@ -97,16 +96,17 @@ def create_volume(cmd, client, account_name, pool_name, volume_name, resource_gr
service_level=service_level,
location=location,
subnet_id=subnet_id,
protocol_types=protocol_types,
tags=tags)

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


# volume update
def patch_volume(cmd, instance, usage_threshold=None, service_level=None, tags=None):
def patch_volume(cmd, instance, usage_threshold=None, service_level=None, protocol_types=None, tags=None):
params = VolumePatch(
usage_threshold=None if usage_threshold is None else int(usage_threshold) * gib_scale,
service_level=service_level,
protocol_types=protocol_types,
tags=tags)
_update_mapper(instance, params, ['service_level', 'usage_threshold', 'tags'])
return params
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
@@ -1,56 +1,6 @@
interactions:
- request:
body: !!python/unicode '{"location": "westus", "tags": {"date": "2019-05-31T16:20:02Z",
"product": "azurecli", "cause": "automation"}}'
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group create
Connection:
- keep-alive
Content-Length:
- '110'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --location --name --tag
User-Agent:
- python/2.7.10 (Darwin-16.7.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34
resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.56
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_tests_rg000001?api-version=2018-05-01
response:
body:
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001","name":"cli_tests_rg000001","location":"westus","tags":{"date":"2019-05-31T16:20:02Z","product":"azurecli","cause":"automation"},"properties":{"provisioningState":"Succeeded"}}'
headers:
cache-control:
- no-cache
content-length:
- '384'
content-type:
- application/json; charset=utf-8
date:
- Fri, 31 May 2019 16:20:06 GMT
expires:
- '-1'
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1196'
status:
code: 201
message: Created
- request:
body: !!python/unicode '{"location": "eastus2"}'
body: !!python/unicode '{"location": "westcentralus"}'
headers:
Accept:
- application/json
Expand All @@ -61,36 +11,36 @@ interactions:
Connection:
- keep-alive
Content-Length:
- '23'
- '29'
Content-Type:
- application/json; charset=utf-8
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/2.7.10 (Darwin-16.7.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34
azure-mgmt-netapp/0.4.0 Azure-SDK-For-Python AZURECLI/2.0.56
- python/2.7.10 (Darwin-17.7.0-x86_64-i386-64bit) msrest/0.6.8 msrest_azure/0.6.1
azure-mgmt-netapp/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.68
accept-language:
- en-US
method: PUT
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-05-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-06-01
response:
body:
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2019-05-31T16%3A20%3A12.3929272Z''\"","location":"eastus2","properties":{"provisioningState":"Succeeded","name":"cli-acc-000002"}}'
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2019-07-12T12%3A50%3A51.4651718Z''\"","location":"westcentralus","properties":{"provisioningState":"Succeeded","name":"cli-acc-000002"}}'
headers:
access-control-expose-headers:
- Request-Context
azure-asyncoperation:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus2/operationResults/371476ff-f7e4-45cb-b2e2-03f045342f86?api-version=2019-05-01
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westcentralus/operationResults/01e9a1ef-63f1-4a5a-8fb6-79d04596c40c?api-version=2019-06-01
cache-control:
- no-cache
content-length:
- '453'
- '459'
content-type:
- application/json; charset=utf-8
date:
- Fri, 31 May 2019 16:20:13 GMT
- Fri, 12 Jul 2019 12:50:51 GMT
etag:
- W/"datetime'2019-05-31T16%3A20%3A12.3929272Z'"
- W/"datetime'2019-07-12T12%3A50%3A51.4651718Z'"
expires:
- '-1'
pragma:
Expand All @@ -104,7 +54,7 @@ interactions:
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-writes:
- '1198'
- '1199'
x-powered-by:
- ASP.NET
status:
Expand All @@ -124,24 +74,24 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/2.7.10 (Darwin-16.7.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34
azure-mgmt-netapp/0.4.0 Azure-SDK-For-Python AZURECLI/2.0.56
- python/2.7.10 (Darwin-17.7.0-x86_64-i386-64bit) msrest/0.6.8 msrest_azure/0.6.1
azure-mgmt-netapp/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.68
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus2/operationResults/371476ff-f7e4-45cb-b2e2-03f045342f86?api-version=2019-05-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westcentralus/operationResults/01e9a1ef-63f1-4a5a-8fb6-79d04596c40c?api-version=2019-06-01
response:
body:
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/eastus2/operationResults/371476ff-f7e4-45cb-b2e2-03f045342f86","name":"371476ff-f7e4-45cb-b2e2-03f045342f86","status":"Succeeded","startTime":"2019-05-31T16:20:12.2776486Z","endTime":"2019-05-31T16:20:12.4660675Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.NetApp/locations/westcentralus/operationResults/01e9a1ef-63f1-4a5a-8fb6-79d04596c40c","name":"01e9a1ef-63f1-4a5a-8fb6-79d04596c40c","status":"Succeeded","startTime":"2019-07-12T12:50:51.3236001Z","endTime":"2019-07-12T12:50:51.7769315Z","percentComplete":100.0,"properties":{"resourceName":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- '576'
- '582'
content-type:
- application/json; charset=utf-8
date:
- Fri, 31 May 2019 16:20:45 GMT
- Fri, 12 Jul 2019 12:51:23 GMT
expires:
- '-1'
pragma:
Expand Down Expand Up @@ -177,26 +127,26 @@ interactions:
ParameterSetName:
- --resource-group --account-name -l
User-Agent:
- python/2.7.10 (Darwin-16.7.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34
azure-mgmt-netapp/0.4.0 Azure-SDK-For-Python AZURECLI/2.0.56
- python/2.7.10 (Darwin-17.7.0-x86_64-i386-64bit) msrest/0.6.8 msrest_azure/0.6.1
azure-mgmt-netapp/0.5.0 Azure-SDK-For-Python AZURECLI/2.0.68
method: GET
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-05-01
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002?api-version=2019-06-01
response:
body:
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2019-05-31T16%3A20%3A12.5900679Z''\"","location":"eastus2","properties":{"provisioningState":"Succeeded","name":"cli-acc-000002"}}'
string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/cli_tests_rg000001/providers/Microsoft.NetApp/netAppAccounts/cli-acc-000002","name":"cli-acc-000002","type":"Microsoft.NetApp/netAppAccounts","etag":"W/\"datetime''2019-07-12T12%3A50%3A51.7643816Z''\"","location":"westcentralus","properties":{"provisioningState":"Succeeded","name":"cli-acc-000002"}}'
headers:
access-control-expose-headers:
- Request-Context
cache-control:
- no-cache
content-length:
- '453'
- '459'
content-type:
- application/json; charset=utf-8
date:
- Fri, 31 May 2019 16:20:48 GMT
- Fri, 12 Jul 2019 12:51:26 GMT
etag:
- W/"datetime'2019-05-31T16%3A20%3A12.5900679Z'"
- W/"datetime'2019-07-12T12%3A50%3A51.7643816Z'"
expires:
- '-1'
pragma:
Expand All @@ -218,51 +168,4 @@ interactions:
status:
code: 200
message: OK
- request:
body: null
headers:
Accept:
- application/json
Accept-Encoding:
- gzip, deflate
CommandName:
- group delete
Connection:
- keep-alive
Content-Length:
- '0'
ParameterSetName:
- --name --yes --no-wait
User-Agent:
- python/2.7.10 (Darwin-16.7.0-x86_64-i386-64bit) msrest/0.6.6 msrest_azure/0.4.34
resourcemanagementclient/2.1.0 Azure-SDK-For-Python AZURECLI/2.0.56
accept-language:
- en-US
method: DELETE
uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/cli_tests_rg000001?api-version=2018-05-01
response:
body:
string: !!python/unicode ''
headers:
cache-control:
- no-cache
content-length:
- '0'
date:
- Fri, 31 May 2019 16:20:54 GMT
expires:
- '-1'
location:
- https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/operationresults/eyJqb2JJZCI6IlJFU09VUkNFR1JPVVBERUxFVElPTkpPQi1DTEk6NUZURVNUUzo1RlJHTFJRTFlPUDJTMkJMVE5HN0QzNkxRTTRIUFNVRFlRTXwxMzYyMzIyNUU2MzBCRkI2LVdFU1RVUyIsImpvYkxvY2F0aW9uIjoid2VzdHVzIn0?api-version=2018-05-01
pragma:
- no-cache
strict-transport-security:
- max-age=31536000; includeSubDomains
x-content-type-options:
- nosniff
x-ms-ratelimit-remaining-subscription-deletes:
- '14998'
status:
code: 202
message: Accepted
version: 1
Loading