Skip to content

Commit ebc45e0

Browse files
SDKAutoaudunn
SDKAuto
andcommitted
CodeGen from PR 13814 in Azure/azure-rest-api-specs
Anf 10997 NetApp Files update swagger rest api to 2021-02-01 (Azure#13814) * Add api-version 2021-02-01 folder * apply udpates * Update readme * update backaupStatus operationid * Update account encryption settings * Pretty * Fix plural * Add x-ms-pageable to AccountBackups_List * change next link * remove tag from backup proxy resource * revert change to 2020-12 * remove tag from backup proxy resource * Add x-ms-pageable to AccountBackups_List * Pretty * Add Snapshotpolicy to volumePatch * Add Snapshotpolicy to volumeupdate example file * Change subscription id in example * Change subscription id in example * pretty * Remove AccountEncryption proptery, some non funcitonal validation warning fixes * Fix example for backupoperators and securityoperators * Remove readme.azureresourceschema.md * Adding tags back to backuppatch, removing needs breaking change reivew * fix prettier Co-authored-by: Audunn Baldvinsson <[email protected]>
1 parent a98297f commit ebc45e0

38 files changed

+901
-696
lines changed

sdk/netapp/azure-mgmt-netapp/MANIFEST.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
include _meta.json
12
recursive-include tests *.py *.yaml
23
include *.md
34
include azure/__init__.py
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"autorest": "3.4.2",
3+
"use": [
4+
"@autorest/[email protected]",
5+
"@autorest/[email protected]"
6+
],
7+
"commit": "20b168918d11ebeee6f00c71c0c41b93aae0ce0d",
8+
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
9+
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --multiapi --python --python-mode=update --python-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-python/sdk --track2 --use=@autorest/[email protected] --use=@autorest/[email protected] --version=3.4.2",
10+
"readme": "specification/netapp/resource-manager/readme.md"
11+
}

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ def __init__(
4848

4949
self.credential = credential
5050
self.subscription_id = subscription_id
51-
self.api_version = "2020-12-01"
51+
self.api_version = "2021-02-01"
5252
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5353
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
5454
self._configure(**kwargs)
Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"chosen_version": "2020-12-01",
3-
"total_api_version_list": ["2020-12-01"],
2+
"chosen_version": "2021-02-01",
3+
"total_api_version_list": ["2021-02-01"],
44
"client": {
55
"name": "NetAppManagementClient",
66
"filename": "_net_app_management_client",
@@ -9,7 +9,9 @@
99
"custom_base_url": null,
1010
"azure_arm": true,
1111
"has_lro_operations": true,
12-
"client_side_validation": true
12+
"client_side_validation": false,
13+
"sync_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"ARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetAppManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"HttpRequest\", \"HttpResponse\"]}}}",
14+
"async_imports": "{\"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}, \"regular\": {\"azurecore\": {\"azure.profiles\": [\"KnownProfiles\", \"ProfileDefinition\"], \"azure.profiles.multiapiclient\": [\"MultiApiClientMixin\"], \"msrest\": [\"Deserializer\", \"Serializer\"], \"azure.mgmt.core\": [\"AsyncARMPipelineClient\"]}, \"local\": {\"._configuration\": [\"NetAppManagementClientConfiguration\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\", \"Optional\"]}, \"azurecore\": {\"azure.core.pipeline.transport\": [\"AsyncHttpResponse\", \"HttpRequest\"]}}}"
1315
},
1416
"global_parameters": {
1517
"sync": {
@@ -28,28 +30,72 @@
2830
},
2931
"async": {
3032
"credential": {
31-
"signature": "credential, # type: \"AsyncTokenCredential\"",
33+
"signature": "credential: \"AsyncTokenCredential\",",
3234
"description": "Credential needed for the client to connect to Azure.",
3335
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
3436
"required": true
3537
},
3638
"subscription_id": {
37-
"signature": "subscription_id, # type: str",
39+
"signature": "subscription_id: str,",
3840
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
3941
"docstring_type": "str",
4042
"required": true
4143
}
4244
},
4345
"constant": {
4446
},
45-
"call": "credential, subscription_id"
47+
"call": "credential, subscription_id",
48+
"service_client_specific": {
49+
"sync": {
50+
"api_version": {
51+
"signature": "api_version=None, # type: Optional[str]",
52+
"description": "API version to use if no profile is provided, or if missing in profile.",
53+
"docstring_type": "str",
54+
"required": false
55+
},
56+
"base_url": {
57+
"signature": "base_url=None, # type: Optional[str]",
58+
"description": "Service URL",
59+
"docstring_type": "str",
60+
"required": false
61+
},
62+
"profile": {
63+
"signature": "profile=KnownProfiles.default, # type: KnownProfiles",
64+
"description": "A profile definition, from KnownProfiles to dict.",
65+
"docstring_type": "azure.profiles.KnownProfiles",
66+
"required": false
67+
}
68+
},
69+
"async": {
70+
"api_version": {
71+
"signature": "api_version: Optional[str] = None,",
72+
"description": "API version to use if no profile is provided, or if missing in profile.",
73+
"docstring_type": "str",
74+
"required": false
75+
},
76+
"base_url": {
77+
"signature": "base_url: Optional[str] = None,",
78+
"description": "Service URL",
79+
"docstring_type": "str",
80+
"required": false
81+
},
82+
"profile": {
83+
"signature": "profile: KnownProfiles = KnownProfiles.default,",
84+
"description": "A profile definition, from KnownProfiles to dict.",
85+
"docstring_type": "azure.profiles.KnownProfiles",
86+
"required": false
87+
}
88+
}
89+
}
4690
},
4791
"config": {
4892
"credential": true,
4993
"credential_scopes": ["https://management.azure.com/.default"],
5094
"credential_default_policy_type": "BearerTokenCredentialPolicy",
5195
"credential_default_policy_type_has_async_version": true,
52-
"credential_key_header_name": null
96+
"credential_key_header_name": null,
97+
"sync_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\"._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials\": [\"TokenCredential\"]}}}",
98+
"async_imports": "{\"regular\": {\"azurecore\": {\"azure.core.configuration\": [\"Configuration\"], \"azure.core.pipeline\": [\"policies\"], \"azure.mgmt.core.policies\": [\"ARMHttpLoggingPolicy\"]}, \"local\": {\".._version\": [\"VERSION\"]}}, \"conditional\": {\"stdlib\": {\"typing\": [\"Any\"]}}, \"typing\": {\"azurecore\": {\"azure.core.credentials_async\": [\"AsyncTokenCredential\"]}}}"
5399
},
54100
"operation_groups": {
55101
"operations": "Operations",
@@ -59,14 +105,9 @@
59105
"volumes": "VolumesOperations",
60106
"snapshots": "SnapshotsOperations",
61107
"snapshot_policies": "SnapshotPoliciesOperations",
62-
"volume_backup_status": "VolumeBackupStatusOperations",
63-
"account_backups": "AccountBackupsOperations",
64108
"backups": "BackupsOperations",
109+
"account_backups": "AccountBackupsOperations",
65110
"backup_policies": "BackupPoliciesOperations",
66111
"vaults": "VaultsOperations"
67-
},
68-
"operation_mixins": {
69-
},
70-
"sync_imports": "None",
71-
"async_imports": "None"
112+
}
72113
}

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_net_app_management_client.py

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
from typing import Any, Optional
1717

