Skip to content

Commit c9a5d64

Browse files
[AutoRelease] t2-netapp-2024-04-30-79985(can only be merged by SDK owner) (#35420)
* code and test * t2-neta-2024-04-30-79985 recordings --------- Co-authored-by: azure-sdk <PythonSdkPipelines> Co-authored-by: Einar Traustason <[email protected]>
1 parent 7595141 commit c9a5d64

File tree

139 files changed

+9294
-4707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

139 files changed

+9294
-4707
lines changed

sdk/netapp/azure-mgmt-netapp/CHANGELOG.md

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
11
# Release History
22

3+
## 13.0.0 (2024-05-20)
4+
5+
### Features Added
6+
7+
- Added operation BackupsOperations.begin_create
8+
- Added operation BackupsOperations.begin_delete
9+
- Added operation BackupsOperations.begin_update
10+
- Added operation BackupsOperations.get
11+
- Added operation BackupsOperations.get_latest_status
12+
- Added operation BackupsOperations.get_volume_latest_restore_status
13+
- Added operation BackupsOperations.list_by_vault
14+
- Added operation group BackupVaultsOperations
15+
- Added operation group BackupsUnderAccountOperations
16+
- Added operation group BackupsUnderBackupVaultOperations
17+
- Added operation group BackupsUnderVolumeOperations
18+
- Added operation group NetAppResourceRegionInfosOperations
19+
- Model VolumeBackups has a new parameter volume_resource_id
20+
- Model VolumePatchPropertiesDataProtection has a new parameter backup
21+
- Model VolumePropertiesDataProtection has a new parameter backup
22+
23+
### Breaking Changes
24+
25+
- Removed operation BackupsOperations.get_volume_restore_status
26+
327
## 12.0.0 (2024-03-18)
428

529
### Breaking Changes
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
2-
"commit": "4f093ebabe4525a5d10ca57e5804523a27dce7bf",
2+
"commit": "2dc0129e1e3f5dfb6c86195aae57fc19e7c72e01",
33
"repository_url": "https://github.com/Azure/azure-rest-api-specs",
44
"autorest": "3.9.7",
55
"use": [
6-
"@autorest/python@6.7.1",
7-
"@autorest/modelerfour@4.26.2"
6+
"@autorest/python@6.13.7",
7+
"@autorest/modelerfour@4.27.0"
88
],
9-
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.7.1 --use=@autorest/modelerfour@4.26.2 --version=3.9.7 --version-tolerant=False",
9+
"autorest_command": "autorest specification/netapp/resource-manager/readme.md --generate-sample=True --include-x-ms-examples-original-file=True --python --python-sdks-folder=/home/vsts/work/1/azure-sdk-for-python/sdk --use=@autorest/python@6.13.7 --use=@autorest/modelerfour@4.27.0 --version=3.9.7 --version-tolerant=False",
1010
"readme": "specification/netapp/resource-manager/readme.md"
1111
}

sdk/netapp/azure-mgmt-netapp/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/netapp/azure-mgmt-netapp",
5-
"Tag": "python/netapp/azure-mgmt-netapp_133f48a4c5"
5+
"Tag": "python/netapp/azure-mgmt-netapp_4a6a10fa5e"
66
}

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

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

99
from typing import Any, TYPE_CHECKING
1010

11-
from azure.core.configuration import Configuration
1211
from azure.core.pipeline import policies
1312
from azure.mgmt.core.policies import ARMChallengeAuthenticationPolicy, ARMHttpLoggingPolicy
1413

@@ -19,7 +18,7 @@
1918
from azure.core.credentials import TokenCredential
2019

2120

22-
class NetAppManagementClientConfiguration(Configuration): # pylint: disable=too-many-instance-attributes
21+
class NetAppManagementClientConfiguration: # pylint: disable=too-many-instance-attributes,name-too-long
2322
"""Configuration for NetAppManagementClient.
2423
2524
Note that all parameters used to create this instance are saved as instance
@@ -29,14 +28,13 @@ class NetAppManagementClientConfiguration(Configuration): # pylint: disable=too
2928
:type credential: ~azure.core.credentials.TokenCredential
3029
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
3130
:type subscription_id: str
32-
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
31+
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
3332
default value may result in unsupported behavior.
3433
:paramtype api_version: str
3534
"""
3635

3736
def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs: Any) -> None:
38-
super(NetAppManagementClientConfiguration, self).__init__(**kwargs)
39-
api_version: str = kwargs.pop("api_version", "2023-07-01")
37+
api_version: str = kwargs.pop("api_version", "2023-11-01")
4038

