Skip to content

Commit 9fada36

Browse files
authored
[T2] GA datalake-store (Azure#15887)
1 parent 7669b31 commit 9fada36

19 files changed

+339
-343
lines changed

sdk/datalake/azure-mgmt-datalake-store/CHANGELOG.md

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

3+
## 1.0.0 (2020-12-21)
4+
5+
**Breaking changes**
6+
7+
- Operation FirewallRulesOperations.create_or_update has a new signature
8+
- Operation FirewallRulesOperations.update has a new signature
9+
- Operation VirtualNetworkRulesOperations.create_or_update has a new signature
10+
- Operation VirtualNetworkRulesOperations.update has a new signature
11+
- Operation TrustedIdProvidersOperations.create_or_update has a new signature
12+
- Operation TrustedIdProvidersOperations.update has a new signature
13+
- Operation AccountsOperations.check_name_availability has a new signature
14+
- Operation FirewallRulesOperations.update has a new signature
15+
- Operation FirewallRulesOperations.create_or_update has a new signature
16+
317
## 1.0.0b1 (2020-10-31)
418

519
This is beta preview version.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1+
recursive-include tests *.py *.yaml
12
include *.md
23
include azure/__init__.py
34
include azure/mgmt/__init__.py
45
include azure/mgmt/datalake/__init__.py
6+
Lines changed: 12 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,9 @@
1-
## Microsoft Azure SDK for Python
2-
3-
This is the Microsoft Azure Data Lake Store Management Client Library.
4-
5-
Azure Resource Manager (ARM) is the next generation of management APIs
6-
that replace the old Azure Service Management (ASM).
7-
8-
This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.
9-
10-
For the older Azure Service Management (ASM) libraries, see
11-
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
12-
library.
13-
14-
For a more complete set of Azure libraries, see the
15-
[azure sdk python release](https://aka.ms/azsdk/python/all).
16-
17-
## Compatibility
1+
# Microsoft Azure SDK for Python
182

19-
**IMPORTANT**: If you have an earlier version of the azure package
20-
(version < 1.0), you should uninstall it before installing this
21-
package.
22-
23-
You can check the version using pip:
24-
25-
``` shell
26-
pip freeze
27-
```
28-
29-
If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
3+
This is the Microsoft Azure Data Lake Store Management Client Library.
4+
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
5+
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).
306

31-
``` shell
32-
pip uninstall azure
33-
```
347

358
# Usage
369

@@ -39,14 +12,16 @@ To learn how to use this package, see the [quickstart guide](https://aka.ms/azsd
3912

4013

4114

42-
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
15+
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/data-lake-store)
4316
Code samples for this package can be found at [Data Lake Store Management](https://docs.microsoft.com/samples/browse/?languages=python&term=Getting%20started%20-%20Managing&terms=Getting%20started%20-%20Managing) on docs.microsoft.com.
4417
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)
4518

46-
## Provide Feedback
4719

48-
If you encounter any bugs or have suggestions, please file an issue in
49-
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
50-
section of the project.
20+
# Provide Feedback
21+
22+
If you encounter any bugs or have suggestions, please file an issue in the
23+
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
24+
section of the project.
25+
5126

52-
![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-datalake-store%2FREADME.png)
27+
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-datalake-store%2FREADME.png)

sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/_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 = "1.0.0b1"
9+
VERSION = "1.0.0"

sdk/datalake/azure-mgmt-datalake-store/azure/mgmt/datalake/store/aio/operations/_accounts_operations.py

Lines changed: 47 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
from azure.mgmt.core.exceptions import ARMErrorFormat
1717
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling
1818

19-
from ... import models
19+
from ... import models as _models
2020

