Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T2 netapp 2021 02 04 #16530

Merged
merged 3 commits into from
Feb 7, 2021
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
24 changes: 24 additions & 0 deletions sdk/netapp/azure-mgmt-netapp/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Release History

## 1.0.0 (2021-02-04)

**Features**

- Model VolumeList has a new parameter next_link
- Model BackupPatch has a new parameter failure_reason
- Model Backup has a new parameter failure_reason
- Model NetAppAccountList has a new parameter next_link
- Model ActiveDirectory has a new parameter security_operators
- Model ActiveDirectory has a new parameter ldap_over_tls
- Model NetAppAccountPatch has a new parameter encryption
- Model CapacityPoolList has a new parameter next_link
- Model Volume has a new parameter encryption_key_source
- Model Volume has a new parameter smb_encryption
- Model Volume has a new parameter smb_continuously_available
- Model Volume has a new parameter name_properties_name
- Model NetAppAccount has a new parameter system_data
- Model NetAppAccount has a new parameter encryption
- Added operation SnapshotPoliciesOperations.begin_update

**Breaking changes**

- Removed operation SnapshotPoliciesOperations.update

## 1.0.0b1 (2020-12-01)

This is beta preview version.
Expand Down
10 changes: 10 additions & 0 deletions sdk/netapp/azure-mgmt-netapp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,13 @@ section of the project.


![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-netapp%2FREADME.png)
# Usage


To learn how to use this package, see the [quickstart guide](https://aka.ms/azsdk/python/mgmt)



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
Code samples for this package can be found at [Netapp Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-08-01"
self.api_version = "2020-11-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
71 changes: 71 additions & 0 deletions sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
{
"chosen_version": "2020-11-01",
"total_api_version_list": ["2020-11-01"],
"client": {
"name": "NetAppManagementClient",
"filename": "_net_app_management_client",
"description": "Microsoft NetApp Azure Resource Provider specification.",
"base_url": "\u0027https://management.azure.com\u0027",
"custom_base_url": null,
"azure_arm": true,
"has_lro_operations": true,
"client_side_validation": true
},
"global_parameters": {
"sync": {
"credential": {
"signature": "credential, # type: \"TokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials.TokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"async": {
"credential": {
"signature": "credential, # type: \"AsyncTokenCredential\"",
"description": "Credential needed for the client to connect to Azure.",
"docstring_type": "~azure.core.credentials_async.AsyncTokenCredential",
"required": true
},
"subscription_id": {
"signature": "subscription_id, # type: str",
"description": "Subscription credentials which uniquely identify Microsoft Azure subscription. The subscription ID forms part of the URI for every service call.",
"docstring_type": "str",
"required": true
}
},
"constant": {
},
"call": "credential, subscription_id"
},
"config": {
"credential": true,
"credential_scopes": ["https://management.azure.com/.default"],
"credential_default_policy_type": "BearerTokenCredentialPolicy",
"credential_default_policy_type_has_async_version": true,
"credential_key_header_name": null
},
"operation_groups": {
"operations": "Operations",
"net_app_resource": "NetAppResourceOperations",
"accounts": "AccountsOperations",
"pools": "PoolsOperations",
"volumes": "VolumesOperations",
"snapshots": "SnapshotsOperations",
"snapshot_policies": "SnapshotPoliciesOperations",
"account_backups": "AccountBackupsOperations",
"backups": "BackupsOperations",
"backup_policies": "BackupPoliciesOperations",
"vaults": "VaultsOperations"
},
"operation_mixins": {
},
"sync_imports": "None",
"async_imports": "None"
}
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ def __init__(

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

self.operations = Operations(
Expand Down
3 changes: 1 addition & 2 deletions sdk/netapp/azure-mgmt-netapp/azure/mgmt/netapp/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,4 @@
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------

VERSION = "1.0.0b1"

VERSION = "1.0.0"
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def __init__(

self.credential = credential
self.subscription_id = subscription_id
self.api_version = "2020-08-01"
self.api_version = "2020-11-01"
self.credential_scopes = kwargs.pop('credential_scopes', ['https://management.azure.com/.default'])
kwargs.setdefault('sdk_moniker', 'mgmt-netapp/{}'.format(VERSION))
self._configure(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ def __init__(

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

self.operations = Operations(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -129,7 +129,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -178,7 +178,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"

# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -96,7 +96,7 @@ async def extract_data(pipeline_response):
list_of_elem = deserialized.value
if cls:
list_of_elem = cls(list_of_elem)
return None, AsyncList(list_of_elem)
return deserialized.next_link or None, AsyncList(list_of_elem)

async def get_next(next_link=None):
request = prepare_request(next_link)
Expand Down Expand Up @@ -139,7 +139,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -181,13 +181,13 @@ async def _create_or_update_initial(
account_name: str,
body: "_models.NetAppAccount",
**kwargs
) -> Optional["_models.NetAppAccount"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]]
) -> "_models.NetAppAccount":
cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -216,11 +216,10 @@ async def _create_or_update_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201, 202]:
if response.status_code not in [200, 201]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('NetAppAccount', pipeline_response)

Expand Down Expand Up @@ -292,7 +291,7 @@ def get_long_running_output(pipeline_response):
'accountName': self._serialize.url("account_name", account_name, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand All @@ -317,7 +316,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"

# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
Expand Down Expand Up @@ -420,13 +419,13 @@ async def _update_initial(
account_name: str,
body: "_models.NetAppAccountPatch",
**kwargs
) -> Optional["_models.NetAppAccount"]:
cls = kwargs.pop('cls', None) # type: ClsType[Optional["_models.NetAppAccount"]]
) -> "_models.NetAppAccount":
cls = kwargs.pop('cls', None) # type: ClsType["_models.NetAppAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -455,15 +454,14 @@ async def _update_initial(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200, 201, 202]:
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = None
if response.status_code == 200:
deserialized = self._deserialize('NetAppAccount', pipeline_response)

if response.status_code == 201:
if response.status_code == 202:
deserialized = self._deserialize('NetAppAccount', pipeline_response)

if cls:
Expand Down Expand Up @@ -531,7 +529,7 @@ def get_long_running_output(pipeline_response):
'accountName': self._serialize.url("account_name", account_name, 'str'),
}

if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
if polling is True: polling_method = AsyncARMPolling(lro_delay, lro_options={'final-state-via': 'location'}, path_format_arguments=path_format_arguments, **kwargs)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def list(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

def prepare_request(next_link=None):
Expand Down Expand Up @@ -146,7 +146,7 @@ async def get(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
accept = "application/json"

# Construct URL
Expand Down Expand Up @@ -196,7 +196,7 @@ async def _create_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -351,7 +351,7 @@ async def update(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"

Expand Down Expand Up @@ -381,11 +381,15 @@ async def update(
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
response = pipeline_response.http_response

if response.status_code not in [200]:
if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, error_format=ARMErrorFormat)

deserialized = self._deserialize('BackupPolicy', pipeline_response)
if response.status_code == 200:
deserialized = self._deserialize('BackupPolicy', pipeline_response)

if response.status_code == 202:
deserialized = self._deserialize('BackupPolicy', pipeline_response)

if cls:
return cls(pipeline_response, deserialized, {})
Expand All @@ -405,7 +409,7 @@ async def _delete_initial(
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))
api_version = "2020-08-01"
api_version = "2020-11-01"

# Construct URL
url = self._delete_initial.metadata['url'] # type: ignore
Expand Down
Loading