4139
if credential is None:
4240
raise ValueError("Parameter 'credential' must not be None.")
@@ -48,6 +46,7 @@ def __init__(self, credential: "TokenCredential", subscription_id: str, **kwargs
4846
self.api_version = api_version
4947
self.credential_scopes = kwargs.pop("credential_scopes", ["https://management.azure.com/.default"])
5048
kwargs.setdefault("sdk_moniker", "mgmt-netapp/{}".format(VERSION))
49+
self.polling_interval = kwargs.get("polling_interval", 30)
5150
self._configure(**kwargs)
5251

5352
def _configure(self, **kwargs: Any) -> None:
@@ -56,9 +55,9 @@ def _configure(self, **kwargs: Any) -> None:
5655
self.proxy_policy = kwargs.get("proxy_policy") or policies.ProxyPolicy(**kwargs)
5756
self.logging_policy = kwargs.get("logging_policy") or policies.NetworkTraceLoggingPolicy(**kwargs)
5857
self.http_logging_policy = kwargs.get("http_logging_policy") or ARMHttpLoggingPolicy(**kwargs)
59-
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6058
self.custom_hook_policy = kwargs.get("custom_hook_policy") or policies.CustomHookPolicy(**kwargs)
6159
self.redirect_policy = kwargs.get("redirect_policy") or policies.RedirectPolicy(**kwargs)
60+
self.retry_policy = kwargs.get("retry_policy") or policies.RetryPolicy(**kwargs)
6261
self.authentication_policy = kwargs.get("authentication_policy")
6362
if self.credential and not self.authentication_policy:
6463
self.authentication_policy = ARMChallengeAuthenticationPolicy(

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

Lines changed: 57 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,25 @@
99
from copy import deepcopy
1010
from typing import Any, TYPE_CHECKING
1111

12+
from azure.core.pipeline import policies
1213
from azure.core.rest import HttpRequest, HttpResponse
1314
from azure.mgmt.core import ARMPipelineClient
15+
from azure.mgmt.core.policies import ARMAutoResourceProviderRegistrationPolicy
1416

1517
from . import models as _models
1618
from ._configuration import NetAppManagementClientConfiguration
1719
from ._serialization import Deserializer, Serializer
1820
from .operations import (
1921
AccountsOperations,
2022
BackupPoliciesOperations,
23+
BackupVaultsOperations,
2124
BackupsOperations,
25+
BackupsUnderAccountOperations,
26+
BackupsUnderBackupVaultOperations,
27+
BackupsUnderVolumeOperations,
2228
NetAppResourceOperations,
2329
NetAppResourceQuotaLimitsOperations,
30+
NetAppResourceRegionInfosOperations,
2431
Operations,
2532
PoolsOperations,
2633
SnapshotPoliciesOperations,
@@ -46,6 +53,9 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw
4653
:ivar net_app_resource_quota_limits: NetAppResourceQuotaLimitsOperations operations
4754
:vartype net_app_resource_quota_limits:
4855
azure.mgmt.netapp.operations.NetAppResourceQuotaLimitsOperations
56+
:ivar net_app_resource_region_infos: NetAppResourceRegionInfosOperations operations
57+
:vartype net_app_resource_region_infos:
58+
azure.mgmt.netapp.operations.NetAppResourceRegionInfosOperations
4959
:ivar accounts: AccountsOperations operations
5060
:vartype accounts: azure.mgmt.netapp.operations.AccountsOperations
5161
:ivar pools: PoolsOperations operations
@@ -56,8 +66,6 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw
5666
:vartype snapshots: azure.mgmt.netapp.operations.SnapshotsOperations
5767
:ivar snapshot_policies: SnapshotPoliciesOperations operations
5868
:vartype snapshot_policies: azure.mgmt.netapp.operations.SnapshotPoliciesOperations
59-
:ivar backups: BackupsOperations operations
60-
:vartype backups: azure.mgmt.netapp.operations.BackupsOperations
6169
:ivar backup_policies: BackupPoliciesOperations operations
6270
:vartype backup_policies: azure.mgmt.netapp.operations.BackupPoliciesOperations
6371
:ivar volume_quota_rules: VolumeQuotaRulesOperations operations
@@ -66,13 +74,24 @@ class NetAppManagementClient: # pylint: disable=client-accepts-api-version-keyw
6674
:vartype volume_groups: azure.mgmt.netapp.operations.VolumeGroupsOperations
6775
:ivar subvolumes: SubvolumesOperations operations
6876
:vartype subvolumes: azure.mgmt.netapp.operations.SubvolumesOperations
77+
:ivar backups: BackupsOperations operations
78+
:vartype backups: azure.mgmt.netapp.operations.BackupsOperations
79+
:ivar backup_vaults: BackupVaultsOperations operations
80+
:vartype backup_vaults: azure.mgmt.netapp.operations.BackupVaultsOperations
81+
:ivar backups_under_backup_vault: BackupsUnderBackupVaultOperations operations
82+
:vartype backups_under_backup_vault:
83+
azure.mgmt.netapp.operations.BackupsUnderBackupVaultOperations
84+
:ivar backups_under_volume: BackupsUnderVolumeOperations operations
85+
:vartype backups_under_volume: azure.mgmt.netapp.operations.BackupsUnderVolumeOperations
86+
:ivar backups_under_account: BackupsUnderAccountOperations operations
87+
:vartype backups_under_account: azure.mgmt.netapp.operations.BackupsUnderAccountOperations
6988
:param credential: Credential needed for the client to connect to Azure. Required.
7089
:type credential: ~azure.core.credentials.TokenCredential
7190
:param subscription_id: The ID of the target subscription. The value must be an UUID. Required.
7291
:type subscription_id: str
7392
:param base_url: Service URL. Default value is "https://management.azure.com".
7493
:type base_url: str
75-
:keyword api_version: Api Version. Default value is "2023-07-01". Note that overriding this
94+
:keyword api_version: Api Version. Default value is "2023-11-01". Note that overriding this
7695
default value may result in unsupported behavior.
7796
:paramtype api_version: str
7897
:keyword int polling_interval: Default waiting time between two polls for LRO operations if no
@@ -89,7 +108,25 @@ def __init__(
89108
self._config = NetAppManagementClientConfiguration(
90109
credential=credential, subscription_id=subscription_id, **kwargs
91110
)
92-
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, config=self._config, **kwargs)
111+
_policies = kwargs.pop("policies", None)
112+
if _policies is None:
113+
_policies = [
114+
policies.RequestIdPolicy(**kwargs),
115+
self._config.headers_policy,
116+
self._config.user_agent_policy,
117+
self._config.proxy_policy,
118+
policies.ContentDecodePolicy(**kwargs),
119+
ARMAutoResourceProviderRegistrationPolicy(),
120+
self._config.redirect_policy,
121+
self._config.retry_policy,
122+
self._config.authentication_policy,
123+
self._config.custom_hook_policy,
124+
self._config.logging_policy,
125+
policies.DistributedTracingPolicy(**kwargs),
126+
policies.SensitiveHeaderCleanupPolicy(**kwargs) if self._config.redirect_policy else None,
127+
self._config.http_logging_policy,
128+
]
129+
self._client: ARMPipelineClient = ARMPipelineClient(base_url=base_url, policies=_policies, **kwargs)
93130

94131
client_models = {k: v for k, v in _models.__dict__.items() if isinstance(v, type)}
95132
self._serialize = Serializer(client_models)
@@ -100,22 +137,35 @@ def __init__(
100137
self.net_app_resource_quota_limits = NetAppResourceQuotaLimitsOperations(
101138
self._client, self._config, self._serialize, self._deserialize
102139
)
140+
self.net_app_resource_region_infos = NetAppResourceRegionInfosOperations(
141+
self._client, self._config, self._serialize, self._deserialize
142+
)
103143
self.accounts = AccountsOperations(self._client, self._config, self._serialize, self._deserialize)
104144
self.pools = PoolsOperations(self._client, self._config, self._serialize, self._deserialize)
105145
self.volumes = VolumesOperations(self._client, self._config, self._serialize, self._deserialize)
106146
self.snapshots = SnapshotsOperations(self._client, self._config, self._serialize, self._deserialize)
107147
self.snapshot_policies = SnapshotPoliciesOperations(
108148
self._client, self._config, self._serialize, self._deserialize
109149
)
110-
self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize)
111150
self.backup_policies = BackupPoliciesOperations(self._client, self._config, self._serialize, self._deserialize)
112151
self.volume_quota_rules = VolumeQuotaRulesOperations(
113152
self._client, self._config, self._serialize, self._deserialize
114153
)
115154
self.volume_groups = VolumeGroupsOperations(self._client, self._config, self._serialize, self._deserialize)
116155
self.subvolumes = SubvolumesOperations(self._client, self._config, self._serialize, self._deserialize)
156+
self.backups = BackupsOperations(self._client, self._config, self._serialize, self._deserialize)
157+
self.backup_vaults = BackupVaultsOperations(self._client, self._config, self._serialize, self._deserialize)
158+
self.backups_under_backup_vault = BackupsUnderBackupVaultOperations(
159+
self._client, self._config, self._serialize, self._deserialize
160+
)
161+
self.backups_under_volume = BackupsUnderVolumeOperations(
162+
self._client, self._config, self._serialize, self._deserialize
163+
)
164+
self.backups_under_account = BackupsUnderAccountOperations(
165+
self._client, self._config, self._serialize, self._deserialize
166+
)
117167

118-
def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
168+
def _send_request(self, request: HttpRequest, *, stream: bool = False, **kwargs: Any) -> HttpResponse:
119169
"""Runs the network request through the client's chained policies.
120170
121171
>>> from azure.core.rest import HttpRequest
@@ -135,7 +185,7 @@ def _send_request(self, request: HttpRequest, **kwargs: Any) -> HttpResponse:
135185

136186
request_copy = deepcopy(request)
137187
request_copy.url = self._client.format_url(request_copy.url)
138-
return self._client.send_request(request_copy, **kwargs)
188+
return self._client.send_request(request_copy, stream=stream, **kwargs) # type: ignore
139189

140190
def close(self) -> None:
141191
self._client.close()

0 commit comments

Comments
 (0)