2121
T = TypeVar('T')
2222
ClsType = Optional[Callable[[PipelineResponse[HttpRequest, AsyncHttpResponse], T, Dict[str, Any]], Any]]
@@ -35,7 +35,7 @@ class AccountsOperations:
3535
:param deserializer: An object model deserializer.
3636
"""
3737

38-
models = models
38+
models = _models
3939

4040
def __init__(self, client, config, serializer, deserializer) -> None:
4141
self._client = client
@@ -52,7 +52,7 @@ def list(
5252
orderby: Optional[str] = None,
5353
count: Optional[bool] = None,
5454
**kwargs
55-
) -> AsyncIterable["models.DataLakeStoreAccountListResult"]:
55+
) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]:
5656
"""Lists the Data Lake Store accounts within the subscription. The response includes a link to the
5757
next page of results, if any.
5858
@@ -77,7 +77,7 @@ def list(
7777
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult]
7878
:raises: ~azure.core.exceptions.HttpResponseError
7979
"""
80-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"]
80+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"]
8181
error_map = {
8282
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
8383
}
@@ -154,7 +154,7 @@ def list_by_resource_group(
154154
orderby: Optional[str] = None,
155155
count: Optional[bool] = None,
156156
**kwargs
157-
) -> AsyncIterable["models.DataLakeStoreAccountListResult"]:
157+
) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]:
158158
"""Lists the Data Lake Store accounts within a specific resource group. The response includes a
159159
link to the next page of results, if any.
160160
@@ -181,7 +181,7 @@ def list_by_resource_group(
181181
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult]
182182
:raises: ~azure.core.exceptions.HttpResponseError
183183
"""
184-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"]
184+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"]
185185
error_map = {
186186
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
187187
}
@@ -253,10 +253,10 @@ async def _create_initial(
253253
self,
254254
resource_group_name: str,
255255
account_name: str,
256-
parameters: "models.CreateDataLakeStoreAccountParameters",
256+
parameters: "_models.CreateDataLakeStoreAccountParameters",
257257
**kwargs
258-
) -> "models.DataLakeStoreAccount":
259-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
258+
) -> "_models.DataLakeStoreAccount":
259+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
260260
error_map = {
261261
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
262262
}
@@ -310,9 +310,9 @@ async def begin_create(
310310
self,
311311
resource_group_name: str,
312312
account_name: str,
313-
parameters: "models.CreateDataLakeStoreAccountParameters",
313+
parameters: "_models.CreateDataLakeStoreAccountParameters",
314314
**kwargs
315-
) -> AsyncLROPoller["models.DataLakeStoreAccount"]:
315+
) -> AsyncLROPoller["_models.DataLakeStoreAccount"]:
316316
"""Creates the specified Data Lake Store account.
317317
318318
:param resource_group_name: The name of the Azure resource group.
@@ -332,7 +332,7 @@ async def begin_create(
332332
:raises ~azure.core.exceptions.HttpResponseError:
333333
"""
334334
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
335-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
335+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
336336
lro_delay = kwargs.pop(
337337
'polling_interval',
338338
self._config.polling_interval
@@ -357,7 +357,13 @@ def get_long_running_output(pipeline_response):
357357
return cls(pipeline_response, deserialized, {})
358358
return deserialized
359359

360-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
360+
path_format_arguments = {
361+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
362+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
363+
'accountName': self._serialize.url("account_name", account_name, 'str'),
364+
}
365+
366+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
361367
elif polling is False: polling_method = AsyncNoPolling()
362368
else: polling_method = polling
363369
if cont_token:
@@ -376,7 +382,7 @@ async def get(
376382
resource_group_name: str,
377383
account_name: str,
378384
**kwargs
379-
) -> "models.DataLakeStoreAccount":
385+
) -> "_models.DataLakeStoreAccount":
380386
"""Gets the specified Data Lake Store account.
381387
382388
:param resource_group_name: The name of the Azure resource group.
@@ -388,7 +394,7 @@ async def get(
388394
:rtype: ~azure.mgmt.datalake.store.models.DataLakeStoreAccount
389395
:raises: ~azure.core.exceptions.HttpResponseError
390396
"""
391-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
397+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
392398
error_map = {
393399
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
394400
}
@@ -433,10 +439,10 @@ async def _update_initial(
433439
self,
434440
resource_group_name: str,
435441
account_name: str,
436-
parameters: "models.UpdateDataLakeStoreAccountParameters",
442+
parameters: "_models.UpdateDataLakeStoreAccountParameters",
437443
**kwargs
438-
) -> "models.DataLakeStoreAccount":
439-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
444+
) -> "_models.DataLakeStoreAccount":
445+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
440446
error_map = {
441447
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
442448
}
@@ -493,9 +499,9 @@ async def begin_update(
493499
self,
494500
resource_group_name: str,
495501
account_name: str,
496-
parameters: "models.UpdateDataLakeStoreAccountParameters",
502+
parameters: "_models.UpdateDataLakeStoreAccountParameters",
497503
**kwargs
498-
) -> AsyncLROPoller["models.DataLakeStoreAccount"]:
504+
) -> AsyncLROPoller["_models.DataLakeStoreAccount"]:
499505
"""Updates the specified Data Lake Store account information.
500506
501507
:param resource_group_name: The name of the Azure resource group.
@@ -515,7 +521,7 @@ async def begin_update(
515521
:raises ~azure.core.exceptions.HttpResponseError:
516522
"""
517523
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
518-
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
524+
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
519525
lro_delay = kwargs.pop(
520526
'polling_interval',
521527
self._config.polling_interval
@@ -540,7 +546,13 @@ def get_long_running_output(pipeline_response):
540546
return cls(pipeline_response, deserialized, {})
541547
return deserialized
542548

543-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
549+
path_format_arguments = {
550+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
551+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
552+
'accountName': self._serialize.url("account_name", account_name, 'str'),
553+
}
554+
555+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
544556
elif polling is False: polling_method = AsyncNoPolling()
545557
else: polling_method = polling
546558
if cont_token:
@@ -640,7 +652,13 @@ def get_long_running_output(pipeline_response):
640652
if cls:
641653
return cls(pipeline_response, None, {})
642654

643-
if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
655+
path_format_arguments = {
656+
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
657+
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
658+
'accountName': self._serialize.url("account_name", account_name, 'str'),
659+
}
660+
661+
if polling is True: polling_method = AsyncARMPolling(lro_delay, path_format_arguments=path_format_arguments, **kwargs)
644662
elif polling is False: polling_method = AsyncNoPolling()
645663
else: polling_method = polling
646664
if cont_token:
@@ -711,27 +729,25 @@ async def enable_key_vault(
711729
async def check_name_availability(
712730
self,
713731
location: str,
714-
name: str,
732+
parameters: "_models.CheckNameAvailabilityParameters",
715733
**kwargs
716-
) -> "models.NameAvailabilityInformation":
734+
) -> "_models.NameAvailabilityInformation":
717735
"""Checks whether the specified account name is available or taken.
718736
719737
:param location: The resource location without whitespace.
720738
:type location: str
721-
:param name: The Data Lake Store name to check availability for.
722-
:type name: str
739+
:param parameters: Parameters supplied to check the Data Lake Store account name availability.
740+
:type parameters: ~azure.mgmt.datalake.store.models.CheckNameAvailabilityParameters
723741
:keyword callable cls: A custom type or function that will be passed the direct response
724742
:return: NameAvailabilityInformation, or the result of cls(response)
725743
:rtype: ~azure.mgmt.datalake.store.models.NameAvailabilityInformation
726744
:raises: ~azure.core.exceptions.HttpResponseError
727745
"""
728-
cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityInformation"]
746+
cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailabilityInformation"]
729747
error_map = {
730748
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
731749
}
732750
error_map.update(kwargs.pop('error_map', {}))
733-
734-
_parameters = models.CheckNameAvailabilityParameters(name=name)
735751
api_version = "2016-11-01"
736752
content_type = kwargs.pop("content_type", "application/json")
737753
accept = "application/json"
@@ -754,7 +770,7 @@ async def check_name_availability(
754770
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')
755771

756772
body_content_kwargs = {} # type: Dict[str, Any]
757-
body_content = self._serialize.body(_parameters, 'CheckNameAvailabilityParameters')
773+
body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters')
758774
body_content_kwargs['content'] = body_content
759775
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
760776
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)

0 commit comments

Comments
 (0)