Skip to content

Commit

Permalink
[T2] GA datalake-store (#15887)
Browse files Browse the repository at this point in the history
  • Loading branch information
00Kai0 authored Jan 6, 2021
1 parent 7669b31 commit 9fada36
Show file tree
Hide file tree
Showing 19 changed files with 339 additions and 343 deletions.
14 changes: 14 additions & 0 deletions sdk/datalake/azure-mgmt-datalake-store/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# Release History

## 1.0.0 (2020-12-21)

**Breaking changes**

- Operation FirewallRulesOperations.create_or_update has a new signature
- Operation FirewallRulesOperations.update has a new signature
- Operation VirtualNetworkRulesOperations.create_or_update has a new signature
- Operation VirtualNetworkRulesOperations.update has a new signature
- Operation TrustedIdProvidersOperations.create_or_update has a new signature
- Operation TrustedIdProvidersOperations.update has a new signature
- Operation AccountsOperations.check_name_availability has a new signature
- Operation FirewallRulesOperations.update has a new signature
- Operation FirewallRulesOperations.create_or_update has a new signature

## 1.0.0b1 (2020-10-31)

This is beta preview version.
Expand Down
2 changes: 2 additions & 0 deletions sdk/datalake/azure-mgmt-datalake-store/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
recursive-include tests *.py *.yaml
include *.md
include azure/__init__.py
include azure/mgmt/__init__.py
include azure/mgmt/datalake/__init__.py

49 changes: 12 additions & 37 deletions sdk/datalake/azure-mgmt-datalake-store/README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,9 @@
## Microsoft Azure SDK for Python
This is the Microsoft Azure Data Lake Store Management Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs
that replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7.

For the older Azure Service Management (ASM) libraries, see
[azure-servicemanagement-legacy](https://pypi.python.org/pypi/azure-servicemanagement-legacy)
library.

For a more complete set of Azure libraries, see the
[azure sdk python release](https://aka.ms/azsdk/python/all).

## Compatibility
# Microsoft Azure SDK for Python

**IMPORTANT**: If you have an earlier version of the azure package
(version < 1.0), you should uninstall it before installing this
package.

You can check the version using pip:

``` shell
pip freeze
```

If you see azure==0.11.0 (or any version below 1.0), uninstall it first:
This is the Microsoft Azure Data Lake Store Management Client Library.
This package has been tested with Python 2.7, 3.5, 3.6, 3.7 and 3.8.
For a more complete view of Azure libraries, see the [azure sdk python release](https://aka.ms/azsdk/python/all).

``` shell
pip uninstall azure
```

# Usage

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



For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/)
For docs and references, see [Python SDK References](https://docs.microsoft.com/python/api/overview/azure/data-lake-store)
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.
Additional code samples for different Azure services are available at [Samples Repo](https://aka.ms/azsdk/python/mgmt/samples)

## Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in
the [Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.
# Provide Feedback

If you encounter any bugs or have suggestions, please file an issue in the
[Issues](https://github.com/Azure/azure-sdk-for-python/issues)
section of the project.


![image](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-datalake-store%2FREADME.png)
![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-python%2Fazure-mgmt-datalake-store%2FREADME.png)
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +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 @@ -16,7 +16,7 @@
from azure.mgmt.core.exceptions import ARMErrorFormat
from azure.mgmt.core.polling.async_arm_polling import AsyncARMPolling

from ... import models
from ... import models as _models

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

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -52,7 +52,7 @@ def list(
orderby: Optional[str] = None,
count: Optional[bool] = None,
**kwargs
) -> AsyncIterable["models.DataLakeStoreAccountListResult"]:
) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]:
"""Lists the Data Lake Store accounts within the subscription. The response includes a link to the
next page of results, if any.
Expand All @@ -77,7 +77,7 @@ def list(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -154,7 +154,7 @@ def list_by_resource_group(
orderby: Optional[str] = None,
count: Optional[bool] = None,
**kwargs
) -> AsyncIterable["models.DataLakeStoreAccountListResult"]:
) -> AsyncIterable["_models.DataLakeStoreAccountListResult"]:
"""Lists the Data Lake Store accounts within a specific resource group. The response includes a
link to the next page of results, if any.
Expand All @@ -181,7 +181,7 @@ def list_by_resource_group(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.datalake.store.models.DataLakeStoreAccountListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccountListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccountListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -253,10 +253,10 @@ async def _create_initial(
self,
resource_group_name: str,
account_name: str,
parameters: "models.CreateDataLakeStoreAccountParameters",
parameters: "_models.CreateDataLakeStoreAccountParameters",
**kwargs
) -> "models.DataLakeStoreAccount":
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
) -> "_models.DataLakeStoreAccount":
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -310,9 +310,9 @@ async def begin_create(
self,
resource_group_name: str,
account_name: str,
parameters: "models.CreateDataLakeStoreAccountParameters",
parameters: "_models.CreateDataLakeStoreAccountParameters",
**kwargs
) -> AsyncLROPoller["models.DataLakeStoreAccount"]:
) -> AsyncLROPoller["_models.DataLakeStoreAccount"]:
"""Creates the specified Data Lake Store account.
:param resource_group_name: The name of the Azure resource group.
Expand All @@ -332,7 +332,7 @@ async def begin_create(
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
Expand All @@ -357,7 +357,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized

if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'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)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand All @@ -376,7 +382,7 @@ async def get(
resource_group_name: str,
account_name: str,
**kwargs
) -> "models.DataLakeStoreAccount":
) -> "_models.DataLakeStoreAccount":
"""Gets the specified Data Lake Store account.
:param resource_group_name: The name of the Azure resource group.
Expand All @@ -388,7 +394,7 @@ async def get(
:rtype: ~azure.mgmt.datalake.store.models.DataLakeStoreAccount
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -433,10 +439,10 @@ async def _update_initial(
self,
resource_group_name: str,
account_name: str,
parameters: "models.UpdateDataLakeStoreAccountParameters",
parameters: "_models.UpdateDataLakeStoreAccountParameters",
**kwargs
) -> "models.DataLakeStoreAccount":
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
) -> "_models.DataLakeStoreAccount":
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -493,9 +499,9 @@ async def begin_update(
self,
resource_group_name: str,
account_name: str,
parameters: "models.UpdateDataLakeStoreAccountParameters",
parameters: "_models.UpdateDataLakeStoreAccountParameters",
**kwargs
) -> AsyncLROPoller["models.DataLakeStoreAccount"]:
) -> AsyncLROPoller["_models.DataLakeStoreAccount"]:
"""Updates the specified Data Lake Store account information.
:param resource_group_name: The name of the Azure resource group.
Expand All @@ -515,7 +521,7 @@ async def begin_update(
:raises ~azure.core.exceptions.HttpResponseError:
"""
polling = kwargs.pop('polling', True) # type: Union[bool, AsyncPollingMethod]
cls = kwargs.pop('cls', None) # type: ClsType["models.DataLakeStoreAccount"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.DataLakeStoreAccount"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
Expand All @@ -540,7 +546,13 @@ def get_long_running_output(pipeline_response):
return cls(pipeline_response, deserialized, {})
return deserialized

if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'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)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -640,7 +652,13 @@ def get_long_running_output(pipeline_response):
if cls:
return cls(pipeline_response, None, {})

if polling is True: polling_method = AsyncARMPolling(lro_delay, **kwargs)
path_format_arguments = {
'subscriptionId': self._serialize.url("self._config.subscription_id", self._config.subscription_id, 'str'),
'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'),
'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)
elif polling is False: polling_method = AsyncNoPolling()
else: polling_method = polling
if cont_token:
Expand Down Expand Up @@ -711,27 +729,25 @@ async def enable_key_vault(
async def check_name_availability(
self,
location: str,
name: str,
parameters: "_models.CheckNameAvailabilityParameters",
**kwargs
) -> "models.NameAvailabilityInformation":
) -> "_models.NameAvailabilityInformation":
"""Checks whether the specified account name is available or taken.
:param location: The resource location without whitespace.
:type location: str
:param name: The Data Lake Store name to check availability for.
:type name: str
:param parameters: Parameters supplied to check the Data Lake Store account name availability.
:type parameters: ~azure.mgmt.datalake.store.models.CheckNameAvailabilityParameters
:keyword callable cls: A custom type or function that will be passed the direct response
:return: NameAvailabilityInformation, or the result of cls(response)
:rtype: ~azure.mgmt.datalake.store.models.NameAvailabilityInformation
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.NameAvailabilityInformation"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.NameAvailabilityInformation"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
error_map.update(kwargs.pop('error_map', {}))

_parameters = models.CheckNameAvailabilityParameters(name=name)
api_version = "2016-11-01"
content_type = kwargs.pop("content_type", "application/json")
accept = "application/json"
Expand All @@ -754,7 +770,7 @@ async def check_name_availability(
header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

body_content_kwargs = {} # type: Dict[str, Any]
body_content = self._serialize.body(_parameters, 'CheckNameAvailabilityParameters')
body_content = self._serialize.body(parameters, 'CheckNameAvailabilityParameters')
body_content_kwargs['content'] = body_content
request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
pipeline_response = await self._client._pipeline.run(request, stream=False, **kwargs)
Expand Down
Loading

0 comments on commit 9fada36

Please sign in to comment.