1818
from azure.core.credentials import TokenCredential
19+
from azure.core.pipeline.transport import HttpRequest, HttpResponse
1920

2021
from ._configuration import NetAppManagementClientConfiguration
2122
from .operations import Operations
@@ -25,9 +26,8 @@
2526
from .operations import VolumesOperations
2627
from .operations import SnapshotsOperations
2728
from .operations import SnapshotPoliciesOperations
28-
from .operations import VolumeBackupStatusOperations
29-
from .operations import AccountBackupsOperations
3029
from .operations import BackupsOperations
30+
from .operations import AccountBackupsOperations
3131
from .operations import BackupPoliciesOperations
3232
from .operations import VaultsOperations
3333
from . import models
@@ -50,12 +50,10 @@ class NetAppManagementClient(object):
5050
:vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations
5151
:ivar snapshot_policies: SnapshotPoliciesOperations operations
5252
:vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations
53-
:ivar volume_backup_status: VolumeBackupStatusOperations operations
54-
:vartype volume_backup_status: azure.mgmt.netapp.operations.VolumeBackupStatusOperations
55-
:ivar account_backups: AccountBackupsOperations operations
56-
:vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations
5753
:ivar backups: BackupsOperations operations
5854
:vartype backups: azure.mgmt.netapp.operations.BackupsOperations
55+
:ivar account_backups: AccountBackupsOperations operations
56+
:vartype account_backups: azure.mgmt.netapp.operations.AccountBackupsOperations
5957
:ivar backup_policies: BackupPoliciesOperations operations
6058
:vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations
6159
:ivar vaults: VaultsOperations operations
@@ -83,6 +81,7 @@ def __init__(
8381

8482
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
8583
self._serialize = Serializer(client_models)
84+
self._serialize.client_side_validation = False
8685
self._deserialize = Deserializer(client_models)
8786

8887
self.operations = Operations(
@@ -99,17 +98,33 @@ def __init__(
9998
self._client, self._config, self._serialize, self._deserialize)
10099
self.snapshot_policies = SnapshotPoliciesOperations(
101100
self._client, self._config, self._serialize, self._deserialize)
102-
self.volume_backup_status = VolumeBackupStatusOperations(
101+
self.backups = BackupsOperations(
103102
self._client, self._config, self._serialize, self._deserialize)
104103
self.account_backups = AccountBackupsOperations(
105104
self._client, self._config, self._serialize, self._deserialize)
106-
self.backups = BackupsOperations(
107-
self._client, self._config, self._serialize, self._deserialize)
108105
self.backup_policies = BackupPoliciesOperations(
109106
self._client, self._config, self._serialize, self._deserialize)
110107
self.vaults = VaultsOperations(
111108
self._client, self._config, self._serialize, self._deserialize)
112109

110+
def _send_request(self, http_request, **kwargs):
111+
# type: (HttpRequest, Any) -> HttpResponse
112+
"""Runs the network request through the client's chained policies.
113+
114+
:param http_request: The network request you want to make. Required.
115+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
116+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
117+
:return: The response of your network call. Does not do error handling on your response.
118+
:rtype: ~azure.core.pipeline.transport.HttpResponse
119+
"""
120+
path_format_arguments = {
121+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
122+
}
123+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
124+
stream = kwargs.pop("stream", True)
125+
pipeline_response = self._client._pipeline.run(http_request, stream=stream, **kwargs)
126+
return pipeline_response.http_response
127+
113128
def close(self):
114129
# type: () -> None
115130
self._client.close()

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@
66
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
77
# --------------------------------------------------------------------------
88

9-
VERSION = "2.0.0"
9+
VERSION = "1.0.0"

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_configuration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def __init__(
4545

4646
self.credential = credential
4747
self.subscription_id = subscription_id
48-
self.api_version = "2020-12-01"
48+
self.api_version = "2021-02-01"
4949
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
5050
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
5151
self._configure(**kwargs)

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/_net_app_management_client.py

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
from typing import Any, Optional, TYPE_CHECKING
1010

11+
from azure.core.pipeline.transport import AsyncHttpResponse, HttpRequest
1112
from azure.mgmt.core import AsyncARMPipelineClient
1213
from msrest import Deserializer, Serializer
1314

@@ -23,9 +24,8 @@
2324
from .operations import VolumesOperations
2425
from .operations import SnapshotsOperations
2526
from .operations import SnapshotPoliciesOperations
26-
from .operations import VolumeBackupStatusOperations
27-
from .operations import AccountBackupsOperations
2827
from .operations import BackupsOperations
28+
from .operations import AccountBackupsOperations
2929
from .operations import BackupPoliciesOperations
3030
from .operations import VaultsOperations
3131
from .. import models
@@ -48,12 +48,10 @@ class NetAppManagementClient(object):
4848
:vartype snapshots: azure.mgmt.netapp.aio.operations.SnapshotsOperations
4949
:ivar snapshot_policies: SnapshotPoliciesOperations operations
5050
:vartype snapshot_policies: azure.mgmt.netapp.aio.operations.SnapshotPoliciesOperations
51-
:ivar volume_backup_status: VolumeBackupStatusOperations operations
52-
:vartype volume_backup_status: azure.mgmt.netapp.aio.operations.VolumeBackupStatusOperations
53-
:ivar account_backups: AccountBackupsOperations operations
54-
:vartype account_backups: azure.mgmt.netapp.aio.operations.AccountBackupsOperations
5551
:ivar backups: BackupsOperations operations
5652
:vartype backups: azure.mgmt.netapp.aio.operations.BackupsOperations
53+
:ivar account_backups: AccountBackupsOperations operations
54+
:vartype account_backups: azure.mgmt.netapp.aio.operations.AccountBackupsOperations
5755
:ivar backup_policies: BackupPoliciesOperations operations
5856
:vartype backup_policies: azure.mgmt.netapp.aio.operations.BackupPoliciesOperations
5957
:ivar vaults: VaultsOperations operations
@@ -80,6 +78,7 @@ def __init__(
8078

8179
client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)}
8280
self._serialize = Serializer(client_models)
81+
self._serialize.client_side_validation = False
8382
self._deserialize = Deserializer(client_models)
8483

8584
self.operations = Operations(
@@ -96,17 +95,32 @@ def __init__(
9695
self._client, self._config, self._serialize, self._deserialize)
9796
self.snapshot_policies = SnapshotPoliciesOperations(
9897
self._client, self._config, self._serialize, self._deserialize)
99-
self.volume_backup_status = VolumeBackupStatusOperations(
98+
self.backups = BackupsOperations(
10099
self._client, self._config, self._serialize, self._deserialize)
101100
self.account_backups = AccountBackupsOperations(
102101
self._client, self._config, self._serialize, self._deserialize)
103-
self.backups = BackupsOperations(
104-
self._client, self._config, self._serialize, self._deserialize)
105102
self.backup_policies = BackupPoliciesOperations(
106103
self._client, self._config, self._serialize, self._deserialize)
107104
self.vaults = VaultsOperations(
108105
self._client, self._config, self._serialize, self._deserialize)
109106

107+
async def _send_request(self, http_request: HttpRequest, **kwargs: Any) -> AsyncHttpResponse:
108+
"""Runs the network request through the client's chained policies.
109+
110+
:param http_request: The network request you want to make. Required.
111+
:type http_request: ~azure.core.pipeline.transport.HttpRequest
112+
:keyword bool stream: Whether the response payload will be streamed. Defaults to True.
113+
:return: The response of your network call. Does not do error handling on your response.
114+
:rtype: ~azure.core.pipeline.transport.AsyncHttpResponse
115+
"""
116+
path_format_arguments = {
117+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
118+
}
119+
http_request.url = self._client.format_url(http_request.url, **path_format_arguments)
120+
stream = kwargs.pop("stream", True)
121+
pipeline_response = await self._client._pipeline.run(http_request, stream=stream, **kwargs)
122+
return pipeline_response.http_response
123+
110124
async def close(self) -> None:
111125
await self._client.close()
112126

sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/aio/operations/__init__.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,8 @@
1313
from ._volumes_operations import VolumesOperations
1414
from ._snapshots_operations import SnapshotsOperations
1515
from ._snapshot_policies_operations import SnapshotPoliciesOperations
16-
from ._volume_backup_status_operations import VolumeBackupStatusOperations
17-
from ._account_backups_operations import AccountBackupsOperations
1816
from ._backups_operations import BackupsOperations
17+
from ._account_backups_operations import AccountBackupsOperations
1918
from ._backup_policies_operations import BackupPoliciesOperations
2019
from ._vaults_operations import VaultsOperations
2120

@@ -27,9 +26,8 @@
2726
'VolumesOperations',
2827
'SnapshotsOperations',
2928
'SnapshotPoliciesOperations',
30-
'VolumeBackupStatusOperations',
31-
'AccountBackupsOperations',
3229
'BackupsOperations',
30+
'AccountBackupsOperations',
3331
'BackupPoliciesOperations',
3432
'VaultsOperations',
3533
]

0 commit comments

Comments
 (0)