Skip to content

Commit

Permalink
GA hdinsight track2 sdk (#15884)
Browse files Browse the repository at this point in the history
  • Loading branch information
00Kai0 authored Jan 4, 2021
1 parent 17d5d61 commit 0e8a8d4
Show file tree
Hide file tree
Showing 40 changed files with 2,050 additions and 4,711 deletions.
21 changes: 20 additions & 1 deletion sdk/hdinsight/azure-mgmt-hdinsight/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Release History

## 7.0.0 (2020-12-18)

**Features**

- Model HostInfo has a new parameter effective_disk_encryption_key_url
- Model HostInfo has a new parameter fqdn
- Model ClusterGetProperties has a new parameter compute_isolation_properties
- Model ClusterCreateProperties has a new parameter compute_isolation_properties

**Breaking changes**

- Operation ExtensionsOperations.begin_create has a new signature
- Operation ClustersOperations.begin_update_auto_scale_configuration has a new signature
- Operation ClustersOperations.begin_resize has a new signature
- Operation ClustersOperations.update has a new signature
- Operation ExtensionsOperations.begin_create has a new signature
- Operation ExtensionsOperations.begin_enable_monitoring has a new signature
- Operation ClustersOperations.begin_execute_script_actions has a new signature

## 7.0.0b1 (2020-10-31)

This is beta preview version.
Expand Down Expand Up @@ -155,4 +174,4 @@ Stable versionning of the 0.3.0 (no changes)

## 0.1.0 (2018-08-08)

- Initial Release
- Initial Release
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 = "7.0.0b1"
VERSION = "7.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 ApplicationsOperations:
:param deserializer: An object model deserializer.
"""

models = models
models = _models

def __init__(self, client, config, serializer, deserializer) -> None:
self._client = client
Expand All @@ -48,7 +48,7 @@ def list_by_cluster(
resource_group_name: str,
cluster_name: str,
**kwargs
) -> AsyncIterable["models.ApplicationListResult"]:
) -> AsyncIterable["_models.ApplicationListResult"]:
"""Lists all of the applications for the HDInsight cluster.
:param resource_group_name: The name of the resource group.
Expand All @@ -60,7 +60,7 @@ def list_by_cluster(
:rtype: ~azure.core.async_paging.AsyncItemPaged[~azure.mgmt.hdinsight.models.ApplicationListResult]
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.ApplicationListResult"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.ApplicationListResult"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -107,7 +107,7 @@ async def get_next(next_link=None):
response = pipeline_response.http_response

if response.status_code not in [200]:
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
map_error(status_code=response.status_code, response=response, error_map=error_map)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

Expand All @@ -124,7 +124,7 @@ async def get(
cluster_name: str,
application_name: str,
**kwargs
) -> "models.Application":
) -> "_models.Application":
"""Gets properties of the specified application.
:param resource_group_name: The name of the resource group.
Expand All @@ -138,7 +138,7 @@ async def get(
:rtype: ~azure.mgmt.hdinsight.models.Application
:raises: ~azure.core.exceptions.HttpResponseError
"""
cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -170,7 +170,7 @@ async def get(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Application', pipeline_response)
Expand All @@ -186,10 +186,10 @@ async def _create_initial(
resource_group_name: str,
cluster_name: str,
application_name: str,
parameters: "models.Application",
parameters: "_models.Application",
**kwargs
) -> "models.Application":
cls = kwargs.pop('cls', None) # type: ClsType["models.Application"]
) -> "_models.Application":
cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"]
error_map = {
401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
}
Expand Down Expand Up @@ -226,7 +226,7 @@ async def _create_initial(

if response.status_code not in [200]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

deserialized = self._deserialize('Application', pipeline_response)
Expand All @@ -242,9 +242,9 @@ async def begin_create(
resource_group_name: str,
cluster_name: str,
application_name: str,
parameters: "models.Application",
parameters: "_models.Application",
**kwargs
) -> AsyncLROPoller["models.Application"]:
) -> AsyncLROPoller["_models.Application"]:
"""Creates applications for the HDInsight cluster.
:param resource_group_name: The name of the resource group.
Expand All @@ -266,7 +266,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.Application"]
cls = kwargs.pop('cls', None) # type: ClsType["_models.Application"]
lro_delay = kwargs.pop(
'polling_interval',
self._config.polling_interval
Expand All @@ -292,7 +292,14 @@ 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'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
'applicationName': self._serialize.url("application_name", application_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 @@ -345,7 +352,7 @@ async def _delete_initial(

if response.status_code not in [200, 202]:
map_error(status_code=response.status_code, response=response, error_map=error_map)
error = self._deserialize(models.ErrorResponse, response)
error = self._deserialize(_models.ErrorResponse, response)
raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

if cls:
Expand Down Expand Up @@ -401,7 +408,14 @@ 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'),
'clusterName': self._serialize.url("cluster_name", cluster_name, 'str'),
'applicationName': self._serialize.url("application_name", application_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
Loading

0 comments on commit 0e8a8d4

Please sign in to comment.