diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3267f946a625..90cfff5147be 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -18,6 +18,7 @@ /azure-mgmt-datalake-store/ @ro-joowan /azure-mgmt-datamigration/ @vchske /azure-mgmt-eventgrid/ @kalyanaj +/azure-mgmt-hdinsight/ @wawon-msft /azure-mgmt-keyvault/ @schaabs /azure-mgmt-machinelearningcompute/ @shutchings /azure-mgmt-recoveryservices/ @DheerendraRathor diff --git a/azure-mgmt-hdinsight/HISTORY.rst b/azure-mgmt-hdinsight/HISTORY.rst new file mode 100644 index 000000000000..8924d5d6c445 --- /dev/null +++ b/azure-mgmt-hdinsight/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (1970-01-01) +++++++++++++++++++ + +* Initial Release diff --git a/azure-mgmt-hdinsight/MANIFEST.in b/azure-mgmt-hdinsight/MANIFEST.in new file mode 100644 index 000000000000..9ecaeb15de50 --- /dev/null +++ b/azure-mgmt-hdinsight/MANIFEST.in @@ -0,0 +1,2 @@ +include *.rst +include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-hdinsight/README.rst b/azure-mgmt-hdinsight/README.rst new file mode 100644 index 000000000000..ccfa7f8ac327 --- /dev/null +++ b/azure-mgmt-hdinsight/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure HDInsight 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.3, 3.4, 3.5 and 3.6. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ library. + +For a more complete set of Azure libraries, see the `azure `__ bundle package. + + +Compatibility +============= + +**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: + +.. code:: shell + + pip freeze + +If you see azure==0.11.0 (or any version below 1.0), uninstall it first: + +.. code:: shell + + pip uninstall azure + + +Usage +===== + +For code examples, see `HDInsight +`__ +on readthedocs.org. + + +Provide Feedback +================ + +If you encounter any bugs or have suggestions, please file an issue in the +`Issues `__ +section of the project. diff --git a/azure-mgmt-hdinsight/azure/__init__.py b/azure-mgmt-hdinsight/azure/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-hdinsight/azure/mgmt/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/__init__.py new file mode 100644 index 000000000000..de40ea7ca058 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/__init__.py @@ -0,0 +1 @@ +__import__('pkg_resources').declare_namespace(__name__) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/__init__.py new file mode 100644 index 000000000000..d2acd294f586 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/__init__.py @@ -0,0 +1,18 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .hd_insight_management_client import HDInsightManagementClient +from .version import VERSION + +__all__ = ['HDInsightManagementClient'] + +__version__ = VERSION + diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py new file mode 100644 index 000000000000..817668024088 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py @@ -0,0 +1,120 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.service_client import SDKClient +from msrest import Serializer, Deserializer +from msrestazure import AzureConfiguration +from .version import VERSION +from .operations.clusters_operations import ClustersOperations +from .operations.applications_operations import ApplicationsOperations +from .operations.locations_operations import LocationsOperations +from .operations.configurations_operations import ConfigurationsOperations +from .operations.extensions_operations import ExtensionsOperations +from .operations.script_actions_operations import ScriptActionsOperations +from .operations.script_execution_history_operations import ScriptExecutionHistoryOperations +from .operations.operations import Operations +from . import models + + +class HDInsightManagementClientConfiguration(AzureConfiguration): + """Configuration for HDInsightManagementClient + Note that all parameters used to create this instance are saved as instance + attributes. + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + if credentials is None: + raise ValueError("Parameter 'credentials' must not be None.") + if subscription_id is None: + raise ValueError("Parameter 'subscription_id' must not be None.") + if not base_url: + base_url = 'https://management.azure.com' + + super(HDInsightManagementClientConfiguration, self).__init__(base_url) + + self.add_user_agent('azure-mgmt-hdinsight/{}'.format(VERSION)) + self.add_user_agent('Azure-SDK-For-Python') + + self.credentials = credentials + self.subscription_id = subscription_id + + +class HDInsightManagementClient(SDKClient): + """HDInsight Management Client + + :ivar config: Configuration for client. + :vartype config: HDInsightManagementClientConfiguration + + :ivar clusters: Clusters operations + :vartype clusters: azure.mgmt.hdinsight.operations.ClustersOperations + :ivar applications: Applications operations + :vartype applications: azure.mgmt.hdinsight.operations.ApplicationsOperations + :ivar locations: Locations operations + :vartype locations: azure.mgmt.hdinsight.operations.LocationsOperations + :ivar configurations: Configurations operations + :vartype configurations: azure.mgmt.hdinsight.operations.ConfigurationsOperations + :ivar extensions: Extensions operations + :vartype extensions: azure.mgmt.hdinsight.operations.ExtensionsOperations + :ivar script_actions: ScriptActions operations + :vartype script_actions: azure.mgmt.hdinsight.operations.ScriptActionsOperations + :ivar script_execution_history: ScriptExecutionHistory operations + :vartype script_execution_history: azure.mgmt.hdinsight.operations.ScriptExecutionHistoryOperations + :ivar operations: Operations operations + :vartype operations: azure.mgmt.hdinsight.operations.Operations + + :param credentials: Credentials needed for the client to connect to Azure. + :type credentials: :mod:`A msrestazure Credentials + object` + :param subscription_id: The subscription credentials which uniquely + identify Microsoft Azure subscription. The subscription ID forms part of + the URI for every service call. + :type subscription_id: str + :param str base_url: Service URL + """ + + def __init__( + self, credentials, subscription_id, base_url=None): + + self.config = HDInsightManagementClientConfiguration(credentials, subscription_id, base_url) + super(HDInsightManagementClient, self).__init__(self.config.credentials, self.config) + + client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} + self.api_version = '2018-06-01-preview' + self._serialize = Serializer(client_models) + self._deserialize = Deserializer(client_models) + + self.clusters = ClustersOperations( + self._client, self.config, self._serialize, self._deserialize) + self.applications = ApplicationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.locations = LocationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.configurations = ConfigurationsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.extensions = ExtensionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.script_actions = ScriptActionsOperations( + self._client, self.config, self._serialize, self._deserialize) + self.script_execution_history = ScriptExecutionHistoryOperations( + self._client, self.config, self._serialize, self._deserialize) + self.operations = Operations( + self._client, self.config, self._serialize, self._deserialize) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py new file mode 100644 index 000000000000..5cf5b297b638 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -0,0 +1,177 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +try: + from .cluster_definition_py3 import ClusterDefinition + from .security_profile_py3 import SecurityProfile + from .hardware_profile_py3 import HardwareProfile + from .virtual_network_profile_py3 import VirtualNetworkProfile + from .data_disks_groups_py3 import DataDisksGroups + from .ssh_public_key_py3 import SshPublicKey + from .ssh_profile_py3 import SshProfile + from .linux_operating_system_profile_py3 import LinuxOperatingSystemProfile + from .os_profile_py3 import OsProfile + from .script_action_py3 import ScriptAction + from .role_py3 import Role + from .compute_profile_py3 import ComputeProfile + from .storage_account_py3 import StorageAccount + from .storage_profile_py3 import StorageProfile + from .cluster_create_properties_py3 import ClusterCreateProperties + from .cluster_create_parameters_extended_py3 import ClusterCreateParametersExtended + from .cluster_patch_parameters_py3 import ClusterPatchParameters + from .quota_info_py3 import QuotaInfo + from .errors_py3 import Errors + from .connectivity_endpoint_py3 import ConnectivityEndpoint + from .cluster_get_properties_py3 import ClusterGetProperties + from .cluster_py3 import Cluster + from .runtime_script_action_py3 import RuntimeScriptAction + from .execute_script_action_parameters_py3 import ExecuteScriptActionParameters + from .cluster_list_persisted_script_actions_result_py3 import ClusterListPersistedScriptActionsResult + from .script_action_execution_summary_py3 import ScriptActionExecutionSummary + from .runtime_script_action_detail_py3 import RuntimeScriptActionDetail + from .cluster_list_runtime_script_action_detail_result_py3 import ClusterListRuntimeScriptActionDetailResult + from .cluster_resize_parameters_py3 import ClusterResizeParameters + from .operation_resource_py3 import OperationResource + from .resource_py3 import Resource + from .tracked_resource_py3 import TrackedResource + from .proxy_resource_py3 import ProxyResource + from .error_response_py3 import ErrorResponse, ErrorResponseException + from .application_get_https_endpoint_py3 import ApplicationGetHttpsEndpoint + from .application_get_endpoint_py3 import ApplicationGetEndpoint + from .application_properties_py3 import ApplicationProperties + from .application_py3 import Application + from .localized_name_py3 import LocalizedName + from .usage_py3 import Usage + from .usages_list_result_py3 import UsagesListResult + from .extension_py3 import Extension + from .cluster_monitoring_response_py3 import ClusterMonitoringResponse + from .cluster_monitoring_request_py3 import ClusterMonitoringRequest + from .script_action_persisted_get_response_spec_py3 import ScriptActionPersistedGetResponseSpec + from .operation_display_py3 import OperationDisplay + from .operation_py3 import Operation +except (SyntaxError, ImportError): + from .cluster_definition import ClusterDefinition + from .security_profile import SecurityProfile + from .hardware_profile import HardwareProfile + from .virtual_network_profile import VirtualNetworkProfile + from .data_disks_groups import DataDisksGroups + from .ssh_public_key import SshPublicKey + from .ssh_profile import SshProfile + from .linux_operating_system_profile import LinuxOperatingSystemProfile + from .os_profile import OsProfile + from .script_action import ScriptAction + from .role import Role + from .compute_profile import ComputeProfile + from .storage_account import StorageAccount + from .storage_profile import StorageProfile + from .cluster_create_properties import ClusterCreateProperties + from .cluster_create_parameters_extended import ClusterCreateParametersExtended + from .cluster_patch_parameters import ClusterPatchParameters + from .quota_info import QuotaInfo + from .errors import Errors + from .connectivity_endpoint import ConnectivityEndpoint + from .cluster_get_properties import ClusterGetProperties + from .cluster import Cluster + from .runtime_script_action import RuntimeScriptAction + from .execute_script_action_parameters import ExecuteScriptActionParameters + from .cluster_list_persisted_script_actions_result import ClusterListPersistedScriptActionsResult + from .script_action_execution_summary import ScriptActionExecutionSummary + from .runtime_script_action_detail import RuntimeScriptActionDetail + from .cluster_list_runtime_script_action_detail_result import ClusterListRuntimeScriptActionDetailResult + from .cluster_resize_parameters import ClusterResizeParameters + from .operation_resource import OperationResource + from .resource import Resource + from .tracked_resource import TrackedResource + from .proxy_resource import ProxyResource + from .error_response import ErrorResponse, ErrorResponseException + from .application_get_https_endpoint import ApplicationGetHttpsEndpoint + from .application_get_endpoint import ApplicationGetEndpoint + from .application_properties import ApplicationProperties + from .application import Application + from .localized_name import LocalizedName + from .usage import Usage + from .usages_list_result import UsagesListResult + from .extension import Extension + from .cluster_monitoring_response import ClusterMonitoringResponse + from .cluster_monitoring_request import ClusterMonitoringRequest + from .script_action_persisted_get_response_spec import ScriptActionPersistedGetResponseSpec + from .operation_display import OperationDisplay + from .operation import Operation +from .cluster_paged import ClusterPaged +from .application_paged import ApplicationPaged +from .runtime_script_action_detail_paged import RuntimeScriptActionDetailPaged +from .operation_paged import OperationPaged +from .hd_insight_management_client_enums import ( + DirectoryType, + OSType, + Tier, + HDInsightClusterProvisioningState, + AsyncOperationState, +) + +__all__ = [ + 'ClusterDefinition', + 'SecurityProfile', + 'HardwareProfile', + 'VirtualNetworkProfile', + 'DataDisksGroups', + 'SshPublicKey', + 'SshProfile', + 'LinuxOperatingSystemProfile', + 'OsProfile', + 'ScriptAction', + 'Role', + 'ComputeProfile', + 'StorageAccount', + 'StorageProfile', + 'ClusterCreateProperties', + 'ClusterCreateParametersExtended', + 'ClusterPatchParameters', + 'QuotaInfo', + 'Errors', + 'ConnectivityEndpoint', + 'ClusterGetProperties', + 'Cluster', + 'RuntimeScriptAction', + 'ExecuteScriptActionParameters', + 'ClusterListPersistedScriptActionsResult', + 'ScriptActionExecutionSummary', + 'RuntimeScriptActionDetail', + 'ClusterListRuntimeScriptActionDetailResult', + 'ClusterResizeParameters', + 'OperationResource', + 'Resource', + 'TrackedResource', + 'ProxyResource', + 'ErrorResponse', 'ErrorResponseException', + 'ApplicationGetHttpsEndpoint', + 'ApplicationGetEndpoint', + 'ApplicationProperties', + 'Application', + 'LocalizedName', + 'Usage', + 'UsagesListResult', + 'Extension', + 'ClusterMonitoringResponse', + 'ClusterMonitoringRequest', + 'ScriptActionPersistedGetResponseSpec', + 'OperationDisplay', + 'Operation', + 'ClusterPaged', + 'ApplicationPaged', + 'RuntimeScriptActionDetailPaged', + 'OperationPaged', + 'DirectoryType', + 'OSType', + 'Tier', + 'HDInsightClusterProvisioningState', + 'AsyncOperationState', +] diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application.py new file mode 100644 index 000000000000..fa0ede6700d4 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource import ProxyResource + + +class Application(ProxyResource): + """The HDInsight cluster application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param etag: The ETag for the application + :type etag: str + :param tags: The tags for the application. + :type tags: dict[str, str] + :param properties: The properties of the application. + :type properties: ~azure.mgmt.hdinsight.models.ApplicationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ApplicationProperties'}, + } + + def __init__(self, **kwargs): + super(Application, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py new file mode 100644 index 000000000000..c4b9f5cd1be7 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationGetEndpoint(Model): + """Gets the application SSH endpoint. + + :param location: The location of the endpoint. + :type location: str + :param destination_port: The destination port to connect to. + :type destination_port: int + :param public_port: The public port to connect to. + :type public_port: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'int'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApplicationGetEndpoint, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.destination_port = kwargs.get('destination_port', None) + self.public_port = kwargs.get('public_port', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint_py3.py new file mode 100644 index 000000000000..7496fb1c7693 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationGetEndpoint(Model): + """Gets the application SSH endpoint. + + :param location: The location of the endpoint. + :type location: str + :param destination_port: The destination port to connect to. + :type destination_port: int + :param public_port: The public port to connect to. + :type public_port: int + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'int'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + } + + def __init__(self, *, location: str=None, destination_port: int=None, public_port: int=None, **kwargs) -> None: + super(ApplicationGetEndpoint, self).__init__(**kwargs) + self.location = location + self.destination_port = destination_port + self.public_port = public_port diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint.py new file mode 100644 index 000000000000..b8f265d5e4d4 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationGetHttpsEndpoint(Model): + """Gets the application HTTP endpoints. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, str] + :param access_modes: The list of access modes for the application. + :type access_modes: list[str] + :param location: The location of the endpoint. + :type location: str + :param destination_port: The destination port to connect to. + :type destination_port: int + :param public_port: The public port to connect to. + :type public_port: int + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{str}'}, + 'access_modes': {'key': 'accessModes', 'type': '[str]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'int'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ApplicationGetHttpsEndpoint, self).__init__(**kwargs) + self.additional_properties = kwargs.get('additional_properties', None) + self.access_modes = kwargs.get('access_modes', None) + self.location = kwargs.get('location', None) + self.destination_port = kwargs.get('destination_port', None) + self.public_port = kwargs.get('public_port', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint_py3.py new file mode 100644 index 000000000000..48942687a50a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationGetHttpsEndpoint(Model): + """Gets the application HTTP endpoints. + + :param additional_properties: Unmatched properties from the message are + deserialized this collection + :type additional_properties: dict[str, str] + :param access_modes: The list of access modes for the application. + :type access_modes: list[str] + :param location: The location of the endpoint. + :type location: str + :param destination_port: The destination port to connect to. + :type destination_port: int + :param public_port: The public port to connect to. + :type public_port: int + """ + + _attribute_map = { + 'additional_properties': {'key': '', 'type': '{str}'}, + 'access_modes': {'key': 'accessModes', 'type': '[str]'}, + 'location': {'key': 'location', 'type': 'str'}, + 'destination_port': {'key': 'destinationPort', 'type': 'int'}, + 'public_port': {'key': 'publicPort', 'type': 'int'}, + } + + def __init__(self, *, additional_properties=None, access_modes=None, location: str=None, destination_port: int=None, public_port: int=None, **kwargs) -> None: + super(ApplicationGetHttpsEndpoint, self).__init__(**kwargs) + self.additional_properties = additional_properties + self.access_modes = access_modes + self.location = location + self.destination_port = destination_port + self.public_port = public_port diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_paged.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_paged.py new file mode 100644 index 000000000000..4d8b02340d69 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ApplicationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Application ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Application]'} + } + + def __init__(self, *args, **kwargs): + + super(ApplicationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties.py new file mode 100644 index 000000000000..5f5e67ca6d47 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationProperties(Model): + """The HDInsight cluster application GET response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param compute_profile: The list of roles in the cluster. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param install_script_actions: The list of install script actions. + :type install_script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param uninstall_script_actions: The list of uninstall script actions. + :type uninstall_script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param https_endpoints: The list of application HTTPS endpoints. + :type https_endpoints: + list[~azure.mgmt.hdinsight.models.ApplicationGetHttpsEndpoint] + :param ssh_endpoints: The list of application SSH endpoints. + :type ssh_endpoints: + list[~azure.mgmt.hdinsight.models.ApplicationGetEndpoint] + :ivar provisioning_state: The provisioning state of the application. + :vartype provisioning_state: str + :param application_type: The application type. + :type application_type: str + :ivar application_state: The application state. + :vartype application_state: str + :param errors: The list of errors. + :type errors: list[~azure.mgmt.hdinsight.models.Errors] + :ivar created_date: The application create date time. + :vartype created_date: str + :ivar marketplace_identifier: The marketplace identifier. + :vartype marketplace_identifier: str + :param additional_properties: The additional properties for application. + :type additional_properties: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'application_state': {'readonly': True}, + 'created_date': {'readonly': True}, + 'marketplace_identifier': {'readonly': True}, + } + + _attribute_map = { + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'install_script_actions': {'key': 'installScriptActions', 'type': '[RuntimeScriptAction]'}, + 'uninstall_script_actions': {'key': 'uninstallScriptActions', 'type': '[RuntimeScriptAction]'}, + 'https_endpoints': {'key': 'httpsEndpoints', 'type': '[ApplicationGetHttpsEndpoint]'}, + 'ssh_endpoints': {'key': 'sshEndpoints', 'type': '[ApplicationGetEndpoint]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'application_type': {'key': 'applicationType', 'type': 'str'}, + 'application_state': {'key': 'applicationState', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[Errors]'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'marketplace_identifier': {'key': 'marketplaceIdentifier', 'type': 'str'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ApplicationProperties, self).__init__(**kwargs) + self.compute_profile = kwargs.get('compute_profile', None) + self.install_script_actions = kwargs.get('install_script_actions', None) + self.uninstall_script_actions = kwargs.get('uninstall_script_actions', None) + self.https_endpoints = kwargs.get('https_endpoints', None) + self.ssh_endpoints = kwargs.get('ssh_endpoints', None) + self.provisioning_state = None + self.application_type = kwargs.get('application_type', None) + self.application_state = None + self.errors = kwargs.get('errors', None) + self.created_date = None + self.marketplace_identifier = None + self.additional_properties = kwargs.get('additional_properties', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties_py3.py new file mode 100644 index 000000000000..81d958ec3648 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties_py3.py @@ -0,0 +1,86 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ApplicationProperties(Model): + """The HDInsight cluster application GET response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param compute_profile: The list of roles in the cluster. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param install_script_actions: The list of install script actions. + :type install_script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param uninstall_script_actions: The list of uninstall script actions. + :type uninstall_script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param https_endpoints: The list of application HTTPS endpoints. + :type https_endpoints: + list[~azure.mgmt.hdinsight.models.ApplicationGetHttpsEndpoint] + :param ssh_endpoints: The list of application SSH endpoints. + :type ssh_endpoints: + list[~azure.mgmt.hdinsight.models.ApplicationGetEndpoint] + :ivar provisioning_state: The provisioning state of the application. + :vartype provisioning_state: str + :param application_type: The application type. + :type application_type: str + :ivar application_state: The application state. + :vartype application_state: str + :param errors: The list of errors. + :type errors: list[~azure.mgmt.hdinsight.models.Errors] + :ivar created_date: The application create date time. + :vartype created_date: str + :ivar marketplace_identifier: The marketplace identifier. + :vartype marketplace_identifier: str + :param additional_properties: The additional properties for application. + :type additional_properties: str + """ + + _validation = { + 'provisioning_state': {'readonly': True}, + 'application_state': {'readonly': True}, + 'created_date': {'readonly': True}, + 'marketplace_identifier': {'readonly': True}, + } + + _attribute_map = { + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'install_script_actions': {'key': 'installScriptActions', 'type': '[RuntimeScriptAction]'}, + 'uninstall_script_actions': {'key': 'uninstallScriptActions', 'type': '[RuntimeScriptAction]'}, + 'https_endpoints': {'key': 'httpsEndpoints', 'type': '[ApplicationGetHttpsEndpoint]'}, + 'ssh_endpoints': {'key': 'sshEndpoints', 'type': '[ApplicationGetEndpoint]'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'str'}, + 'application_type': {'key': 'applicationType', 'type': 'str'}, + 'application_state': {'key': 'applicationState', 'type': 'str'}, + 'errors': {'key': 'errors', 'type': '[Errors]'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'marketplace_identifier': {'key': 'marketplaceIdentifier', 'type': 'str'}, + 'additional_properties': {'key': 'additionalProperties', 'type': 'str'}, + } + + def __init__(self, *, compute_profile=None, install_script_actions=None, uninstall_script_actions=None, https_endpoints=None, ssh_endpoints=None, application_type: str=None, errors=None, additional_properties: str=None, **kwargs) -> None: + super(ApplicationProperties, self).__init__(**kwargs) + self.compute_profile = compute_profile + self.install_script_actions = install_script_actions + self.uninstall_script_actions = uninstall_script_actions + self.https_endpoints = https_endpoints + self.ssh_endpoints = ssh_endpoints + self.provisioning_state = None + self.application_type = application_type + self.application_state = None + self.errors = errors + self.created_date = None + self.marketplace_identifier = None + self.additional_properties = additional_properties diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_py3.py new file mode 100644 index 000000000000..f7628ebf413c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .proxy_resource_py3 import ProxyResource + + +class Application(ProxyResource): + """The HDInsight cluster application. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param etag: The ETag for the application + :type etag: str + :param tags: The tags for the application. + :type tags: dict[str, str] + :param properties: The properties of the application. + :type properties: ~azure.mgmt.hdinsight.models.ApplicationProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ApplicationProperties'}, + } + + def __init__(self, *, etag: str=None, tags=None, properties=None, **kwargs) -> None: + super(Application, self).__init__(**kwargs) + self.etag = etag + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py new file mode 100644 index 000000000000..cff55f384b0c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource import TrackedResource + + +class Cluster(TrackedResource): + """The HDInsight cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The Azure Region where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param etag: The ETag for the resource + :type etag: str + :param properties: The properties of the cluster. + :type properties: ~azure.mgmt.hdinsight.models.ClusterGetProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClusterGetProperties'}, + } + + def __init__(self, **kwargs): + super(Cluster, self).__init__(**kwargs) + self.etag = kwargs.get('etag', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py new file mode 100644 index 000000000000..898754c65466 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterCreateParametersExtended(Model): + """The CreateCluster request parameters. + + :param location: The location of the cluster. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The cluster create parameters. + :type properties: ~azure.mgmt.hdinsight.models.ClusterCreateProperties + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterCreateProperties'}, + } + + def __init__(self, **kwargs): + super(ClusterCreateParametersExtended, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) + self.properties = kwargs.get('properties', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py new file mode 100644 index 000000000000..31dfb47324d2 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterCreateParametersExtended(Model): + """The CreateCluster request parameters. + + :param location: The location of the cluster. + :type location: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param properties: The cluster create parameters. + :type properties: ~azure.mgmt.hdinsight.models.ClusterCreateProperties + """ + + _attribute_map = { + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'properties': {'key': 'properties', 'type': 'ClusterCreateProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, properties=None, **kwargs) -> None: + super(ClusterCreateParametersExtended, self).__init__(**kwargs) + self.location = location + self.tags = tags + self.properties = properties diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py new file mode 100644 index 000000000000..2a3d9d82b770 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterCreateProperties(Model): + """The cluster create parameters. + + :param cluster_version: The version of the cluster. + :type cluster_version: str + :param os_type: The type of operating system. Possible values include: + 'Windows', 'Linux' + :type os_type: str or ~azure.mgmt.hdinsight.models.OSType + :param tier: The cluster tier. Possible values include: 'Standard', + 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + :param cluster_definition: The cluster definition. + :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition + :param security_profile: The security profile. + :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile + :param compute_profile: The compute profile. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param storage_profile: The storage profile. + :type storage_profile: ~azure.mgmt.hdinsight.models.StorageProfile + """ + + _attribute_map = { + 'cluster_version': {'key': 'clusterVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OSType'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + 'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'}, + 'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'}, + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + } + + def __init__(self, **kwargs): + super(ClusterCreateProperties, self).__init__(**kwargs) + self.cluster_version = kwargs.get('cluster_version', None) + self.os_type = kwargs.get('os_type', None) + self.tier = kwargs.get('tier', None) + self.cluster_definition = kwargs.get('cluster_definition', None) + self.security_profile = kwargs.get('security_profile', None) + self.compute_profile = kwargs.get('compute_profile', None) + self.storage_profile = kwargs.get('storage_profile', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties_py3.py new file mode 100644 index 000000000000..116d6af0eb95 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties_py3.py @@ -0,0 +1,54 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterCreateProperties(Model): + """The cluster create parameters. + + :param cluster_version: The version of the cluster. + :type cluster_version: str + :param os_type: The type of operating system. Possible values include: + 'Windows', 'Linux' + :type os_type: str or ~azure.mgmt.hdinsight.models.OSType + :param tier: The cluster tier. Possible values include: 'Standard', + 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + :param cluster_definition: The cluster definition. + :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition + :param security_profile: The security profile. + :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile + :param compute_profile: The compute profile. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param storage_profile: The storage profile. + :type storage_profile: ~azure.mgmt.hdinsight.models.StorageProfile + """ + + _attribute_map = { + 'cluster_version': {'key': 'clusterVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OSType'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + 'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'}, + 'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'}, + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'storage_profile': {'key': 'storageProfile', 'type': 'StorageProfile'}, + } + + def __init__(self, *, cluster_version: str=None, os_type=None, tier=None, cluster_definition=None, security_profile=None, compute_profile=None, storage_profile=None, **kwargs) -> None: + super(ClusterCreateProperties, self).__init__(**kwargs) + self.cluster_version = cluster_version + self.os_type = os_type + self.tier = tier + self.cluster_definition = cluster_definition + self.security_profile = security_profile + self.compute_profile = compute_profile + self.storage_profile = storage_profile diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py new file mode 100644 index 000000000000..7cd8bc5cb68d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterDefinition(Model): + """The cluster definition. + + :param blueprint: The link to the blueprint. + :type blueprint: str + :param kind: The type of cluster. + :type kind: str + :param component_version: The versions of different services in the + cluster. + :type component_version: dict[str, str] + :param configurations: The cluster configurations. + :type configurations: object + """ + + _attribute_map = { + 'blueprint': {'key': 'blueprint', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'component_version': {'key': 'componentVersion', 'type': '{str}'}, + 'configurations': {'key': 'configurations', 'type': 'object'}, + } + + def __init__(self, **kwargs): + super(ClusterDefinition, self).__init__(**kwargs) + self.blueprint = kwargs.get('blueprint', None) + self.kind = kwargs.get('kind', None) + self.component_version = kwargs.get('component_version', None) + self.configurations = kwargs.get('configurations', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition_py3.py new file mode 100644 index 000000000000..5ee220847c74 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterDefinition(Model): + """The cluster definition. + + :param blueprint: The link to the blueprint. + :type blueprint: str + :param kind: The type of cluster. + :type kind: str + :param component_version: The versions of different services in the + cluster. + :type component_version: dict[str, str] + :param configurations: The cluster configurations. + :type configurations: object + """ + + _attribute_map = { + 'blueprint': {'key': 'blueprint', 'type': 'str'}, + 'kind': {'key': 'kind', 'type': 'str'}, + 'component_version': {'key': 'componentVersion', 'type': '{str}'}, + 'configurations': {'key': 'configurations', 'type': 'object'}, + } + + def __init__(self, *, blueprint: str=None, kind: str=None, component_version=None, configurations=None, **kwargs) -> None: + super(ClusterDefinition, self).__init__(**kwargs) + self.blueprint = blueprint + self.kind = kind + self.component_version = component_version + self.configurations = configurations diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py new file mode 100644 index 000000000000..988d03dbf1a7 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterGetProperties(Model): + """The properties of cluster. + + All required parameters must be populated in order to send to Azure. + + :param cluster_version: The version of the cluster. + :type cluster_version: str + :param os_type: The type of operating system. Possible values include: + 'Windows', 'Linux' + :type os_type: str or ~azure.mgmt.hdinsight.models.OSType + :param tier: The cluster tier. Possible values include: 'Standard', + 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + :param cluster_definition: Required. The cluster definition. + :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition + :param security_profile: The security profile. + :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile + :param compute_profile: The compute profile. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param provisioning_state: The provisioning state, which only appears in + the response. Possible values include: 'InProgress', 'Failed', + 'Succeeded', 'Canceled', 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.hdinsight.models.HDInsightClusterProvisioningState + :param created_date: The date on which the cluster was created. + :type created_date: str + :param cluster_state: The state of the cluster. + :type cluster_state: str + :param quota_info: The quota information. + :type quota_info: ~azure.mgmt.hdinsight.models.QuotaInfo + :param errors: The list of errors. + :type errors: list[~azure.mgmt.hdinsight.models.Errors] + :param connectivity_endpoints: The list of connectivity endpoints. + :type connectivity_endpoints: + list[~azure.mgmt.hdinsight.models.ConnectivityEndpoint] + """ + + _validation = { + 'cluster_definition': {'required': True}, + } + + _attribute_map = { + 'cluster_version': {'key': 'clusterVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OSType'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + 'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'}, + 'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'}, + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'HDInsightClusterProvisioningState'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'cluster_state': {'key': 'clusterState', 'type': 'str'}, + 'quota_info': {'key': 'quotaInfo', 'type': 'QuotaInfo'}, + 'errors': {'key': 'errors', 'type': '[Errors]'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': '[ConnectivityEndpoint]'}, + } + + def __init__(self, **kwargs): + super(ClusterGetProperties, self).__init__(**kwargs) + self.cluster_version = kwargs.get('cluster_version', None) + self.os_type = kwargs.get('os_type', None) + self.tier = kwargs.get('tier', None) + self.cluster_definition = kwargs.get('cluster_definition', None) + self.security_profile = kwargs.get('security_profile', None) + self.compute_profile = kwargs.get('compute_profile', None) + self.provisioning_state = kwargs.get('provisioning_state', None) + self.created_date = kwargs.get('created_date', None) + self.cluster_state = kwargs.get('cluster_state', None) + self.quota_info = kwargs.get('quota_info', None) + self.errors = kwargs.get('errors', None) + self.connectivity_endpoints = kwargs.get('connectivity_endpoints', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties_py3.py new file mode 100644 index 000000000000..1c9024117dab --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties_py3.py @@ -0,0 +1,84 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterGetProperties(Model): + """The properties of cluster. + + All required parameters must be populated in order to send to Azure. + + :param cluster_version: The version of the cluster. + :type cluster_version: str + :param os_type: The type of operating system. Possible values include: + 'Windows', 'Linux' + :type os_type: str or ~azure.mgmt.hdinsight.models.OSType + :param tier: The cluster tier. Possible values include: 'Standard', + 'Premium' + :type tier: str or ~azure.mgmt.hdinsight.models.Tier + :param cluster_definition: Required. The cluster definition. + :type cluster_definition: ~azure.mgmt.hdinsight.models.ClusterDefinition + :param security_profile: The security profile. + :type security_profile: ~azure.mgmt.hdinsight.models.SecurityProfile + :param compute_profile: The compute profile. + :type compute_profile: ~azure.mgmt.hdinsight.models.ComputeProfile + :param provisioning_state: The provisioning state, which only appears in + the response. Possible values include: 'InProgress', 'Failed', + 'Succeeded', 'Canceled', 'Deleting' + :type provisioning_state: str or + ~azure.mgmt.hdinsight.models.HDInsightClusterProvisioningState + :param created_date: The date on which the cluster was created. + :type created_date: str + :param cluster_state: The state of the cluster. + :type cluster_state: str + :param quota_info: The quota information. + :type quota_info: ~azure.mgmt.hdinsight.models.QuotaInfo + :param errors: The list of errors. + :type errors: list[~azure.mgmt.hdinsight.models.Errors] + :param connectivity_endpoints: The list of connectivity endpoints. + :type connectivity_endpoints: + list[~azure.mgmt.hdinsight.models.ConnectivityEndpoint] + """ + + _validation = { + 'cluster_definition': {'required': True}, + } + + _attribute_map = { + 'cluster_version': {'key': 'clusterVersion', 'type': 'str'}, + 'os_type': {'key': 'osType', 'type': 'OSType'}, + 'tier': {'key': 'tier', 'type': 'Tier'}, + 'cluster_definition': {'key': 'clusterDefinition', 'type': 'ClusterDefinition'}, + 'security_profile': {'key': 'securityProfile', 'type': 'SecurityProfile'}, + 'compute_profile': {'key': 'computeProfile', 'type': 'ComputeProfile'}, + 'provisioning_state': {'key': 'provisioningState', 'type': 'HDInsightClusterProvisioningState'}, + 'created_date': {'key': 'createdDate', 'type': 'str'}, + 'cluster_state': {'key': 'clusterState', 'type': 'str'}, + 'quota_info': {'key': 'quotaInfo', 'type': 'QuotaInfo'}, + 'errors': {'key': 'errors', 'type': '[Errors]'}, + 'connectivity_endpoints': {'key': 'connectivityEndpoints', 'type': '[ConnectivityEndpoint]'}, + } + + def __init__(self, *, cluster_definition, cluster_version: str=None, os_type=None, tier=None, security_profile=None, compute_profile=None, provisioning_state=None, created_date: str=None, cluster_state: str=None, quota_info=None, errors=None, connectivity_endpoints=None, **kwargs) -> None: + super(ClusterGetProperties, self).__init__(**kwargs) + self.cluster_version = cluster_version + self.os_type = os_type + self.tier = tier + self.cluster_definition = cluster_definition + self.security_profile = security_profile + self.compute_profile = compute_profile + self.provisioning_state = provisioning_state + self.created_date = created_date + self.cluster_state = cluster_state + self.quota_info = quota_info + self.errors = errors + self.connectivity_endpoints = connectivity_endpoints diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result.py new file mode 100644 index 000000000000..861f9c41b350 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterListPersistedScriptActionsResult(Model): + """The ListPersistedScriptActions operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: The list of Persisted Script Actions. + :type value: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuntimeScriptAction]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterListPersistedScriptActionsResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.next_link = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result_py3.py new file mode 100644 index 000000000000..4127fa03333e --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result_py3.py @@ -0,0 +1,39 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterListPersistedScriptActionsResult(Model): + """The ListPersistedScriptActions operation response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param value: The list of Persisted Script Actions. + :type value: list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuntimeScriptAction]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(ClusterListPersistedScriptActionsResult, self).__init__(**kwargs) + self.value = value + self.next_link = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result.py new file mode 100644 index 000000000000..35fa9900f8ea --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterListRuntimeScriptActionDetailResult(Model): + """The list runtime script action detail response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of persisted script action details for the cluster. + :vartype value: + list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterListRuntimeScriptActionDetailResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result_py3.py new file mode 100644 index 000000000000..53ba6e0e8ebb --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterListRuntimeScriptActionDetailResult(Model): + """The list runtime script action detail response. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar value: The list of persisted script action details for the cluster. + :vartype value: + list[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail] + :ivar next_link: The link (url) to the next page of results. + :vartype next_link: str + """ + + _validation = { + 'value': {'readonly': True}, + 'next_link': {'readonly': True}, + } + + _attribute_map = { + 'value': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'}, + 'next_link': {'key': 'nextLink', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ClusterListRuntimeScriptActionDetailResult, self).__init__(**kwargs) + self.value = None + self.next_link = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py new file mode 100644 index 000000000000..27e116b7d044 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterMonitoringRequest(Model): + """The Operations Management Suite (OMS) parameters. + + :param workspace_id: The Operations Management Suite (OMS) workspace ID. + :type workspace_id: str + :param primary_key: The Operations Management Suite (OMS) workspace key. + :type primary_key: str + """ + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterMonitoringRequest, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.primary_key = kwargs.get('primary_key', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request_py3.py new file mode 100644 index 000000000000..c987cd545c14 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterMonitoringRequest(Model): + """The Operations Management Suite (OMS) parameters. + + :param workspace_id: The Operations Management Suite (OMS) workspace ID. + :type workspace_id: str + :param primary_key: The Operations Management Suite (OMS) workspace key. + :type primary_key: str + """ + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str=None, primary_key: str=None, **kwargs) -> None: + super(ClusterMonitoringRequest, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.primary_key = primary_key diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py new file mode 100644 index 000000000000..f77384d2d485 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterMonitoringResponse(Model): + """The Operations Management Suite (OMS) status response. + + :param cluster_monitoring_enabled: The status of the Operations Management + Suite (OMS) on the HDInsight cluster. + :type cluster_monitoring_enabled: bool + :param workspace_id: The workspace ID of the Operations Management Suite + (OMS) on the HDInsight cluster. + :type workspace_id: str + """ + + _attribute_map = { + 'cluster_monitoring_enabled': {'key': 'clusterMonitoringEnabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ClusterMonitoringResponse, self).__init__(**kwargs) + self.cluster_monitoring_enabled = kwargs.get('cluster_monitoring_enabled', None) + self.workspace_id = kwargs.get('workspace_id', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response_py3.py new file mode 100644 index 000000000000..c9cbae2530bc --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response_py3.py @@ -0,0 +1,34 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterMonitoringResponse(Model): + """The Operations Management Suite (OMS) status response. + + :param cluster_monitoring_enabled: The status of the Operations Management + Suite (OMS) on the HDInsight cluster. + :type cluster_monitoring_enabled: bool + :param workspace_id: The workspace ID of the Operations Management Suite + (OMS) on the HDInsight cluster. + :type workspace_id: str + """ + + _attribute_map = { + 'cluster_monitoring_enabled': {'key': 'clusterMonitoringEnabled', 'type': 'bool'}, + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + } + + def __init__(self, *, cluster_monitoring_enabled: bool=None, workspace_id: str=None, **kwargs) -> None: + super(ClusterMonitoringResponse, self).__init__(**kwargs) + self.cluster_monitoring_enabled = cluster_monitoring_enabled + self.workspace_id = workspace_id diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_paged.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_paged.py new file mode 100644 index 000000000000..ac485f03e31a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class ClusterPaged(Paged): + """ + A paging container for iterating over a list of :class:`Cluster ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Cluster]'} + } + + def __init__(self, *args, **kwargs): + + super(ClusterPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py new file mode 100644 index 000000000000..932f65ddf95e --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterPatchParameters(Model): + """The PatchCluster request parameters. + + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(ClusterPatchParameters, self).__init__(**kwargs) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters_py3.py new file mode 100644 index 000000000000..f4d55f5a33b9 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterPatchParameters(Model): + """The PatchCluster request parameters. + + :param tags: The resource tags. + :type tags: dict[str, str] + """ + + _attribute_map = { + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, tags=None, **kwargs) -> None: + super(ClusterPatchParameters, self).__init__(**kwargs) + self.tags = tags diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py new file mode 100644 index 000000000000..c73049d9c383 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .tracked_resource_py3 import TrackedResource + + +class Cluster(TrackedResource): + """The HDInsight cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The Azure Region where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + :param etag: The ETag for the resource + :type etag: str + :param properties: The properties of the cluster. + :type properties: ~azure.mgmt.hdinsight.models.ClusterGetProperties + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + 'etag': {'key': 'etag', 'type': 'str'}, + 'properties': {'key': 'properties', 'type': 'ClusterGetProperties'}, + } + + def __init__(self, *, location: str=None, tags=None, etag: str=None, properties=None, **kwargs) -> None: + super(Cluster, self).__init__(location=location, tags=tags, **kwargs) + self.etag = etag + self.properties = properties diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py new file mode 100644 index 000000000000..f0361279c481 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterResizeParameters(Model): + """The Resize Cluster request parameters. + + :param target_instance_count: The target instance count for the operation. + :type target_instance_count: int + """ + + _attribute_map = { + 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ClusterResizeParameters, self).__init__(**kwargs) + self.target_instance_count = kwargs.get('target_instance_count', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters_py3.py new file mode 100644 index 000000000000..cb065480e2e2 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ClusterResizeParameters(Model): + """The Resize Cluster request parameters. + + :param target_instance_count: The target instance count for the operation. + :type target_instance_count: int + """ + + _attribute_map = { + 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + } + + def __init__(self, *, target_instance_count: int=None, **kwargs) -> None: + super(ClusterResizeParameters, self).__init__(**kwargs) + self.target_instance_count = target_instance_count diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py new file mode 100644 index 000000000000..1ec4e2e32c7d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeProfile(Model): + """Describes the compute profile. + + :param roles: The list of roles in the cluster. + :type roles: list[~azure.mgmt.hdinsight.models.Role] + """ + + _attribute_map = { + 'roles': {'key': 'roles', 'type': '[Role]'}, + } + + def __init__(self, **kwargs): + super(ComputeProfile, self).__init__(**kwargs) + self.roles = kwargs.get('roles', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile_py3.py new file mode 100644 index 000000000000..74e7648c9dd0 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ComputeProfile(Model): + """Describes the compute profile. + + :param roles: The list of roles in the cluster. + :type roles: list[~azure.mgmt.hdinsight.models.Role] + """ + + _attribute_map = { + 'roles': {'key': 'roles', 'type': '[Role]'}, + } + + def __init__(self, *, roles=None, **kwargs) -> None: + super(ComputeProfile, self).__init__(**kwargs) + self.roles = roles diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py new file mode 100644 index 000000000000..4695541e6fad --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectivityEndpoint(Model): + """The connectivity properties. + + :param name: The name of the endpoint. + :type name: str + :param protocol: The protocol of the endpoint. + :type protocol: str + :param location: The location of the endpoint. + :type location: str + :param port: The port to connect to. + :type port: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ConnectivityEndpoint, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.protocol = kwargs.get('protocol', None) + self.location = kwargs.get('location', None) + self.port = kwargs.get('port', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint_py3.py new file mode 100644 index 000000000000..70f26074f5e8 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ConnectivityEndpoint(Model): + """The connectivity properties. + + :param name: The name of the endpoint. + :type name: str + :param protocol: The protocol of the endpoint. + :type protocol: str + :param location: The location of the endpoint. + :type location: str + :param port: The port to connect to. + :type port: int + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'protocol': {'key': 'protocol', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'port': {'key': 'port', 'type': 'int'}, + } + + def __init__(self, *, name: str=None, protocol: str=None, location: str=None, port: int=None, **kwargs) -> None: + super(ConnectivityEndpoint, self).__init__(**kwargs) + self.name = name + self.protocol = protocol + self.location = location + self.port = port diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py new file mode 100644 index 000000000000..642a5b98cde2 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDisksGroups(Model): + """The data disks groups for the role. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param disks_per_node: The number of disks per node. + :type disks_per_node: int + :ivar storage_account_type: ReadOnly. The storage account type. Do not set + this value. + :vartype storage_account_type: str + :ivar disk_size_gb: ReadOnly. The DiskSize in GB. Do not set this value. + :vartype disk_size_gb: int + """ + + _validation = { + 'storage_account_type': {'readonly': True}, + 'disk_size_gb': {'readonly': True}, + } + + _attribute_map = { + 'disks_per_node': {'key': 'disksPerNode', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(DataDisksGroups, self).__init__(**kwargs) + self.disks_per_node = kwargs.get('disks_per_node', None) + self.storage_account_type = None + self.disk_size_gb = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups_py3.py new file mode 100644 index 000000000000..acdd3538dfd5 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class DataDisksGroups(Model): + """The data disks groups for the role. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :param disks_per_node: The number of disks per node. + :type disks_per_node: int + :ivar storage_account_type: ReadOnly. The storage account type. Do not set + this value. + :vartype storage_account_type: str + :ivar disk_size_gb: ReadOnly. The DiskSize in GB. Do not set this value. + :vartype disk_size_gb: int + """ + + _validation = { + 'storage_account_type': {'readonly': True}, + 'disk_size_gb': {'readonly': True}, + } + + _attribute_map = { + 'disks_per_node': {'key': 'disksPerNode', 'type': 'int'}, + 'storage_account_type': {'key': 'storageAccountType', 'type': 'str'}, + 'disk_size_gb': {'key': 'diskSizeGB', 'type': 'int'}, + } + + def __init__(self, *, disks_per_node: int=None, **kwargs) -> None: + super(DataDisksGroups, self).__init__(**kwargs) + self.disks_per_node = disks_per_node + self.storage_account_type = None + self.disk_size_gb = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response.py new file mode 100644 index 000000000000..b3d490a49503 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ErrorResponse, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response_py3.py new file mode 100644 index 000000000000..5504940d6873 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model +from msrest.exceptions import HttpOperationError + + +class ErrorResponse(Model): + """Describes the format of Error response. + + :param code: Error code + :type code: str + :param message: Error message indicating why the operation failed. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(ErrorResponse, self).__init__(**kwargs) + self.code = code + self.message = message + + +class ErrorResponseException(HttpOperationError): + """Server responsed with exception of type: 'ErrorResponse'. + + :param deserialize: A deserializer + :param response: Server response to be deserialized. + """ + + def __init__(self, deserialize, response, *args): + + super(ErrorResponseException, self).__init__(deserialize, response, 'ErrorResponse', *args) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py new file mode 100644 index 000000000000..86ac51877c6f --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Errors(Model): + """The error message associated with the cluster creation. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Errors, self).__init__(**kwargs) + self.code = kwargs.get('code', None) + self.message = kwargs.get('message', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors_py3.py new file mode 100644 index 000000000000..5b81c03b7630 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Errors(Model): + """The error message associated with the cluster creation. + + :param code: The error code. + :type code: str + :param message: The error message. + :type message: str + """ + + _attribute_map = { + 'code': {'key': 'code', 'type': 'str'}, + 'message': {'key': 'message', 'type': 'str'}, + } + + def __init__(self, *, code: str=None, message: str=None, **kwargs) -> None: + super(Errors, self).__init__(**kwargs) + self.code = code + self.message = message diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters.py new file mode 100644 index 000000000000..c1d58cfcb6c4 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExecuteScriptActionParameters(Model): + """The parameters for the script actions to execute on a running cluster. + + All required parameters must be populated in order to send to Azure. + + :param script_actions: The list of run time script actions. + :type script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param persist_on_success: Required. Gets or sets if the scripts needs to + be persisted. + :type persist_on_success: bool + """ + + _validation = { + 'persist_on_success': {'required': True}, + } + + _attribute_map = { + 'script_actions': {'key': 'scriptActions', 'type': '[RuntimeScriptAction]'}, + 'persist_on_success': {'key': 'persistOnSuccess', 'type': 'bool'}, + } + + def __init__(self, **kwargs): + super(ExecuteScriptActionParameters, self).__init__(**kwargs) + self.script_actions = kwargs.get('script_actions', None) + self.persist_on_success = kwargs.get('persist_on_success', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters_py3.py new file mode 100644 index 000000000000..7cdffae8852e --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ExecuteScriptActionParameters(Model): + """The parameters for the script actions to execute on a running cluster. + + All required parameters must be populated in order to send to Azure. + + :param script_actions: The list of run time script actions. + :type script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param persist_on_success: Required. Gets or sets if the scripts needs to + be persisted. + :type persist_on_success: bool + """ + + _validation = { + 'persist_on_success': {'required': True}, + } + + _attribute_map = { + 'script_actions': {'key': 'scriptActions', 'type': '[RuntimeScriptAction]'}, + 'persist_on_success': {'key': 'persistOnSuccess', 'type': 'bool'}, + } + + def __init__(self, *, persist_on_success: bool, script_actions=None, **kwargs) -> None: + super(ExecuteScriptActionParameters, self).__init__(**kwargs) + self.script_actions = script_actions + self.persist_on_success = persist_on_success diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py new file mode 100644 index 000000000000..dee5628923f1 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Extension(Model): + """Cluster monitoring extensions. + + :param workspace_id: The workspace ID for the cluster monitoring + extension. + :type workspace_id: str + :param primary_key: The certificate for the cluster monitoring extensions. + :type primary_key: str + """ + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Extension, self).__init__(**kwargs) + self.workspace_id = kwargs.get('workspace_id', None) + self.primary_key = kwargs.get('primary_key', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension_py3.py new file mode 100644 index 000000000000..b7b21187fa01 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Extension(Model): + """Cluster monitoring extensions. + + :param workspace_id: The workspace ID for the cluster monitoring + extension. + :type workspace_id: str + :param primary_key: The certificate for the cluster monitoring extensions. + :type primary_key: str + """ + + _attribute_map = { + 'workspace_id': {'key': 'workspaceId', 'type': 'str'}, + 'primary_key': {'key': 'primaryKey', 'type': 'str'}, + } + + def __init__(self, *, workspace_id: str=None, primary_key: str=None, **kwargs) -> None: + super(Extension, self).__init__(**kwargs) + self.workspace_id = workspace_id + self.primary_key = primary_key diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py new file mode 100644 index 000000000000..50b7736f9e6a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HardwareProfile(Model): + """The hardware profile. + + :param vm_size: The size of the VM + :type vm_size: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = kwargs.get('vm_size', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile_py3.py new file mode 100644 index 000000000000..cbcd0a0653d8 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class HardwareProfile(Model): + """The hardware profile. + + :param vm_size: The size of the VM + :type vm_size: str + """ + + _attribute_map = { + 'vm_size': {'key': 'vmSize', 'type': 'str'}, + } + + def __init__(self, *, vm_size: str=None, **kwargs) -> None: + super(HardwareProfile, self).__init__(**kwargs) + self.vm_size = vm_size diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py new file mode 100644 index 000000000000..5c9779b9846e --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from enum import Enum + + +class DirectoryType(str, Enum): + + active_directory = "ActiveDirectory" + + +class OSType(str, Enum): + + windows = "Windows" + linux = "Linux" + + +class Tier(str, Enum): + + standard = "Standard" + premium = "Premium" + + +class HDInsightClusterProvisioningState(str, Enum): + + in_progress = "InProgress" + failed = "Failed" + succeeded = "Succeeded" + canceled = "Canceled" + deleting = "Deleting" + + +class AsyncOperationState(str, Enum): + + in_progress = "InProgress" + succeeded = "Succeeded" + failed = "Failed" diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile.py new file mode 100644 index 000000000000..72a5c2f774c7 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinuxOperatingSystemProfile(Model): + """The ssh username, password, and ssh public key. + + :param username: The username. + :type username: str + :param password: The password. + :type password: str + :param ssh_profile: The SSH profile. + :type ssh_profile: ~azure.mgmt.hdinsight.models.SshProfile + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'ssh_profile': {'key': 'sshProfile', 'type': 'SshProfile'}, + } + + def __init__(self, **kwargs): + super(LinuxOperatingSystemProfile, self).__init__(**kwargs) + self.username = kwargs.get('username', None) + self.password = kwargs.get('password', None) + self.ssh_profile = kwargs.get('ssh_profile', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile_py3.py new file mode 100644 index 000000000000..57b35deee57b --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile_py3.py @@ -0,0 +1,36 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LinuxOperatingSystemProfile(Model): + """The ssh username, password, and ssh public key. + + :param username: The username. + :type username: str + :param password: The password. + :type password: str + :param ssh_profile: The SSH profile. + :type ssh_profile: ~azure.mgmt.hdinsight.models.SshProfile + """ + + _attribute_map = { + 'username': {'key': 'username', 'type': 'str'}, + 'password': {'key': 'password', 'type': 'str'}, + 'ssh_profile': {'key': 'sshProfile', 'type': 'SshProfile'}, + } + + def __init__(self, *, username: str=None, password: str=None, ssh_profile=None, **kwargs) -> None: + super(LinuxOperatingSystemProfile, self).__init__(**kwargs) + self.username = username + self.password = password + self.ssh_profile = ssh_profile diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name.py new file mode 100644 index 000000000000..4a730481459c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LocalizedName(Model): + """The details about the localizable name of a type of usage. + + :param value: The name of the used resource. + :type value: str + :param localized_value: The localized name of the used resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(LocalizedName, self).__init__(**kwargs) + self.value = kwargs.get('value', None) + self.localized_value = kwargs.get('localized_value', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name_py3.py new file mode 100644 index 000000000000..445e0c9cc294 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class LocalizedName(Model): + """The details about the localizable name of a type of usage. + + :param value: The name of the used resource. + :type value: str + :param localized_value: The localized name of the used resource. + :type localized_value: str + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': 'str'}, + 'localized_value': {'key': 'localizedValue', 'type': 'str'}, + } + + def __init__(self, *, value: str=None, localized_value: str=None, **kwargs) -> None: + super(LocalizedName, self).__init__(**kwargs) + self.value = value + self.localized_value = localized_value diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py new file mode 100644 index 000000000000..984a6875094a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """The HDInsight REST API operation. + + :param name: The operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.hdinsight.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, **kwargs): + super(Operation, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.display = kwargs.get('display', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py new file mode 100644 index 000000000000..a3c546ef0bdf --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: The service provider: Microsoft.HDInsight + :type provider: str + :param resource: The resource on which the operation is performed: + Cluster, Applications, etc. + :type resource: str + :param operation: The operation type: read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(OperationDisplay, self).__init__(**kwargs) + self.provider = kwargs.get('provider', None) + self.resource = kwargs.get('resource', None) + self.operation = kwargs.get('operation', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display_py3.py new file mode 100644 index 000000000000..ebccaf41a426 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display_py3.py @@ -0,0 +1,37 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationDisplay(Model): + """The object that represents the operation. + + :param provider: The service provider: Microsoft.HDInsight + :type provider: str + :param resource: The resource on which the operation is performed: + Cluster, Applications, etc. + :type resource: str + :param operation: The operation type: read, write, delete, etc. + :type operation: str + """ + + _attribute_map = { + 'provider': {'key': 'provider', 'type': 'str'}, + 'resource': {'key': 'resource', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + } + + def __init__(self, *, provider: str=None, resource: str=None, operation: str=None, **kwargs) -> None: + super(OperationDisplay, self).__init__(**kwargs) + self.provider = provider + self.resource = resource + self.operation = operation diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_paged.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_paged.py new file mode 100644 index 000000000000..79215385687d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class OperationPaged(Paged): + """ + A paging container for iterating over a list of :class:`Operation ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[Operation]'} + } + + def __init__(self, *args, **kwargs): + + super(OperationPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_py3.py new file mode 100644 index 000000000000..9d888fda108c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Operation(Model): + """The HDInsight REST API operation. + + :param name: The operation name: {provider}/{resource}/{operation} + :type name: str + :param display: The object that represents the operation. + :type display: ~azure.mgmt.hdinsight.models.OperationDisplay + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'display': {'key': 'display', 'type': 'OperationDisplay'}, + } + + def __init__(self, *, name: str=None, display=None, **kwargs) -> None: + super(Operation, self).__init__(**kwargs) + self.name = name + self.display = display diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py new file mode 100644 index 000000000000..d942d89b7d18 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResource(Model): + """The azure async operation response. + + :param status: The async operation state. Possible values include: + 'InProgress', 'Succeeded', 'Failed' + :type status: str or ~azure.mgmt.hdinsight.models.AsyncOperationState + :param error: The operation error information. + :type error: ~azure.mgmt.hdinsight.models.Errors + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'AsyncOperationState'}, + 'error': {'key': 'error', 'type': 'Errors'}, + } + + def __init__(self, **kwargs): + super(OperationResource, self).__init__(**kwargs) + self.status = kwargs.get('status', None) + self.error = kwargs.get('error', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource_py3.py new file mode 100644 index 000000000000..b5be1c09332a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource_py3.py @@ -0,0 +1,33 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OperationResource(Model): + """The azure async operation response. + + :param status: The async operation state. Possible values include: + 'InProgress', 'Succeeded', 'Failed' + :type status: str or ~azure.mgmt.hdinsight.models.AsyncOperationState + :param error: The operation error information. + :type error: ~azure.mgmt.hdinsight.models.Errors + """ + + _attribute_map = { + 'status': {'key': 'status', 'type': 'AsyncOperationState'}, + 'error': {'key': 'error', 'type': 'Errors'}, + } + + def __init__(self, *, status=None, error=None, **kwargs) -> None: + super(OperationResource, self).__init__(**kwargs) + self.status = status + self.error = error diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py new file mode 100644 index 000000000000..9bcd6b66b142 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OsProfile(Model): + """The Linux operation systems profile. + + :param linux_operating_system_profile: The Linux OS profile. + :type linux_operating_system_profile: + ~azure.mgmt.hdinsight.models.LinuxOperatingSystemProfile + """ + + _attribute_map = { + 'linux_operating_system_profile': {'key': 'linuxOperatingSystemProfile', 'type': 'LinuxOperatingSystemProfile'}, + } + + def __init__(self, **kwargs): + super(OsProfile, self).__init__(**kwargs) + self.linux_operating_system_profile = kwargs.get('linux_operating_system_profile', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile_py3.py new file mode 100644 index 000000000000..2af52010b99a --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile_py3.py @@ -0,0 +1,29 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class OsProfile(Model): + """The Linux operation systems profile. + + :param linux_operating_system_profile: The Linux OS profile. + :type linux_operating_system_profile: + ~azure.mgmt.hdinsight.models.LinuxOperatingSystemProfile + """ + + _attribute_map = { + 'linux_operating_system_profile': {'key': 'linuxOperatingSystemProfile', 'type': 'LinuxOperatingSystemProfile'}, + } + + def __init__(self, *, linux_operating_system_profile=None, **kwargs) -> None: + super(OsProfile, self).__init__(**kwargs) + self.linux_operating_system_profile = linux_operating_system_profile diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource.py new file mode 100644 index 000000000000..aecd353e9b87 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource_py3.py new file mode 100644 index 000000000000..057f44c7e108 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource_py3.py @@ -0,0 +1,43 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class ProxyResource(Resource): + """The resource model definition for a ARM proxy resource. It will have + everything other than required location and tags. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(ProxyResource, self).__init__(**kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py new file mode 100644 index 000000000000..f90d132a7b79 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QuotaInfo(Model): + """The quota properties for the cluster. + + :param cores_used: The cores used by the cluster. + :type cores_used: int + """ + + _attribute_map = { + 'cores_used': {'key': 'coresUsed', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(QuotaInfo, self).__init__(**kwargs) + self.cores_used = kwargs.get('cores_used', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info_py3.py new file mode 100644 index 000000000000..ddd13b43c9ef --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class QuotaInfo(Model): + """The quota properties for the cluster. + + :param cores_used: The cores used by the cluster. + :type cores_used: int + """ + + _attribute_map = { + 'cores_used': {'key': 'coresUsed', 'type': 'int'}, + } + + def __init__(self, *, cores_used: int=None, **kwargs) -> None: + super(QuotaInfo, self).__init__(**kwargs) + self.cores_used = cores_used diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py new file mode 100644 index 000000000000..abc2407bbed3 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource_py3.py new file mode 100644 index 000000000000..8604d1c4419b --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource_py3.py @@ -0,0 +1,45 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Resource(Model): + """The core properties of ARM resources. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + } + + def __init__(self, **kwargs) -> None: + super(Resource, self).__init__(**kwargs) + self.id = None + self.name = None + self.type = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py new file mode 100644 index 000000000000..51ee38b3ec0b --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Role(Model): + """Describes a role on the cluster. + + :param name: The name of the role. + :type name: str + :param min_instance_count: The minimum instance count of the cluster. + :type min_instance_count: int + :param target_instance_count: The instance count of the cluster. + :type target_instance_count: int + :param hardware_profile: The hardware profile. + :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile + :param os_profile: The operating system profile. + :type os_profile: ~azure.mgmt.hdinsight.models.OsProfile + :param virtual_network_profile: The virtual network profile. + :type virtual_network_profile: + ~azure.mgmt.hdinsight.models.VirtualNetworkProfile + :param data_disks_groups: The data disks groups for the role. + :type data_disks_groups: + list[~azure.mgmt.hdinsight.models.DataDisksGroups] + :param script_actions: The list of script actions on the role. + :type script_actions: list[~azure.mgmt.hdinsight.models.ScriptAction] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, + 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, + 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, + 'data_disks_groups': {'key': 'dataDisksGroups', 'type': '[DataDisksGroups]'}, + 'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'}, + } + + def __init__(self, **kwargs): + super(Role, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.min_instance_count = kwargs.get('min_instance_count', None) + self.target_instance_count = kwargs.get('target_instance_count', None) + self.hardware_profile = kwargs.get('hardware_profile', None) + self.os_profile = kwargs.get('os_profile', None) + self.virtual_network_profile = kwargs.get('virtual_network_profile', None) + self.data_disks_groups = kwargs.get('data_disks_groups', None) + self.script_actions = kwargs.get('script_actions', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role_py3.py new file mode 100644 index 000000000000..efcc4734449b --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Role(Model): + """Describes a role on the cluster. + + :param name: The name of the role. + :type name: str + :param min_instance_count: The minimum instance count of the cluster. + :type min_instance_count: int + :param target_instance_count: The instance count of the cluster. + :type target_instance_count: int + :param hardware_profile: The hardware profile. + :type hardware_profile: ~azure.mgmt.hdinsight.models.HardwareProfile + :param os_profile: The operating system profile. + :type os_profile: ~azure.mgmt.hdinsight.models.OsProfile + :param virtual_network_profile: The virtual network profile. + :type virtual_network_profile: + ~azure.mgmt.hdinsight.models.VirtualNetworkProfile + :param data_disks_groups: The data disks groups for the role. + :type data_disks_groups: + list[~azure.mgmt.hdinsight.models.DataDisksGroups] + :param script_actions: The list of script actions on the role. + :type script_actions: list[~azure.mgmt.hdinsight.models.ScriptAction] + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'min_instance_count': {'key': 'minInstanceCount', 'type': 'int'}, + 'target_instance_count': {'key': 'targetInstanceCount', 'type': 'int'}, + 'hardware_profile': {'key': 'hardwareProfile', 'type': 'HardwareProfile'}, + 'os_profile': {'key': 'osProfile', 'type': 'OsProfile'}, + 'virtual_network_profile': {'key': 'virtualNetworkProfile', 'type': 'VirtualNetworkProfile'}, + 'data_disks_groups': {'key': 'dataDisksGroups', 'type': '[DataDisksGroups]'}, + 'script_actions': {'key': 'scriptActions', 'type': '[ScriptAction]'}, + } + + def __init__(self, *, name: str=None, min_instance_count: int=None, target_instance_count: int=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None, **kwargs) -> None: + super(Role, self).__init__(**kwargs) + self.name = name + self.min_instance_count = min_instance_count + self.target_instance_count = target_instance_count + self.hardware_profile = hardware_profile + self.os_profile = os_profile + self.virtual_network_profile = virtual_network_profile + self.data_disks_groups = data_disks_groups + self.script_actions = script_actions diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py new file mode 100644 index 000000000000..760e1621ef60 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuntimeScriptAction(Model): + """Describes a script action on a running cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: The parameters for the script + :type parameters: str + :param roles: Required. The list of roles where script will be executed. + :type roles: list[str] + :ivar application_name: The application name of the script action, if any. + :vartype application_name: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + 'application_name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RuntimeScriptAction, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.parameters = kwargs.get('parameters', None) + self.roles = kwargs.get('roles', None) + self.application_name = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail.py new file mode 100644 index 000000000000..5d68a1bb0521 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .runtime_script_action import RuntimeScriptAction + + +class RuntimeScriptActionDetail(RuntimeScriptAction): + """The execution details of a script action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: The parameters for the script + :type parameters: str + :param roles: Required. The list of roles where script will be executed. + :type roles: list[str] + :ivar application_name: The application name of the script action, if any. + :vartype application_name: str + :ivar script_execution_id: The execution id of the script action. + :vartype script_execution_id: long + :ivar start_time: The start time of script action execution. + :vartype start_time: str + :ivar end_time: The end time of script action execution. + :vartype end_time: str + :ivar status: The current execution status of the script action. + :vartype status: str + :ivar operation: The reason why the script action was executed. + :vartype operation: str + :ivar execution_summary: The summary of script action execution result. + :vartype execution_summary: + list[~azure.mgmt.hdinsight.models.ScriptActionExecutionSummary] + :ivar debug_information: The script action execution debug information. + :vartype debug_information: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + 'application_name': {'readonly': True}, + 'script_execution_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'operation': {'readonly': True}, + 'execution_summary': {'readonly': True}, + 'debug_information': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'script_execution_id': {'key': 'scriptExecutionId', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'execution_summary': {'key': 'executionSummary', 'type': '[ScriptActionExecutionSummary]'}, + 'debug_information': {'key': 'debugInformation', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(RuntimeScriptActionDetail, self).__init__(**kwargs) + self.script_execution_id = None + self.start_time = None + self.end_time = None + self.status = None + self.operation = None + self.execution_summary = None + self.debug_information = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_paged.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_paged.py new file mode 100644 index 000000000000..2555f4b6b584 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_paged.py @@ -0,0 +1,27 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.paging import Paged + + +class RuntimeScriptActionDetailPaged(Paged): + """ + A paging container for iterating over a list of :class:`RuntimeScriptActionDetail ` object + """ + + _attribute_map = { + 'next_link': {'key': 'nextLink', 'type': 'str'}, + 'current_page': {'key': 'value', 'type': '[RuntimeScriptActionDetail]'} + } + + def __init__(self, *args, **kwargs): + + super(RuntimeScriptActionDetailPaged, self).__init__(*args, **kwargs) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_py3.py new file mode 100644 index 000000000000..39200a35d922 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_py3.py @@ -0,0 +1,87 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .runtime_script_action_py3 import RuntimeScriptAction + + +class RuntimeScriptActionDetail(RuntimeScriptAction): + """The execution details of a script action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: The parameters for the script + :type parameters: str + :param roles: Required. The list of roles where script will be executed. + :type roles: list[str] + :ivar application_name: The application name of the script action, if any. + :vartype application_name: str + :ivar script_execution_id: The execution id of the script action. + :vartype script_execution_id: long + :ivar start_time: The start time of script action execution. + :vartype start_time: str + :ivar end_time: The end time of script action execution. + :vartype end_time: str + :ivar status: The current execution status of the script action. + :vartype status: str + :ivar operation: The reason why the script action was executed. + :vartype operation: str + :ivar execution_summary: The summary of script action execution result. + :vartype execution_summary: + list[~azure.mgmt.hdinsight.models.ScriptActionExecutionSummary] + :ivar debug_information: The script action execution debug information. + :vartype debug_information: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + 'application_name': {'readonly': True}, + 'script_execution_id': {'readonly': True}, + 'start_time': {'readonly': True}, + 'end_time': {'readonly': True}, + 'status': {'readonly': True}, + 'operation': {'readonly': True}, + 'execution_summary': {'readonly': True}, + 'debug_information': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + 'script_execution_id': {'key': 'scriptExecutionId', 'type': 'long'}, + 'start_time': {'key': 'startTime', 'type': 'str'}, + 'end_time': {'key': 'endTime', 'type': 'str'}, + 'status': {'key': 'status', 'type': 'str'}, + 'operation': {'key': 'operation', 'type': 'str'}, + 'execution_summary': {'key': 'executionSummary', 'type': '[ScriptActionExecutionSummary]'}, + 'debug_information': {'key': 'debugInformation', 'type': 'str'}, + } + + def __init__(self, *, name: str, uri: str, roles, parameters: str=None, **kwargs) -> None: + super(RuntimeScriptActionDetail, self).__init__(name=name, uri=uri, parameters=parameters, roles=roles, **kwargs) + self.script_execution_id = None + self.start_time = None + self.end_time = None + self.status = None + self.operation = None + self.execution_summary = None + self.debug_information = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_py3.py new file mode 100644 index 000000000000..0f2088085838 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_py3.py @@ -0,0 +1,56 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class RuntimeScriptAction(Model): + """Describes a script action on a running cluster. + + Variables are only populated by the server, and will be ignored when + sending a request. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: The parameters for the script + :type parameters: str + :param roles: Required. The list of roles where script will be executed. + :type roles: list[str] + :ivar application_name: The application name of the script action, if any. + :vartype application_name: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'roles': {'required': True}, + 'application_name': {'readonly': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + } + + def __init__(self, *, name: str, uri: str, roles, parameters: str=None, **kwargs) -> None: + super(RuntimeScriptAction, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.parameters = parameters + self.roles = roles + self.application_name = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py new file mode 100644 index 000000000000..2f3d7ef356da --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptAction(Model): + """Describes a script action on role on the cluster. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: Required. The parameters for the script provided. + :type parameters: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScriptAction, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.parameters = kwargs.get('parameters', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary.py new file mode 100644 index 000000000000..a0a561f4a440 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptActionExecutionSummary(Model): + """The execution summary of a script action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of script action execution. + :vartype status: str + :ivar instance_count: The instance count for a given script action + execution status. + :vartype instance_count: int + """ + + _validation = { + 'status': {'readonly': True}, + 'instance_count': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs): + super(ScriptActionExecutionSummary, self).__init__(**kwargs) + self.status = None + self.instance_count = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary_py3.py new file mode 100644 index 000000000000..e940e9d90c34 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary_py3.py @@ -0,0 +1,41 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptActionExecutionSummary(Model): + """The execution summary of a script action. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar status: The status of script action execution. + :vartype status: str + :ivar instance_count: The instance count for a given script action + execution status. + :vartype instance_count: int + """ + + _validation = { + 'status': {'readonly': True}, + 'instance_count': {'readonly': True}, + } + + _attribute_map = { + 'status': {'key': 'status', 'type': 'str'}, + 'instance_count': {'key': 'instanceCount', 'type': 'int'}, + } + + def __init__(self, **kwargs) -> None: + super(ScriptActionExecutionSummary, self).__init__(**kwargs) + self.status = None + self.instance_count = None diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec.py new file mode 100644 index 000000000000..684928022db3 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptActionPersistedGetResponseSpec(Model): + """The persisted script action for cluster. + + :param name: The name of script action. + :type name: str + :param uri: The URI to the script. + :type uri: str + :param parameters: The parameters for the script provided. + :type parameters: str + :param roles: The list of roles where script will be executed. + :type roles: list[str] + :param application_name: The application name for the script action. + :type application_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(ScriptActionPersistedGetResponseSpec, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.uri = kwargs.get('uri', None) + self.parameters = kwargs.get('parameters', None) + self.roles = kwargs.get('roles', None) + self.application_name = kwargs.get('application_name', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec_py3.py new file mode 100644 index 000000000000..e0cd9c1c9453 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptActionPersistedGetResponseSpec(Model): + """The persisted script action for cluster. + + :param name: The name of script action. + :type name: str + :param uri: The URI to the script. + :type uri: str + :param parameters: The parameters for the script provided. + :type parameters: str + :param roles: The list of roles where script will be executed. + :type roles: list[str] + :param application_name: The application name for the script action. + :type application_name: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + 'roles': {'key': 'roles', 'type': '[str]'}, + 'application_name': {'key': 'applicationName', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, uri: str=None, parameters: str=None, roles=None, application_name: str=None, **kwargs) -> None: + super(ScriptActionPersistedGetResponseSpec, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.parameters = parameters + self.roles = roles + self.application_name = application_name diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_py3.py new file mode 100644 index 000000000000..b35024f9c4f6 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_py3.py @@ -0,0 +1,44 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class ScriptAction(Model): + """Describes a script action on role on the cluster. + + All required parameters must be populated in order to send to Azure. + + :param name: Required. The name of the script action. + :type name: str + :param uri: Required. The URI to the script. + :type uri: str + :param parameters: Required. The parameters for the script provided. + :type parameters: str + """ + + _validation = { + 'name': {'required': True}, + 'uri': {'required': True}, + 'parameters': {'required': True}, + } + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'uri': {'key': 'uri', 'type': 'str'}, + 'parameters': {'key': 'parameters', 'type': 'str'}, + } + + def __init__(self, *, name: str, uri: str, parameters: str, **kwargs) -> None: + super(ScriptAction, self).__init__(**kwargs) + self.name = name + self.uri = uri + self.parameters = parameters diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py new file mode 100644 index 000000000000..8b75c890167d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecurityProfile(Model): + """The security profile which contains Ssh public key for the HDInsight + cluster. + + :param directory_type: The directory type. Possible values include: + 'ActiveDirectory' + :type directory_type: str or ~azure.mgmt.hdinsight.models.DirectoryType + :param domain: The organization's active directory domain. + :type domain: str + :param organizational_unit_dn: The organizational unit within the Active + Directory to place the cluster and service accounts. + :type organizational_unit_dn: str + :param ldaps_urls: The LDAPS protocol URLs to communicate with the Active + Directory. + :type ldaps_urls: list[str] + :param domain_username: The domain user account that will have admin + privileges on the cluster. + :type domain_username: str + :param domain_user_password: The domain admin password. + :type domain_user_password: str + :param cluster_users_group_dns: Optional. The Distinguished Names for + cluster user groups + :type cluster_users_group_dns: list[str] + """ + + _attribute_map = { + 'directory_type': {'key': 'directoryType', 'type': 'DirectoryType'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'organizational_unit_dn': {'key': 'organizationalUnitDN', 'type': 'str'}, + 'ldaps_urls': {'key': 'ldapsUrls', 'type': '[str]'}, + 'domain_username': {'key': 'domainUsername', 'type': 'str'}, + 'domain_user_password': {'key': 'domainUserPassword', 'type': 'str'}, + 'cluster_users_group_dns': {'key': 'clusterUsersGroupDNs', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(SecurityProfile, self).__init__(**kwargs) + self.directory_type = kwargs.get('directory_type', None) + self.domain = kwargs.get('domain', None) + self.organizational_unit_dn = kwargs.get('organizational_unit_dn', None) + self.ldaps_urls = kwargs.get('ldaps_urls', None) + self.domain_username = kwargs.get('domain_username', None) + self.domain_user_password = kwargs.get('domain_user_password', None) + self.cluster_users_group_dns = kwargs.get('cluster_users_group_dns', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py new file mode 100644 index 000000000000..08abec9760cb --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py @@ -0,0 +1,58 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SecurityProfile(Model): + """The security profile which contains Ssh public key for the HDInsight + cluster. + + :param directory_type: The directory type. Possible values include: + 'ActiveDirectory' + :type directory_type: str or ~azure.mgmt.hdinsight.models.DirectoryType + :param domain: The organization's active directory domain. + :type domain: str + :param organizational_unit_dn: The organizational unit within the Active + Directory to place the cluster and service accounts. + :type organizational_unit_dn: str + :param ldaps_urls: The LDAPS protocol URLs to communicate with the Active + Directory. + :type ldaps_urls: list[str] + :param domain_username: The domain user account that will have admin + privileges on the cluster. + :type domain_username: str + :param domain_user_password: The domain admin password. + :type domain_user_password: str + :param cluster_users_group_dns: Optional. The Distinguished Names for + cluster user groups + :type cluster_users_group_dns: list[str] + """ + + _attribute_map = { + 'directory_type': {'key': 'directoryType', 'type': 'DirectoryType'}, + 'domain': {'key': 'domain', 'type': 'str'}, + 'organizational_unit_dn': {'key': 'organizationalUnitDN', 'type': 'str'}, + 'ldaps_urls': {'key': 'ldapsUrls', 'type': '[str]'}, + 'domain_username': {'key': 'domainUsername', 'type': 'str'}, + 'domain_user_password': {'key': 'domainUserPassword', 'type': 'str'}, + 'cluster_users_group_dns': {'key': 'clusterUsersGroupDNs', 'type': '[str]'}, + } + + def __init__(self, *, directory_type=None, domain: str=None, organizational_unit_dn: str=None, ldaps_urls=None, domain_username: str=None, domain_user_password: str=None, cluster_users_group_dns=None, **kwargs) -> None: + super(SecurityProfile, self).__init__(**kwargs) + self.directory_type = directory_type + self.domain = domain + self.organizational_unit_dn = organizational_unit_dn + self.ldaps_urls = ldaps_urls + self.domain_username = domain_username + self.domain_user_password = domain_user_password + self.cluster_users_group_dns = cluster_users_group_dns diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py new file mode 100644 index 000000000000..7921883012c0 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SshProfile(Model): + """The list of SSH public keys. + + :param public_keys: The list of SSH public keys. + :type public_keys: list[~azure.mgmt.hdinsight.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, **kwargs): + super(SshProfile, self).__init__(**kwargs) + self.public_keys = kwargs.get('public_keys', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile_py3.py new file mode 100644 index 000000000000..05adf2f5d14c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SshProfile(Model): + """The list of SSH public keys. + + :param public_keys: The list of SSH public keys. + :type public_keys: list[~azure.mgmt.hdinsight.models.SshPublicKey] + """ + + _attribute_map = { + 'public_keys': {'key': 'publicKeys', 'type': '[SshPublicKey]'}, + } + + def __init__(self, *, public_keys=None, **kwargs) -> None: + super(SshProfile, self).__init__(**kwargs) + self.public_keys = public_keys diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py new file mode 100644 index 000000000000..cf6119114b89 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SshPublicKey(Model): + """The SSH public key for the cluster nodes. + + :param certificate_data: The certificate for SSH. + :type certificate_data: str + """ + + _attribute_map = { + 'certificate_data': {'key': 'certificateData', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(SshPublicKey, self).__init__(**kwargs) + self.certificate_data = kwargs.get('certificate_data', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key_py3.py new file mode 100644 index 000000000000..d57a2dbaeb38 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class SshPublicKey(Model): + """The SSH public key for the cluster nodes. + + :param certificate_data: The certificate for SSH. + :type certificate_data: str + """ + + _attribute_map = { + 'certificate_data': {'key': 'certificateData', 'type': 'str'}, + } + + def __init__(self, *, certificate_data: str=None, **kwargs) -> None: + super(SshPublicKey, self).__init__(**kwargs) + self.certificate_data = certificate_data diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py new file mode 100644 index 000000000000..c65f5dc49529 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccount(Model): + """The storage Account. + + :param name: The name of the storage account. + :type name: str + :param is_default: Whether or not the storage account is the default + storage account. + :type is_default: bool + :param container: The container in the storage account, only to be + specified for WASB storage accounts. + :type container: str + :param file_system: The filesystem, only to be specified for Azure Data + Lake Storage type Gen 2. + :type file_system: str + :param key: The storage account access key. + :type key: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'container': {'key': 'container', 'type': 'str'}, + 'file_system': {'key': 'fileSystem', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(StorageAccount, self).__init__(**kwargs) + self.name = kwargs.get('name', None) + self.is_default = kwargs.get('is_default', None) + self.container = kwargs.get('container', None) + self.file_system = kwargs.get('file_system', None) + self.key = kwargs.get('key', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py new file mode 100644 index 000000000000..41f9ea602657 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py @@ -0,0 +1,47 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageAccount(Model): + """The storage Account. + + :param name: The name of the storage account. + :type name: str + :param is_default: Whether or not the storage account is the default + storage account. + :type is_default: bool + :param container: The container in the storage account, only to be + specified for WASB storage accounts. + :type container: str + :param file_system: The filesystem, only to be specified for Azure Data + Lake Storage type Gen 2. + :type file_system: str + :param key: The storage account access key. + :type key: str + """ + + _attribute_map = { + 'name': {'key': 'name', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'bool'}, + 'container': {'key': 'container', 'type': 'str'}, + 'file_system': {'key': 'fileSystem', 'type': 'str'}, + 'key': {'key': 'key', 'type': 'str'}, + } + + def __init__(self, *, name: str=None, is_default: bool=None, container: str=None, file_system: str=None, key: str=None, **kwargs) -> None: + super(StorageAccount, self).__init__(**kwargs) + self.name = name + self.is_default = is_default + self.container = container + self.file_system = file_system + self.key = key diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py new file mode 100644 index 000000000000..5c38b31f7345 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageProfile(Model): + """The storage profile. + + :param storageaccounts: The list of storage accounts in the cluster. + :type storageaccounts: list[~azure.mgmt.hdinsight.models.StorageAccount] + """ + + _attribute_map = { + 'storageaccounts': {'key': 'storageaccounts', 'type': '[StorageAccount]'}, + } + + def __init__(self, **kwargs): + super(StorageProfile, self).__init__(**kwargs) + self.storageaccounts = kwargs.get('storageaccounts', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile_py3.py new file mode 100644 index 000000000000..ab18eb99a564 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class StorageProfile(Model): + """The storage profile. + + :param storageaccounts: The list of storage accounts in the cluster. + :type storageaccounts: list[~azure.mgmt.hdinsight.models.StorageAccount] + """ + + _attribute_map = { + 'storageaccounts': {'key': 'storageaccounts', 'type': '[StorageAccount]'}, + } + + def __init__(self, *, storageaccounts=None, **kwargs) -> None: + super(StorageProfile, self).__init__(**kwargs) + self.storageaccounts = storageaccounts diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource.py new file mode 100644 index 000000000000..86e0a2ce4814 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The Azure Region where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(TrackedResource, self).__init__(**kwargs) + self.location = kwargs.get('location', None) + self.tags = kwargs.get('tags', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource_py3.py new file mode 100644 index 000000000000..aa56cc64c60e --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource_py3.py @@ -0,0 +1,50 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .resource_py3 import Resource + + +class TrackedResource(Resource): + """The resource model definition for a ARM tracked top level resource. + + Variables are only populated by the server, and will be ignored when + sending a request. + + :ivar id: Fully qualified resource Id for the resource. + :vartype id: str + :ivar name: The name of the resource + :vartype name: str + :ivar type: The type of the resource. + :vartype type: str + :param location: The Azure Region where the resource lives + :type location: str + :param tags: Resource tags. + :type tags: dict[str, str] + """ + + _validation = { + 'id': {'readonly': True}, + 'name': {'readonly': True}, + 'type': {'readonly': True}, + } + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'name': {'key': 'name', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, + 'location': {'key': 'location', 'type': 'str'}, + 'tags': {'key': 'tags', 'type': '{str}'}, + } + + def __init__(self, *, location: str=None, tags=None, **kwargs) -> None: + super(TrackedResource, self).__init__(**kwargs) + self.location = location + self.tags = tags diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage.py new file mode 100644 index 000000000000..691bb96ece5d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """The details about the usage of a particular limited resource. + + :param unit: The type of measurement for usage. + :type unit: str + :param current_value: The current usage. + :type current_value: int + :param limit: The maximum allowed usage. + :type limit: int + :param name: The details about the localizable name of the used resource. + :type name: ~azure.mgmt.hdinsight.models.LocalizedName + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'LocalizedName'}, + } + + def __init__(self, **kwargs): + super(Usage, self).__init__(**kwargs) + self.unit = kwargs.get('unit', None) + self.current_value = kwargs.get('current_value', None) + self.limit = kwargs.get('limit', None) + self.name = kwargs.get('name', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage_py3.py new file mode 100644 index 000000000000..7f400863cc17 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage_py3.py @@ -0,0 +1,40 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class Usage(Model): + """The details about the usage of a particular limited resource. + + :param unit: The type of measurement for usage. + :type unit: str + :param current_value: The current usage. + :type current_value: int + :param limit: The maximum allowed usage. + :type limit: int + :param name: The details about the localizable name of the used resource. + :type name: ~azure.mgmt.hdinsight.models.LocalizedName + """ + + _attribute_map = { + 'unit': {'key': 'unit', 'type': 'str'}, + 'current_value': {'key': 'currentValue', 'type': 'int'}, + 'limit': {'key': 'limit', 'type': 'int'}, + 'name': {'key': 'name', 'type': 'LocalizedName'}, + } + + def __init__(self, *, unit: str=None, current_value: int=None, limit: int=None, name=None, **kwargs) -> None: + super(Usage, self).__init__(**kwargs) + self.unit = unit + self.current_value = current_value + self.limit = limit + self.name = name diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result.py new file mode 100644 index 000000000000..53610662ee09 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsagesListResult(Model): + """The response for the operation to get regional usages for a subscription. + + :param value: The list of usages. + :type value: list[~azure.mgmt.hdinsight.models.Usage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, **kwargs): + super(UsagesListResult, self).__init__(**kwargs) + self.value = kwargs.get('value', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result_py3.py new file mode 100644 index 000000000000..8b104ecb2001 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result_py3.py @@ -0,0 +1,28 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class UsagesListResult(Model): + """The response for the operation to get regional usages for a subscription. + + :param value: The list of usages. + :type value: list[~azure.mgmt.hdinsight.models.Usage] + """ + + _attribute_map = { + 'value': {'key': 'value', 'type': '[Usage]'}, + } + + def __init__(self, *, value=None, **kwargs) -> None: + super(UsagesListResult, self).__init__(**kwargs) + self.value = value diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py new file mode 100644 index 000000000000..215c0db2b763 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkProfile(Model): + """The virtual network properties. + + :param id: The ID of the virtual network. + :type id: str + :param subnet: The name of the subnet. + :type subnet: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__(self, **kwargs): + super(VirtualNetworkProfile, self).__init__(**kwargs) + self.id = kwargs.get('id', None) + self.subnet = kwargs.get('subnet', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile_py3.py new file mode 100644 index 000000000000..6687f9a6d9a4 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile_py3.py @@ -0,0 +1,32 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from msrest.serialization import Model + + +class VirtualNetworkProfile(Model): + """The virtual network properties. + + :param id: The ID of the virtual network. + :type id: str + :param subnet: The name of the subnet. + :type subnet: str + """ + + _attribute_map = { + 'id': {'key': 'id', 'type': 'str'}, + 'subnet': {'key': 'subnet', 'type': 'str'}, + } + + def __init__(self, *, id: str=None, subnet: str=None, **kwargs) -> None: + super(VirtualNetworkProfile, self).__init__(**kwargs) + self.id = id + self.subnet = subnet diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py new file mode 100644 index 000000000000..bb15f585c444 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py @@ -0,0 +1,30 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +from .clusters_operations import ClustersOperations +from .applications_operations import ApplicationsOperations +from .locations_operations import LocationsOperations +from .configurations_operations import ConfigurationsOperations +from .extensions_operations import ExtensionsOperations +from .script_actions_operations import ScriptActionsOperations +from .script_execution_history_operations import ScriptExecutionHistoryOperations +from .operations import Operations + +__all__ = [ + 'ClustersOperations', + 'ApplicationsOperations', + 'LocationsOperations', + 'ConfigurationsOperations', + 'ExtensionsOperations', + 'ScriptActionsOperations', + 'ScriptExecutionHistoryOperations', + 'Operations', +] diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py new file mode 100644 index 000000000000..72a5618c5fba --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py @@ -0,0 +1,357 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ApplicationsOperations(object): + """ApplicationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_cluster( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Lists all of the applications for the HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Application + :rtype: + ~azure.mgmt.hdinsight.models.ApplicationPaged[~azure.mgmt.hdinsight.models.Application] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_cluster.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ApplicationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ApplicationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications'} + + def get( + self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, **operation_config): + """Gets properties of the specified application. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param application_name: The constant value for the application name. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Application or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.Application or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'} + + + def _create_initial( + self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Application') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates applications for the HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param application_name: The constant value for the application name. + :type application_name: str + :param parameters: The application create request. + :type parameters: ~azure.mgmt.hdinsight.models.Application + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Application or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hdinsight.models.Application] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hdinsight.models.Application]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + application_name=application_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Application', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'} + + + def _delete_initial( + self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified application on the HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param application_name: The constant value for the application name. + :type application_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + application_name=application_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py new file mode 100644 index 000000000000..fddb64f9c5c2 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py @@ -0,0 +1,659 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ClustersOperations(object): + """ClustersOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + :ivar role_name: The constant value for the roleName. Constant value: "workernode". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + self.role_name = "workernode" + + self.config = config + + + def _create_initial( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.create.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ClusterCreateParametersExtended') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + def create( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates a new HDInsight cluster with the specified parameters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param parameters: The cluster create request. + :type parameters: + ~azure.mgmt.hdinsight.models.ClusterCreateParametersExtended + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns Cluster or + ClientRawResponse if raw==True + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hdinsight.models.Cluster] + or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.hdinsight.models.Cluster]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'} + + def update( + self, resource_group_name, cluster_name, tags=None, custom_headers=None, raw=False, **operation_config): + """Patch HDInsight cluster with the specified parameters. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param tags: The resource tags. + :type tags: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Cluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.Cluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + parameters = models.ClusterPatchParameters(tags=tags) + + # Construct URL + url = self.update.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ClusterPatchParameters') + + # Construct and send request + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'} + + + def _delete_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'} + + def get( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Gets the specified cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Cluster or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.Cluster or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Cluster', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}'} + + def list_by_resource_group( + self, resource_group_name, custom_headers=None, raw=False, **operation_config): + """Lists the HDInsight clusters in a resource group. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Cluster + :rtype: + ~azure.mgmt.hdinsight.models.ClusterPaged[~azure.mgmt.hdinsight.models.Cluster] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_resource_group.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_resource_group.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters'} + + + def _resize_initial( + self, resource_group_name, cluster_name, target_instance_count=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ClusterResizeParameters(target_instance_count=target_instance_count) + + # Construct URL + url = self.resize.metadata['url'] + 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'), + 'roleName': self._serialize.url("self.role_name", self.role_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ClusterResizeParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def resize( + self, resource_group_name, cluster_name, target_instance_count=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Resizes the specified HDInsight cluster to the specified size. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param target_instance_count: The target instance count for the + operation. + :type target_instance_count: int + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._resize_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + target_instance_count=target_instance_count, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + resize.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/roles/{roleName}/resize'} + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all the HDInsight clusters under the subscription. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Cluster + :rtype: + ~azure.mgmt.hdinsight.models.ClusterPaged[~azure.mgmt.hdinsight.models.Cluster] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.ClusterPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.ClusterPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/clusters'} + + + def _execute_script_actions_initial( + self, resource_group_name, cluster_name, persist_on_success, script_actions=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ExecuteScriptActionParameters(script_actions=script_actions, persist_on_success=persist_on_success) + + # Construct URL + url = self.execute_script_actions.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ExecuteScriptActionParameters') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def execute_script_actions( + self, resource_group_name, cluster_name, persist_on_success, script_actions=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Executes script actions on the specified HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param persist_on_success: Gets or sets if the scripts needs to be + persisted. + :type persist_on_success: bool + :param script_actions: The list of run time script actions. + :type script_actions: + list[~azure.mgmt.hdinsight.models.RuntimeScriptAction] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._execute_script_actions_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + persist_on_success=persist_on_success, + script_actions=script_actions, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + execute_script_actions.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/executeScriptActions'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py new file mode 100644 index 000000000000..c0b9a95c02f9 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py @@ -0,0 +1,191 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ConfigurationsOperations(object): + """ConfigurationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + + def _update_initial( + self, resource_group_name, cluster_name, configuration_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update.metadata['url'] + 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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, '{str}') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202, 204]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update( + self, resource_group_name, cluster_name, configuration_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Configures the configuration on the specified cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param configuration_name: The name of the cluster configuration. + :type configuration_name: str + :param parameters: The cluster configurations. + :type parameters: dict[str, str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._update_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + configuration_name=configuration_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}'} + + def get( + self, resource_group_name, cluster_name, configuration_name, custom_headers=None, raw=False, **operation_config): + """The configuration object for the specified cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param configuration_name: The name of the cluster configuration. + :type configuration_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: dict or ClientRawResponse if raw=true + :rtype: dict[str, str] or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'configurationName': self._serialize.url("configuration_name", configuration_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('{str}', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py new file mode 100644 index 000000000000..b7c857f73ac3 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py @@ -0,0 +1,515 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse +from msrest.polling import LROPoller, NoPolling +from msrestazure.polling.arm_polling import ARMPolling + +from .. import models + + +class ExtensionsOperations(object): + """ExtensionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + + def _enable_monitoring_initial( + self, resource_group_name, cluster_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, **operation_config): + parameters = models.ClusterMonitoringRequest(workspace_id=workspace_id, primary_key=primary_key) + + # Construct URL + url = self.enable_monitoring.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'ClusterMonitoringRequest') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def enable_monitoring( + self, resource_group_name, cluster_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Enables the Operations Management Suite (OMS) on the HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param workspace_id: The Operations Management Suite (OMS) workspace + ID. + :type workspace_id: str + :param primary_key: The Operations Management Suite (OMS) workspace + key. + :type primary_key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._enable_monitoring_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + workspace_id=workspace_id, + primary_key=primary_key, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + enable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'} + + def get_monitoring_status( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Gets the status of Operations Management Suite (OMS) on the HDInsight + cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: ClusterMonitoringResponse or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.ClusterMonitoringResponse or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_monitoring_status.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ClusterMonitoringResponse', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_monitoring_status.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'} + + + def _disable_monitoring_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.disable_monitoring.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def disable_monitoring( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Disables the Operations Management Suite (OMS) on the HDInsight + cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._disable_monitoring_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + disable_monitoring.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring'} + + + def _create_initial( + self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, **operation_config): + parameters = models.Extension(workspace_id=workspace_id, primary_key=primary_key) + + # Construct URL + url = self.create.metadata['url'] + 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'), + 'extensionName': self._serialize.url("extension_name", extension_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Content-Type'] = 'application/json; charset=utf-8' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct body + body_content = self._serialize.body(parameters, 'Extension') + + # Construct and send request + request = self._client.put(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def create( + self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates an HDInsight cluster extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param extension_name: The name of the cluster extension. + :type extension_name: str + :param workspace_id: The workspace ID for the cluster monitoring + extension. + :type workspace_id: str + :param primary_key: The certificate for the cluster monitoring + extensions. + :type primary_key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + extension_name=extension_name, + workspace_id=workspace_id, + primary_key=primary_key, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'} + + def get( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, **operation_config): + """Gets the extension properties for the specified HDInsight cluster + extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param extension_name: The name of the cluster extension. + :type extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: Extension or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.Extension or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get.metadata['url'] + 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'), + 'extensionName': self._serialize.url("extension_name", extension_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('Extension', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'} + + + def _delete_initial( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.delete.metadata['url'] + 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'), + 'extensionName': self._serialize.url("extension_name", extension_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def delete( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified extension for HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param extension_name: The name of the cluster extension. + :type extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + extension_name=extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py new file mode 100644 index 000000000000..a23feb791349 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py @@ -0,0 +1,95 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class LocationsOperations(object): + """LocationsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_usages( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists the usages for the specified location. + + :param location: The location to get capabilities for. + :type location: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: UsagesListResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.UsagesListResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.list_usages.metadata['url'] + path_format_arguments = { + 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), + 'location': self._serialize.url("location", location, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('UsagesListResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + list_usages.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/usages'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py new file mode 100644 index 000000000000..518df6a15b9c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py @@ -0,0 +1,96 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class Operations(object): + """Operations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list( + self, custom_headers=None, raw=False, **operation_config): + """Lists all of the available HDInsight REST API operations. + + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of Operation + :rtype: + ~azure.mgmt.hdinsight.models.OperationPaged[~azure.mgmt.hdinsight.models.Operation] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list.metadata['url'] + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.OperationPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.OperationPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list.metadata = {'url': '/providers/Microsoft.HDInsight/operations'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py new file mode 100644 index 000000000000..f69fe8b17673 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py @@ -0,0 +1,225 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ScriptActionsOperations(object): + """ScriptActionsOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def delete( + self, resource_group_name, cluster_name, script_name, custom_headers=None, raw=False, **operation_config): + """Deletes a specified persisted script action of the cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param script_name: The name of the script. + :type script_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.delete.metadata['url'] + 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'), + 'scriptName': self._serialize.url("script_name", script_name, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName}'} + + def list_by_cluster( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Lists all the persisted script actions for the specified cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RuntimeScriptActionDetail + :rtype: + ~azure.mgmt.hdinsight.models.RuntimeScriptActionDetailPaged[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_cluster.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.RuntimeScriptActionDetailPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RuntimeScriptActionDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions'} + + def get_execution_detail( + self, resource_group_name, cluster_name, script_execution_id, custom_headers=None, raw=False, **operation_config): + """Gets the script execution detail for the given script execution ID. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param script_execution_id: The script execution Id + :type script_execution_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: RuntimeScriptActionDetail or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_execution_detail.metadata['url'] + 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'), + 'scriptExecutionId': self._serialize.url("script_execution_id", script_execution_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('RuntimeScriptActionDetail', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_execution_detail.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_execution_history_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_execution_history_operations.py new file mode 100644 index 000000000000..36cfbb6fdb97 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_execution_history_operations.py @@ -0,0 +1,161 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +import uuid +from msrest.pipeline import ClientRawResponse + +from .. import models + + +class ScriptExecutionHistoryOperations(object): + """ScriptExecutionHistoryOperations operations. + + :param client: Client for service requests. + :param config: Configuration of service client. + :param serializer: An object model serializer. + :param deserializer: An object model deserializer. + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2018-06-01-preview" + + self.config = config + + def list_by_cluster( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): + """Lists all scripts' execution history for the specified cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: An iterator like instance of RuntimeScriptActionDetail + :rtype: + ~azure.mgmt.hdinsight.models.RuntimeScriptActionDetailPaged[~azure.mgmt.hdinsight.models.RuntimeScriptActionDetail] + :raises: + :class:`ErrorResponseException` + """ + def internal_paging(next_link=None, raw=False): + + if not next_link: + # Construct URL + url = self.list_by_cluster.metadata['url'] + 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') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + else: + url = next_link + query_parameters = {} + + # Construct headers + header_parameters = {} + header_parameters['Accept'] = 'application/json' + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + return response + + # Deserialize response + deserialized = models.RuntimeScriptActionDetailPaged(internal_paging, self._deserialize.dependencies) + + if raw: + header_dict = {} + client_raw_response = models.RuntimeScriptActionDetailPaged(internal_paging, self._deserialize.dependencies, header_dict) + return client_raw_response + + return deserialized + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory'} + + def promote( + self, resource_group_name, cluster_name, script_execution_id, custom_headers=None, raw=False, **operation_config): + """Promotes the specified ad-hoc script execution to a persisted script. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param script_execution_id: The script execution Id + :type script_execution_id: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.promote.metadata['url'] + 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'), + 'scriptExecutionId': self._serialize.url("script_execution_id", script_execution_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['api-version'] = self._serialize.query("self.api_version", self.api_version, 'str') + + # Construct headers + header_parameters = {} + if self.config.generate_client_request_id: + header_parameters['x-ms-client-request-id'] = str(uuid.uuid1()) + if custom_headers: + header_parameters.update(custom_headers) + if self.config.accept_language is not None: + header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') + + # Construct and send request + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [200]: + raise models.ErrorResponseException(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + promote.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory/{scriptExecutionId}/promote'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/version.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/version.py new file mode 100644 index 000000000000..e0ec669828cb --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/version.py @@ -0,0 +1,13 @@ +# coding=utf-8 +# -------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +# +# Code generated by Microsoft (R) AutoRest Code Generator. +# Changes may cause incorrect behavior and will be lost if the code is +# regenerated. +# -------------------------------------------------------------------------- + +VERSION = "0.1.0" + diff --git a/azure-mgmt-hdinsight/azure_bdist_wheel.py b/azure-mgmt-hdinsight/azure_bdist_wheel.py new file mode 100644 index 000000000000..61ec571a9743 --- /dev/null +++ b/azure-mgmt-hdinsight/azure_bdist_wheel.py @@ -0,0 +1,533 @@ +""" +"wheel" copyright (c) 2012-2017 Daniel Holth and +contributors. + +The MIT License + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included +in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL +THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR +OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, +ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR +OTHER DEALINGS IN THE SOFTWARE. + +Create a Azure wheel (.whl) distribution (a wheel is a built archive format). + +This file is a copy of the official bdist_wheel file from wheel 0.30.0a0, enhanced +of the bottom with some Microsoft extension for Azure SDK for Python + +""" + +import csv +import hashlib +import os +import subprocess +import warnings +import shutil +import json +import sys + +try: + import sysconfig +except ImportError: # pragma nocover + # Python < 2.7 + import distutils.sysconfig as sysconfig + +import pkg_resources + +safe_name = pkg_resources.safe_name +safe_version = pkg_resources.safe_version + +from shutil import rmtree +from email.generator import Generator + +from distutils.core import Command +from distutils.sysconfig import get_python_version + +from distutils import log as logger + +from wheel.pep425tags import get_abbr_impl, get_impl_ver, get_abi_tag, get_platform +from wheel.util import native, open_for_csv +from wheel.archive import archive_wheelfile +from wheel.pkginfo import read_pkg_info, write_pkg_info +from wheel.metadata import pkginfo_to_dict +from wheel import pep425tags, metadata +from wheel import __version__ as wheel_version + +def safer_name(name): + return safe_name(name).replace('-', '_') + +def safer_version(version): + return safe_version(version).replace('-', '_') + +class bdist_wheel(Command): + + description = 'create a wheel distribution' + + user_options = [('bdist-dir=', 'b', + "temporary directory for creating the distribution"), + ('plat-name=', 'p', + "platform name to embed in generated filenames " + "(default: %s)" % get_platform()), + ('keep-temp', 'k', + "keep the pseudo-installation tree around after " + + "creating the distribution archive"), + ('dist-dir=', 'd', + "directory to put final built distributions in"), + ('skip-build', None, + "skip rebuilding everything (for testing/debugging)"), + ('relative', None, + "build the archive using relative paths" + "(default: false)"), + ('owner=', 'u', + "Owner name used when creating a tar file" + " [default: current user]"), + ('group=', 'g', + "Group name used when creating a tar file" + " [default: current group]"), + ('universal', None, + "make a universal wheel" + " (default: false)"), + ('python-tag=', None, + "Python implementation compatibility tag" + " (default: py%s)" % get_impl_ver()[0]), + ] + + boolean_options = ['keep-temp', 'skip-build', 'relative', 'universal'] + + def initialize_options(self): + self.bdist_dir = None + self.data_dir = None + self.plat_name = None + self.plat_tag = None + self.format = 'zip' + self.keep_temp = False + self.dist_dir = None + self.distinfo_dir = None + self.egginfo_dir = None + self.root_is_pure = None + self.skip_build = None + self.relative = False + self.owner = None + self.group = None + self.universal = False + self.python_tag = 'py' + get_impl_ver()[0] + self.plat_name_supplied = False + + def finalize_options(self): + if self.bdist_dir is None: + bdist_base = self.get_finalized_command('bdist').bdist_base + self.bdist_dir = os.path.join(bdist_base, 'wheel') + + self.data_dir = self.wheel_dist_name + '.data' + self.plat_name_supplied = self.plat_name is not None + + need_options = ('dist_dir', 'plat_name', 'skip_build') + + self.set_undefined_options('bdist', + *zip(need_options, need_options)) + + self.root_is_pure = not (self.distribution.has_ext_modules() + or self.distribution.has_c_libraries()) + + # Support legacy [wheel] section for setting universal + wheel = self.distribution.get_option_dict('wheel') + if 'universal' in wheel: + # please don't define this in your global configs + val = wheel['universal'][1].strip() + if val.lower() in ('1', 'true', 'yes'): + self.universal = True + + @property + def wheel_dist_name(self): + """Return distribution full name with - replaced with _""" + return '-'.join((safer_name(self.distribution.get_name()), + safer_version(self.distribution.get_version()))) + + def get_tag(self): + # bdist sets self.plat_name if unset, we should only use it for purepy + # wheels if the user supplied it. + if self.plat_name_supplied: + plat_name = self.plat_name + elif self.root_is_pure: + plat_name = 'any' + else: + plat_name = self.plat_name or get_platform() + if plat_name in ('linux-x86_64', 'linux_x86_64') and sys.maxsize == 2147483647: + plat_name = 'linux_i686' + plat_name = plat_name.replace('-', '_').replace('.', '_') + + + if self.root_is_pure: + if self.universal: + impl = 'py2.py3' + else: + impl = self.python_tag + tag = (impl, 'none', plat_name) + else: + impl_name = get_abbr_impl() + impl_ver = get_impl_ver() + # PEP 3149 + abi_tag = str(get_abi_tag()).lower() + tag = (impl_name + impl_ver, abi_tag, plat_name) + supported_tags = pep425tags.get_supported( + supplied_platform=plat_name if self.plat_name_supplied else None) + # XXX switch to this alternate implementation for non-pure: + assert tag == supported_tags[0], "%s != %s" % (tag, supported_tags[0]) + return tag + + def get_archive_basename(self): + """Return archive name without extension""" + + impl_tag, abi_tag, plat_tag = self.get_tag() + + archive_basename = "%s-%s-%s-%s" % ( + self.wheel_dist_name, + impl_tag, + abi_tag, + plat_tag) + return archive_basename + + def run(self): + build_scripts = self.reinitialize_command('build_scripts') + build_scripts.executable = 'python' + + if not self.skip_build: + self.run_command('build') + + install = self.reinitialize_command('install', + reinit_subcommands=True) + install.root = self.bdist_dir + install.compile = False + install.skip_build = self.skip_build + install.warn_dir = False + + # A wheel without setuptools scripts is more cross-platform. + # Use the (undocumented) `no_ep` option to setuptools' + # install_scripts command to avoid creating entry point scripts. + install_scripts = self.reinitialize_command('install_scripts') + install_scripts.no_ep = True + + # Use a custom scheme for the archive, because we have to decide + # at installation time which scheme to use. + for key in ('headers', 'scripts', 'data', 'purelib', 'platlib'): + setattr(install, + 'install_' + key, + os.path.join(self.data_dir, key)) + + basedir_observed = '' + + if os.name == 'nt': + # win32 barfs if any of these are ''; could be '.'? + # (distutils.command.install:change_roots bug) + basedir_observed = os.path.normpath(os.path.join(self.data_dir, '..')) + self.install_libbase = self.install_lib = basedir_observed + + setattr(install, + 'install_purelib' if self.root_is_pure else 'install_platlib', + basedir_observed) + + logger.info("installing to %s", self.bdist_dir) + + self.run_command('install') + + archive_basename = self.get_archive_basename() + + pseudoinstall_root = os.path.join(self.dist_dir, archive_basename) + if not self.relative: + archive_root = self.bdist_dir + else: + archive_root = os.path.join( + self.bdist_dir, + self._ensure_relative(install.install_base)) + + self.set_undefined_options( + 'install_egg_info', ('target', 'egginfo_dir')) + self.distinfo_dir = os.path.join(self.bdist_dir, + '%s.dist-info' % self.wheel_dist_name) + self.egg2dist(self.egginfo_dir, + self.distinfo_dir) + + self.write_wheelfile(self.distinfo_dir) + + self.write_record(self.bdist_dir, self.distinfo_dir) + + # Make the archive + if not os.path.exists(self.dist_dir): + os.makedirs(self.dist_dir) + wheel_name = archive_wheelfile(pseudoinstall_root, archive_root) + + # Sign the archive + if 'WHEEL_TOOL' in os.environ: + subprocess.call([os.environ['WHEEL_TOOL'], 'sign', wheel_name]) + + # Add to 'Distribution.dist_files' so that the "upload" command works + getattr(self.distribution, 'dist_files', []).append( + ('bdist_wheel', get_python_version(), wheel_name)) + + if not self.keep_temp: + if self.dry_run: + logger.info('removing %s', self.bdist_dir) + else: + rmtree(self.bdist_dir) + + def write_wheelfile(self, wheelfile_base, generator='bdist_wheel (' + wheel_version + ')'): + from email.message import Message + msg = Message() + msg['Wheel-Version'] = '1.0' # of the spec + msg['Generator'] = generator + msg['Root-Is-Purelib'] = str(self.root_is_pure).lower() + + # Doesn't work for bdist_wininst + impl_tag, abi_tag, plat_tag = self.get_tag() + for impl in impl_tag.split('.'): + for abi in abi_tag.split('.'): + for plat in plat_tag.split('.'): + msg['Tag'] = '-'.join((impl, abi, plat)) + + wheelfile_path = os.path.join(wheelfile_base, 'WHEEL') + logger.info('creating %s', wheelfile_path) + with open(wheelfile_path, 'w') as f: + Generator(f, maxheaderlen=0).flatten(msg) + + def _ensure_relative(self, path): + # copied from dir_util, deleted + drive, path = os.path.splitdrive(path) + if path[0:1] == os.sep: + path = drive + path[1:] + return path + + def _pkginfo_to_metadata(self, egg_info_path, pkginfo_path): + return metadata.pkginfo_to_metadata(egg_info_path, pkginfo_path) + + def license_file(self): + """Return license filename from a license-file key in setup.cfg, or None.""" + metadata = self.distribution.get_option_dict('metadata') + if not 'license_file' in metadata: + return None + return metadata['license_file'][1] + + def setupcfg_requirements(self): + """Generate requirements from setup.cfg as + ('Requires-Dist', 'requirement; qualifier') tuples. From a metadata + section in setup.cfg: + + [metadata] + provides-extra = extra1 + extra2 + requires-dist = requirement; qualifier + another; qualifier2 + unqualified + + Yields + + ('Provides-Extra', 'extra1'), + ('Provides-Extra', 'extra2'), + ('Requires-Dist', 'requirement; qualifier'), + ('Requires-Dist', 'another; qualifier2'), + ('Requires-Dist', 'unqualified') + """ + metadata = self.distribution.get_option_dict('metadata') + + # our .ini parser folds - to _ in key names: + for key, title in (('provides_extra', 'Provides-Extra'), + ('requires_dist', 'Requires-Dist')): + if not key in metadata: + continue + field = metadata[key] + for line in field[1].splitlines(): + line = line.strip() + if not line: + continue + yield (title, line) + + def add_requirements(self, metadata_path): + """Add additional requirements from setup.cfg to file metadata_path""" + additional = list(self.setupcfg_requirements()) + if not additional: return + pkg_info = read_pkg_info(metadata_path) + if 'Provides-Extra' in pkg_info or 'Requires-Dist' in pkg_info: + warnings.warn('setup.cfg requirements overwrite values from setup.py') + del pkg_info['Provides-Extra'] + del pkg_info['Requires-Dist'] + for k, v in additional: + pkg_info[k] = v + write_pkg_info(metadata_path, pkg_info) + + def egg2dist(self, egginfo_path, distinfo_path): + """Convert an .egg-info directory into a .dist-info directory""" + def adios(p): + """Appropriately delete directory, file or link.""" + if os.path.exists(p) and not os.path.islink(p) and os.path.isdir(p): + shutil.rmtree(p) + elif os.path.exists(p): + os.unlink(p) + + adios(distinfo_path) + + if not os.path.exists(egginfo_path): + # There is no egg-info. This is probably because the egg-info + # file/directory is not named matching the distribution name used + # to name the archive file. Check for this case and report + # accordingly. + import glob + pat = os.path.join(os.path.dirname(egginfo_path), '*.egg-info') + possible = glob.glob(pat) + err = "Egg metadata expected at %s but not found" % (egginfo_path,) + if possible: + alt = os.path.basename(possible[0]) + err += " (%s found - possible misnamed archive file?)" % (alt,) + + raise ValueError(err) + + if os.path.isfile(egginfo_path): + # .egg-info is a single file + pkginfo_path = egginfo_path + pkg_info = self._pkginfo_to_metadata(egginfo_path, egginfo_path) + os.mkdir(distinfo_path) + else: + # .egg-info is a directory + pkginfo_path = os.path.join(egginfo_path, 'PKG-INFO') + pkg_info = self._pkginfo_to_metadata(egginfo_path, pkginfo_path) + + # ignore common egg metadata that is useless to wheel + shutil.copytree(egginfo_path, distinfo_path, + ignore=lambda x, y: set(('PKG-INFO', + 'requires.txt', + 'SOURCES.txt', + 'not-zip-safe',))) + + # delete dependency_links if it is only whitespace + dependency_links_path = os.path.join(distinfo_path, 'dependency_links.txt') + with open(dependency_links_path, 'r') as dependency_links_file: + dependency_links = dependency_links_file.read().strip() + if not dependency_links: + adios(dependency_links_path) + + write_pkg_info(os.path.join(distinfo_path, 'METADATA'), pkg_info) + + # XXX deprecated. Still useful for current distribute/setuptools. + metadata_path = os.path.join(distinfo_path, 'METADATA') + self.add_requirements(metadata_path) + + # XXX intentionally a different path than the PEP. + metadata_json_path = os.path.join(distinfo_path, 'metadata.json') + pymeta = pkginfo_to_dict(metadata_path, + distribution=self.distribution) + + if 'description' in pymeta: + description_filename = 'DESCRIPTION.rst' + description_text = pymeta.pop('description') + description_path = os.path.join(distinfo_path, + description_filename) + with open(description_path, "wb") as description_file: + description_file.write(description_text.encode('utf-8')) + pymeta['extensions']['python.details']['document_names']['description'] = description_filename + + # XXX heuristically copy any LICENSE/LICENSE.txt? + license = self.license_file() + if license: + license_filename = 'LICENSE.txt' + shutil.copy(license, os.path.join(self.distinfo_dir, license_filename)) + pymeta['extensions']['python.details']['document_names']['license'] = license_filename + + with open(metadata_json_path, "w") as metadata_json: + json.dump(pymeta, metadata_json, sort_keys=True) + + adios(egginfo_path) + + def write_record(self, bdist_dir, distinfo_dir): + from wheel.util import urlsafe_b64encode + + record_path = os.path.join(distinfo_dir, 'RECORD') + record_relpath = os.path.relpath(record_path, bdist_dir) + + def walk(): + for dir, dirs, files in os.walk(bdist_dir): + dirs.sort() + for f in sorted(files): + yield os.path.join(dir, f) + + def skip(path): + """Wheel hashes every possible file.""" + return (path == record_relpath) + + with open_for_csv(record_path, 'w+') as record_file: + writer = csv.writer(record_file) + for path in walk(): + relpath = os.path.relpath(path, bdist_dir) + if skip(relpath): + hash = '' + size = '' + else: + with open(path, 'rb') as f: + data = f.read() + digest = hashlib.sha256(data).digest() + hash = 'sha256=' + native(urlsafe_b64encode(digest)) + size = len(data) + record_path = os.path.relpath( + path, bdist_dir).replace(os.path.sep, '/') + writer.writerow((record_path, hash, size)) + + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +from distutils import log as logger +import os.path + +#from wheel.bdist_wheel import bdist_wheel +class azure_bdist_wheel(bdist_wheel): + + description = "Create an Azure wheel distribution" + + user_options = bdist_wheel.user_options + \ + [('azure-namespace-package=', None, + "Name of the deepest nspkg used")] + + def initialize_options(self): + bdist_wheel.initialize_options(self) + self.azure_namespace_package = None + + def finalize_options(self): + bdist_wheel.finalize_options(self) + if self.azure_namespace_package and not self.azure_namespace_package.endswith("-nspkg"): + raise ValueError("azure_namespace_package must finish by -nspkg") + + def run(self): + if not self.distribution.install_requires: + self.distribution.install_requires = [] + self.distribution.install_requires.append( + "{}>=2.0.0".format(self.azure_namespace_package)) + bdist_wheel.run(self) + + def write_record(self, bdist_dir, distinfo_dir): + if self.azure_namespace_package: + # Split and remove last part, assuming it's "nspkg" + subparts = self.azure_namespace_package.split('-')[0:-1] + folder_with_init = [os.path.join(*subparts[0:i+1]) for i in range(len(subparts))] + for azure_sub_package in folder_with_init: + init_file = os.path.join(bdist_dir, azure_sub_package, '__init__.py') + if os.path.isfile(init_file): + logger.info("manually remove {} while building the wheel".format(init_file)) + os.remove(init_file) + else: + raise ValueError("Unable to find {}. Are you sure of your namespace package?".format(init_file)) + bdist_wheel.write_record(self, bdist_dir, distinfo_dir) +cmdclass = { + 'bdist_wheel': azure_bdist_wheel, +} diff --git a/azure-mgmt-hdinsight/build.json b/azure-mgmt-hdinsight/build.json new file mode 100644 index 000000000000..d5356f60b700 --- /dev/null +++ b/azure-mgmt-hdinsight/build.json @@ -0,0 +1,225 @@ +{ + "autorest": [ + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest-core", + "version": "2.0.4168", + "engines": { + "node": ">=7.10.0" + }, + "dependencies": {}, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/async-io": "~1.0.22", + "@microsoft.azure/extension": "~1.2.12", + "@types/commonmark": "^0.27.0", + "@types/jsonpath": "^0.1.29", + "@types/node": "^8.0.28", + "@types/pify": "0.0.28", + "@types/source-map": "^0.5.0", + "@types/yargs": "^8.0.2", + "commonmark": "^0.27.0", + "file-url": "^2.0.2", + "get-uri": "^2.0.0", + "jsonpath": "^0.2.11", + "linq-es2015": "^2.4.25", + "mocha": "3.4.2", + "mocha-typescript": "1.1.5", + "pify": "^3.0.0", + "safe-eval": "^0.3.0", + "shx": "^0.2.2", + "source-map": "^0.5.6", + "source-map-support": "^0.4.15", + "strip-bom": "^3.0.0", + "typescript": "2.5.3", + "untildify": "^3.0.2", + "urijs": "^1.18.10", + "vscode-jsonrpc": "^3.3.1", + "yaml-ast-parser": "https://github.com/olydis/yaml-ast-parser/releases/download/0.0.34/yaml-ast-parser-0.0.34.tgz", + "yargs": "^8.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_shasum": "33813111fc9bfa488bd600fbba48bc53cc9182c7", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest-core@2.0.4168", + "_from": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core", + "_where": "/root/.autorest/@microsoft.azure_autorest-core@2.0.4168/node_modules/@microsoft.azure/autorest-core" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.0.21", + "dependencies": { + "dotnet-2.0.0": "^1.3.2" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.1.1", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "3ce7d3939124b31830be15e5de99b9b7768afb90", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.0.21", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.0.21/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.modeler", + "version": "2.1.22", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_shasum": "ca425289fa38a210d279729048a4a91673f09c67", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.modeler@2.1.22", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler", + "_where": "/root/.autorest/@microsoft.azure_autorest.modeler@2.1.22/node_modules/@microsoft.azure/autorest.modeler" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + }, + { + "resolvedInfo": null, + "packageMetadata": { + "name": "@microsoft.azure/autorest.python", + "version": "2.0.19", + "dependencies": { + "dotnet-2.0.0": "^1.4.4" + }, + "optionalDependencies": {}, + "devDependencies": { + "@microsoft.azure/autorest.testserver": "^1.9.0", + "autorest": "^2.0.0", + "coffee-script": "^1.11.1", + "dotnet-sdk-2.0.0": "^1.4.4", + "gulp": "^3.9.1", + "gulp-filter": "^5.0.0", + "gulp-line-ending-corrector": "^1.0.1", + "iced-coffee-script": "^108.0.11", + "marked": "^0.3.6", + "marked-terminal": "^2.0.0", + "moment": "^2.17.1", + "run-sequence": "*", + "shx": "^0.2.2", + "through2-parallel": "^0.1.3", + "yargs": "^8.0.2", + "yarn": "^1.0.2" + }, + "bundleDependencies": false, + "peerDependencies": {}, + "deprecated": false, + "_resolved": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_shasum": "e069166c16fd903c8e1fdf9395b433f3043cb6e3", + "_shrinkwrap": null, + "bin": null, + "_id": "@microsoft.azure/autorest.python@2.0.19", + "_from": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_requested": { + "type": "directory", + "where": "/git-restapi", + "raw": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "rawSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "saveSpec": "file:/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "fetchSpec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "_spec": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python", + "_where": "/root/.autorest/@microsoft.azure_autorest.python@2.0.19/node_modules/@microsoft.azure/autorest.python" + }, + "extensionManager": { + "installationPath": "/root/.autorest", + "dotnetPath": "/root/.dotnet" + }, + "installationPath": "/root/.autorest" + } + ], + "autorest_bootstrap": {} +} \ No newline at end of file diff --git a/azure-mgmt-hdinsight/setup.cfg b/azure-mgmt-hdinsight/setup.cfg new file mode 100644 index 000000000000..856f4164982c --- /dev/null +++ b/azure-mgmt-hdinsight/setup.cfg @@ -0,0 +1,3 @@ +[bdist_wheel] +universal=1 +azure-namespace-package=azure-mgmt-nspkg \ No newline at end of file diff --git a/azure-mgmt-hdinsight/setup.py b/azure-mgmt-hdinsight/setup.py new file mode 100644 index 000000000000..189deb53eb87 --- /dev/null +++ b/azure-mgmt-hdinsight/setup.py @@ -0,0 +1,85 @@ +#!/usr/bin/env python + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- + +import re +import os.path +from io import open +from setuptools import find_packages, setup +try: + from azure_bdist_wheel import cmdclass +except ImportError: + from distutils import log as logger + logger.warn("Wheel is not available, disabling bdist_wheel hook") + cmdclass = {} + +# Change the PACKAGE_NAME only to change folder and different name +PACKAGE_NAME = "azure-mgmt-hdinsight" +PACKAGE_PPRINT_NAME = "HDInsight" + +# a-b-c => a/b/c +package_folder_path = PACKAGE_NAME.replace('-', '/') +# a-b-c => a.b.c +namespace_name = PACKAGE_NAME.replace('-', '.') + +# azure v0.x is not compatible with this package +# azure v0.x used to have a __version__ attribute (newer versions don't) +try: + import azure + try: + ver = azure.__version__ + raise Exception( + 'This package is incompatible with azure=={}. '.format(ver) + + 'Uninstall it with "pip uninstall azure".' + ) + except AttributeError: + pass +except ImportError: + pass + +# Version extraction inspired from 'requests' +with open(os.path.join(package_folder_path, 'version.py'), 'r') as fd: + version = re.search(r'^VERSION\s*=\s*[\'"]([^\'"]*)[\'"]', + fd.read(), re.MULTILINE).group(1) + +if not version: + raise RuntimeError('Cannot find version information') + +with open('README.rst', encoding='utf-8') as f: + readme = f.read() +with open('HISTORY.rst', encoding='utf-8') as f: + history = f.read() + +setup( + name=PACKAGE_NAME, + version=version, + description='Microsoft Azure {} Client Library for Python'.format(PACKAGE_PPRINT_NAME), + long_description=readme + '\n\n' + history, + license='MIT License', + author='Microsoft Corporation', + author_email='azpysdkhelp@microsoft.com', + url='https://github.com/Azure/azure-sdk-for-python', + classifiers=[ + 'Development Status :: 4 - Beta', + 'Programming Language :: Python', + 'Programming Language :: Python :: 2', + 'Programming Language :: Python :: 2.7', + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.3', + 'Programming Language :: Python :: 3.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrestazure~=0.4.11', + 'azure-common~=1.1', + ], + cmdclass=cmdclass +) diff --git a/azure-mgmt-hdinsight/test/recordings/test_mgmt_hdinsight.test_cluster_create.yaml b/azure-mgmt-hdinsight/test/recordings/test_mgmt_hdinsight.test_cluster_create.yaml new file mode 100644 index 000000000000..81678ca067be --- /dev/null +++ b/azure-mgmt-hdinsight/test/recordings/test_mgmt_hdinsight.test_cluster_create.yaml @@ -0,0 +1,1399 @@ +interactions: +- request: + body: !!python/unicode '{"tags": {}, "properties": {"computeProfile": {"roles": + [{"hardwareProfile": {"vmSize": "Large"}, "osProfile": {"linuxOperatingSystemProfile": + {"username": "sshuser", "password": "Password1!"}}, "targetInstanceCount": 2, + "name": "headnode"}, {"hardwareProfile": {"vmSize": "Large"}, "osProfile": {"linuxOperatingSystemProfile": + {"username": "sshuser", "password": "Password1!"}}, "targetInstanceCount": 1, + "name": "workernode"}]}, "tier": "Standard", "clusterVersion": "3.6", "clusterDefinition": + {"kind": "hadoop", "configurations": {"gateway": {"restAuthCredential.enabled_credential": + "True", "restAuthCredential.username": "admin", "restAuthCredential.password": + "Password1!"}}}, "storageProfile": {"storageaccounts": [{"key": "E9Rz4cwkow1pdAXMEheSehexmUM2gqO455grmiK48TwgBqbAbBfUKLF78MRdkhBPo69qc4UX+BDUHpeJffHLOA==", + "container": "hdisdk-py-humboldt42fd1018", "name": "wawonsdkncentralus.blob.core.windows.net", + "isDefault": true}]}, "osType": "Linux"}, "location": "North Central US"}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['991'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + accept-language: [en-US] + method: PUT + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018","name":"hdisdk-py-humboldt42fd1018","type":"Microsoft.HDInsight/clusters","location":"North + Central US","etag":"32e11f66-c84d-4f5f-b65a-b4c10f79be41","tags":{},"properties":{"clusterVersion":"3.6.1000.65","osType":"Linux","clusterDefinition":{"blueprint":"https://blueprints.azurehdinsight.net/hadoop-3.6.1000.65.1807162004.json","kind":"hadoop","componentVersion":{"hadoop":"2.7"}},"computeProfile":{"roles":[{"name":"headnode","targetInstanceCount":2,"hardwareProfile":{"vmSize":"Large"},"osProfile":{"linuxOperatingSystemProfile":{"username":"sshuser"}},"encryptDataDisks":false},{"name":"workernode","targetInstanceCount":1,"hardwareProfile":{"vmSize":"Large"},"osProfile":{"linuxOperatingSystemProfile":{"username":"sshuser"}},"encryptDataDisks":false}]},"provisioningState":"InProgress","clusterState":"Accepted","createdDate":"2018-08-07T03:02:48.57","quotaInfo":{"coresUsed":12},"tier":"standard"}}'} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview'] + cache-control: [no-cache] + content-length: ['1095'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:02:48 GMT'] + etag: ['"32e11f66-c84d-4f5f-b65a-b4c10f79be41"'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-clusteruri: ['https://management.azure.com/subscriptions/964c10bb-8a6c-43bc-83d3-6b318c6c7305/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018?api-version=2015-03-01-preview'] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:03:19 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:03:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:04:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:04:51 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:05:22 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:05:53 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:06:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:06:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:07:25 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:07:56 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:08:26 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:08:57 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:09:27 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:09:59 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:10:30 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:11:01 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:11:32 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:12:02 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:12:33 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:13:03 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:13:35 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:14:06 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:14:36 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:15:07 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:15:37 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:16:08 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:16:38 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:17:09 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/create?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:17:40 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"id":"/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018","name":"hdisdk-py-humboldt42fd1018","type":"Microsoft.HDInsight/clusters","location":"North + Central US","etag":"32e11f66-c84d-4f5f-b65a-b4c10f79be41","tags":{},"properties":{"clusterVersion":"3.6.1000.65","osType":"Linux","clusterDefinition":{"blueprint":"https://blueprints.azurehdinsight.net/hadoop-3.6.1000.65.1807162004.json","kind":"hadoop","componentVersion":{"hadoop":"2.7"}},"computeProfile":{"roles":[{"name":"headnode","targetInstanceCount":2,"hardwareProfile":{"vmSize":"Large"},"osProfile":{"linuxOperatingSystemProfile":{"username":"sshuser"}},"encryptDataDisks":false},{"name":"workernode","targetInstanceCount":1,"hardwareProfile":{"vmSize":"Large"},"osProfile":{"linuxOperatingSystemProfile":{"username":"sshuser"}},"encryptDataDisks":false},{"name":"zookeepernode","targetInstanceCount":3,"hardwareProfile":{"vmSize":"Medium"},"osProfile":{"linuxOperatingSystemProfile":{"username":"sshuser"}},"encryptDataDisks":false}]},"provisioningState":"Succeeded","clusterState":"Running","createdDate":"2018-08-07T03:02:48.57","quotaInfo":{"coresUsed":12},"connectivityEndpoints":[{"name":"SSH","protocol":"TCP","location":"hdisdk-py-humboldt42fd1018-ssh.azurehdinsight.net","port":22},{"name":"HTTPS","protocol":"TCP","location":"hdisdk-py-humboldt42fd1018.azurehdinsight.net","port":443}],"tier":"standard"}}'} + headers: + cache-control: [no-cache] + content-length: ['1507'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:17:41 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: !!python/unicode '{"targetInstanceCount": 2}' + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['26'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + accept-language: [en-US] + method: POST + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/roles/workernode/resize?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode ''} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview'] + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 07 Aug 2018 03:17:42 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/operationresults/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + x-ms-ratelimit-remaining-subscription-writes: ['1199'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:18:43 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:19:14 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:19:45 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:20:15 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:20:46 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:21:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:21:47 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:22:17 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:22:48 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:23:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:23:49 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:24:20 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:24:50 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018/azureasyncoperations/a2c15844-f76e-4c87-b05f-77b3ded0a44e-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:25:21 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + Content-Length: ['0'] + Content-Type: [application/json; charset=utf-8] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + accept-language: [en-US] + method: DELETE + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/test_mgmt_hdinsight_test_cluster_create42fd1018/providers/Microsoft.HDInsight/clusters/hdisdk-py-humboldt42fd1018?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode ''} + headers: + azure-asyncoperation: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/North%20Central%20US/azureasyncoperations/58fac6c1-5dc4-4462-bfcd-881dee581f12-0-r?api-version=2015-03-01-preview'] + cache-control: [no-cache] + content-length: ['0'] + date: ['Tue, 07 Aug 2018 03:25:23 GMT'] + expires: ['-1'] + location: ['https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/North%20Central%20US/operationresults/58fac6c1-5dc4-4462-bfcd-881dee581f12-0-r?api-version=2015-03-01-preview'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [ClusterResourcesAndSubResources] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + x-ms-ratelimit-remaining-subscription-deletes: ['14999'] + status: {code: 202, message: Accepted} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/North%20Central%20US/azureasyncoperations/58fac6c1-5dc4-4462-bfcd-881dee581f12-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"InProgress"}'} + headers: + cache-control: [no-cache] + content-length: ['23'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:26:24 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [AsyncOperationsWithRegionalSuffix] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +- request: + body: null + headers: + Accept: [application/json] + Accept-Encoding: ['gzip, deflate'] + Connection: [keep-alive] + User-Agent: [python/2.7.15rc1 (Linux-4.15.0-1018-azure-x86_64-with-Ubuntu-18.04-bionic) + requests/2.19.1 msrest/0.5.4 msrest_azure/0.4.34 azure-mgmt-hdinsight/0.1.0 + Azure-SDK-For-Python] + method: GET + uri: https://management.azure.com/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.HDInsight/locations/North%20Central%20US/azureasyncoperations/58fac6c1-5dc4-4462-bfcd-881dee581f12-0-r?api-version=2015-03-01-preview + response: + body: {string: !!python/unicode '{"status":"Succeeded"}'} + headers: + cache-control: [no-cache] + content-length: ['22'] + content-type: [application/json; charset=utf-8] + date: ['Tue, 07 Aug 2018 03:26:54 GMT'] + expires: ['-1'] + pragma: [no-cache] + strict-transport-security: [max-age=31536000; includeSubDomains] + transfer-encoding: [chunked] + vary: [Accept-Encoding] + x-content-type-options: [nosniff] + x-ms-hdi-matched-rule: [AsyncOperationsWithRegionalSuffix] + x-ms-hdi-routed-to: [RegionalRp] + x-ms-hdi-served-by: [northcentralus] + status: {code: 200, message: OK} +version: 1 diff --git a/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py b/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py new file mode 100644 index 000000000000..5896b748f483 --- /dev/null +++ b/azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py @@ -0,0 +1,124 @@ +# coding: utf-8 + +#------------------------------------------------------------------------- +# Copyright (c) Microsoft Corporation. All rights reserved. +# Licensed under the MIT License. See License.txt in the project root for +# license information. +#-------------------------------------------------------------------------- +import unittest + +from azure.mgmt.hdinsight import HDInsightManagementClient +from azure.mgmt.hdinsight.models import * +from devtools_testutils import AzureMgmtTestCase, ResourceGroupPreparer + + +class HDInsightTestConfig: + # Non-sensitive test configs + location = "North Central US" + cluster_username = "admin" + cluster_password = "Password1!" + ssh_username = "sshuser" + ssh_password = "Password1!" + storage_account = "wawonsdkncentralus.blob.core.windows.net" + + # Sensitive test configs + storage_account_key = "" + + +class MgmtHDInsightTest(AzureMgmtTestCase): + + def setUp(self): + super(MgmtHDInsightTest, self).setUp() + self.hdinsight_client = self.create_mgmt_client( + HDInsightManagementClient + ) + + @ResourceGroupPreparer(location=HDInsightTestConfig.location) + def test_cluster_create(self, resource_group, location): + cluster_name = self.get_resource_name('hdisdk-py-humboldt') + + create_params = ClusterCreateParametersExtended( + location=location, + tags={}, + properties=ClusterCreateProperties( + cluster_version="3.6", + os_type=OSType.linux, + tier=Tier.standard, + cluster_definition=ClusterDefinition( + kind="hadoop", + configurations={ + "gateway": { + "restAuthCredential.enabled_credential": "True", + "restAuthCredential.username": HDInsightTestConfig.cluster_username, + "restAuthCredential.password": HDInsightTestConfig.cluster_password + } + } + ), + compute_profile=ComputeProfile( + roles=[ + Role( + name="headnode", + target_instance_count=2, + hardware_profile=HardwareProfile(vm_size="Large"), + os_profile=OsProfile( + linux_operating_system_profile=LinuxOperatingSystemProfile( + username=HDInsightTestConfig.ssh_username, + password=HDInsightTestConfig.ssh_password + ) + ) + ), + Role( + name="workernode", + target_instance_count=1, + hardware_profile=HardwareProfile(vm_size="Large"), + os_profile=OsProfile( + linux_operating_system_profile=LinuxOperatingSystemProfile( + username=HDInsightTestConfig.ssh_username, + password=HDInsightTestConfig.ssh_password + ) + ) + ) + ] + ), + storage_profile=StorageProfile( + storageaccounts=[StorageAccount( + name=HDInsightTestConfig.storage_account, + key=HDInsightTestConfig.storage_account_key, + container=cluster_name.lower(), + is_default=True + )] + ) + ) + ) + + create_poller = self.hdinsight_client.clusters.create(resource_group.name, cluster_name, create_params) + cluster = create_poller.result() + self.validate_cluster(create_params, cluster) + + scale_poller = self.hdinsight_client.clusters.resize(resource_group.name, cluster_name, target_instance_count=2) + scale_poller.wait() + + delete_poller = self.hdinsight_client.clusters.delete(resource_group.name, cluster_name) + delete_poller.wait() + + def validate_cluster(self, create_parameters, cluster_response): + self.assertEqual(create_parameters.properties.tier, cluster_response.properties.tier) + self.assertEqual("Running", cluster_response.properties.cluster_state) + self.assertIsNotNone(cluster_response.etag) + self.assertEqual("Microsoft.HDInsight/clusters", cluster_response.type) + self.assertEqual(create_parameters.location, cluster_response.location) + self.assertEqual(create_parameters.tags, cluster_response.tags) + self.assertEqual(1, len([endpoint for endpoint in cluster_response.properties.connectivity_endpoints + if endpoint.name == "HTTPS"])) + self.assertEqual(1, len([endpoint for endpoint in cluster_response.properties.connectivity_endpoints + if endpoint.name == "SSH"])) + self.assertEqual(create_parameters.properties.os_type, cluster_response.properties.os_type) + self.assertIsNone(cluster_response.properties.errors) + self.assertEqual(HDInsightClusterProvisioningState.succeeded, cluster_response.properties.provisioning_state) + self.assertEqual(create_parameters.properties.cluster_definition.kind, cluster_response.properties.cluster_definition.kind) + self.assertEqual(create_parameters.properties.cluster_version, cluster_response.properties.cluster_version[0:3]) + + +#------------------------------------------------------------------------------ +if __name__ == '__main__': + unittest.main()