From da64fa6996fbbe1896fc09a6258ffc0955fbeaea Mon Sep 17 00:00:00 2001 From: wawon-msft <32000704+wawon-msft@users.noreply.github.com> Date: Wed, 8 Aug 2018 15:35:40 -0700 Subject: [PATCH] [HDInsight] Adding support for HDInsight (#3088) * Added/recorded test for HDInsight * Added author email * HDInsight packaging * HDInsight package-2015-03-preview with Autorest.Python 3.x * History date --- .github/CODEOWNERS | 1 + azure-mgmt-hdinsight/HISTORY.rst | 9 + azure-mgmt-hdinsight/MANIFEST.in | 2 + azure-mgmt-hdinsight/README.rst | 49 + azure-mgmt-hdinsight/azure/__init__.py | 1 + azure-mgmt-hdinsight/azure/mgmt/__init__.py | 1 + .../azure/mgmt/hdinsight/__init__.py | 18 + .../hdinsight/hd_insight_management_client.py | 120 ++ .../azure/mgmt/hdinsight/models/__init__.py | 201 +++ .../mgmt/hdinsight/models/application.py | 54 + .../models/application_get_endpoint.py | 36 + .../models/application_get_endpoint_py3.py | 36 + .../models/application_get_https_endpoint.py | 45 + .../application_get_https_endpoint_py3.py | 45 + .../hdinsight/models/application_paged.py | 27 + .../models/application_properties.py | 86 + .../models/application_properties_py3.py | 86 + .../mgmt/hdinsight/models/application_py3.py | 54 + .../hdinsight/models/capabilities_result.py | 49 + .../models/capabilities_result_py3.py | 49 + .../azure/mgmt/hdinsight/models/cluster.py | 56 + .../cluster_create_parameters_extended.py | 36 + .../cluster_create_parameters_extended_py3.py | 36 + .../models/cluster_create_properties.py | 54 + .../models/cluster_create_properties_py3.py | 54 + .../hdinsight/models/cluster_definition.py | 41 + .../models/cluster_definition_py3.py | 41 + .../models/cluster_get_properties.py | 84 + .../models/cluster_get_properties_py3.py | 84 + ...er_list_persisted_script_actions_result.py | 39 + ...ist_persisted_script_actions_result_py3.py | 39 + ...ist_runtime_script_action_detail_result.py | 41 + ...runtime_script_action_detail_result_py3.py | 41 + .../models/cluster_monitoring_request.py | 32 + .../models/cluster_monitoring_request_py3.py | 32 + .../models/cluster_monitoring_response.py | 34 + .../models/cluster_monitoring_response_py3.py | 34 + .../mgmt/hdinsight/models/cluster_paged.py | 27 + .../models/cluster_patch_parameters.py | 28 + .../models/cluster_patch_parameters_py3.py | 28 + .../mgmt/hdinsight/models/cluster_py3.py | 56 + .../models/cluster_resize_parameters.py | 28 + .../models/cluster_resize_parameters_py3.py | 28 + .../mgmt/hdinsight/models/compute_profile.py | 28 + .../hdinsight/models/compute_profile_py3.py | 28 + .../hdinsight/models/connectivity_endpoint.py | 40 + .../models/connectivity_endpoint_py3.py | 40 + .../hdinsight/models/data_disks_groups.py | 45 + .../hdinsight/models/data_disks_groups_py3.py | 45 + .../mgmt/hdinsight/models/error_response.py | 45 + .../hdinsight/models/error_response_py3.py | 45 + .../azure/mgmt/hdinsight/models/errors.py | 32 + .../azure/mgmt/hdinsight/models/errors_py3.py | 32 + .../execute_script_action_parameters.py | 40 + .../execute_script_action_parameters_py3.py | 40 + .../azure/mgmt/hdinsight/models/extension.py | 33 + .../mgmt/hdinsight/models/extension_py3.py | 33 + .../mgmt/hdinsight/models/hardware_profile.py | 28 + .../hdinsight/models/hardware_profile_py3.py | 28 + .../hd_insight_management_client_enums.py | 45 + .../models/linux_operating_system_profile.py | 36 + .../linux_operating_system_profile_py3.py | 36 + .../mgmt/hdinsight/models/localized_name.py | 32 + .../hdinsight/models/localized_name_py3.py | 32 + .../azure/mgmt/hdinsight/models/operation.py | 32 + .../hdinsight/models/operation_display.py | 37 + .../hdinsight/models/operation_display_py3.py | 37 + .../mgmt/hdinsight/models/operation_paged.py | 27 + .../mgmt/hdinsight/models/operation_py3.py | 32 + .../hdinsight/models/operation_resource.py | 33 + .../models/operation_resource_py3.py | 33 + .../azure/mgmt/hdinsight/models/os_profile.py | 29 + .../mgmt/hdinsight/models/os_profile_py3.py | 29 + .../mgmt/hdinsight/models/proxy_resource.py | 43 + .../hdinsight/models/proxy_resource_py3.py | 43 + .../mgmt/hdinsight/models/quota_capability.py | 29 + .../hdinsight/models/quota_capability_py3.py | 29 + .../azure/mgmt/hdinsight/models/quota_info.py | 28 + .../mgmt/hdinsight/models/quota_info_py3.py | 28 + .../models/regional_quota_capability.py | 36 + .../models/regional_quota_capability_py3.py | 36 + .../hdinsight/models/regions_capability.py | 28 + .../models/regions_capability_py3.py | 28 + .../azure/mgmt/hdinsight/models/resource.py | 45 + .../mgmt/hdinsight/models/resource_py3.py | 45 + .../azure/mgmt/hdinsight/models/role.py | 58 + .../azure/mgmt/hdinsight/models/role_py3.py | 58 + .../hdinsight/models/runtime_script_action.py | 56 + .../models/runtime_script_action_detail.py | 87 + .../runtime_script_action_detail_paged.py | 27 + .../runtime_script_action_detail_py3.py | 87 + .../models/runtime_script_action_py3.py | 56 + .../mgmt/hdinsight/models/script_action.py | 44 + .../models/script_action_execution_summary.py | 41 + .../script_action_execution_summary_py3.py | 41 + ...ript_action_persisted_get_response_spec.py | 44 + ..._action_persisted_get_response_spec_py3.py | 44 + .../hdinsight/models/script_action_py3.py | 44 + .../mgmt/hdinsight/models/security_profile.py | 58 + .../hdinsight/models/security_profile_py3.py | 58 + .../mgmt/hdinsight/models/ssh_profile.py | 28 + .../mgmt/hdinsight/models/ssh_profile_py3.py | 28 + .../mgmt/hdinsight/models/ssh_public_key.py | 28 + .../hdinsight/models/ssh_public_key_py3.py | 28 + .../mgmt/hdinsight/models/storage_account.py | 47 + .../hdinsight/models/storage_account_py3.py | 47 + .../mgmt/hdinsight/models/storage_profile.py | 28 + .../hdinsight/models/storage_profile_py3.py | 28 + .../mgmt/hdinsight/models/tracked_resource.py | 50 + .../hdinsight/models/tracked_resource_py3.py | 50 + .../azure/mgmt/hdinsight/models/usage.py | 40 + .../azure/mgmt/hdinsight/models/usage_py3.py | 40 + .../hdinsight/models/usages_list_result.py | 28 + .../models/usages_list_result_py3.py | 28 + .../mgmt/hdinsight/models/version_spec.py | 40 + .../mgmt/hdinsight/models/version_spec_py3.py | 40 + .../hdinsight/models/versions_capability.py | 28 + .../models/versions_capability_py3.py | 28 + .../models/virtual_network_profile.py | 32 + .../models/virtual_network_profile_py3.py | 32 + .../models/vm_size_compatibility_filter.py | 48 + .../vm_size_compatibility_filter_py3.py | 48 + .../hdinsight/models/vm_sizes_capability.py | 28 + .../models/vm_sizes_capability_py3.py | 28 + .../mgmt/hdinsight/operations/__init__.py | 30 + .../operations/applications_operations.py | 357 +++++ .../operations/clusters_operations.py | 659 ++++++++ .../operations/configurations_operations.py | 191 +++ .../operations/extension_operations.py | 459 ++++++ .../operations/locations_operations.py | 153 ++ .../mgmt/hdinsight/operations/operations.py | 96 ++ .../operations/script_actions_operations.py | 225 +++ .../script_execution_history_operations.py | 161 ++ .../azure/mgmt/hdinsight/version.py | 13 + azure-mgmt-hdinsight/azure_bdist_wheel.py | 54 + azure-mgmt-hdinsight/sdk_packaging.toml | 6 + azure-mgmt-hdinsight/setup.cfg | 3 + azure-mgmt-hdinsight/setup.py | 86 + ...st_mgmt_hdinsight.test_cluster_create.yaml | 1399 +++++++++++++++++ .../test/test_mgmt_hdinsight.py | 124 ++ 140 files changed, 9081 insertions(+) create mode 100644 azure-mgmt-hdinsight/HISTORY.rst create mode 100644 azure-mgmt-hdinsight/MANIFEST.in create mode 100644 azure-mgmt-hdinsight/README.rst create mode 100644 azure-mgmt-hdinsight/azure/__init__.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/__init__.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/__init__.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_https_endpoint_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_paged.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_properties_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_parameters_extended_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_persisted_script_actions_result_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_list_runtime_script_action_detail_result_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_paged.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/error_response_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/execute_script_action_parameters_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hd_insight_management_client_enums.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/linux_operating_system_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/localized_name_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_paged.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/proxy_resource_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_paged.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_detail_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_execution_summary_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_persisted_get_response_spec_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/tracked_resource_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usage_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/usages_list_result_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability_py3.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_execution_history_operations.py create mode 100644 azure-mgmt-hdinsight/azure/mgmt/hdinsight/version.py create mode 100644 azure-mgmt-hdinsight/azure_bdist_wheel.py create mode 100644 azure-mgmt-hdinsight/sdk_packaging.toml create mode 100644 azure-mgmt-hdinsight/setup.cfg create mode 100644 azure-mgmt-hdinsight/setup.py create mode 100644 azure-mgmt-hdinsight/test/recordings/test_mgmt_hdinsight.test_cluster_create.yaml create mode 100644 azure-mgmt-hdinsight/test/test_mgmt_hdinsight.py 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..e67398f65bb4 --- /dev/null +++ b/azure-mgmt-hdinsight/HISTORY.rst @@ -0,0 +1,9 @@ +.. :changelog: + +Release History +=============== + +0.1.0 (2018-08-08) +++++++++++++++++++ + +* 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..333cb3912ec5 --- /dev/null +++ b/azure-mgmt-hdinsight/README.rst @@ -0,0 +1,49 @@ +Microsoft Azure SDK for Python +============================== + +This is the Microsoft Azure HDInsight Management Client Library. + +Azure Resource Manager (ARM) is the next generation of management APIs that +replace the old Azure Service Management (ASM). + +This package has been tested with Python 2.7, 3.4, 3.5, 3.6 and 3.7. + +For the older Azure Service Management (ASM) libraries, see +`azure-servicemanagement-legacy `__ 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 Management +`__ +on docs.microsoft.com. + + +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..43afe47bc32b --- /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.extension_operations import ExtensionOperations +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 extension: Extension operations + :vartype extension: azure.mgmt.hdinsight.operations.ExtensionOperations + :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 = '2015-03-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.extension = ExtensionOperations( + 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..20db57166905 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -0,0 +1,201 @@ +# 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 .version_spec_py3 import VersionSpec + from .versions_capability_py3 import VersionsCapability + from .regions_capability_py3 import RegionsCapability + from .vm_sizes_capability_py3 import VmSizesCapability + from .vm_size_compatibility_filter_py3 import VmSizeCompatibilityFilter + from .regional_quota_capability_py3 import RegionalQuotaCapability + from .quota_capability_py3 import QuotaCapability + from .capabilities_result_py3 import CapabilitiesResult + 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 .version_spec import VersionSpec + from .versions_capability import VersionsCapability + from .regions_capability import RegionsCapability + from .vm_sizes_capability import VmSizesCapability + from .vm_size_compatibility_filter import VmSizeCompatibilityFilter + from .regional_quota_capability import RegionalQuotaCapability + from .quota_capability import QuotaCapability + from .capabilities_result import CapabilitiesResult + 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', + 'VersionSpec', + 'VersionsCapability', + 'RegionsCapability', + 'VmSizesCapability', + 'VmSizeCompatibilityFilter', + 'RegionalQuotaCapability', + 'QuotaCapability', + 'CapabilitiesResult', + '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/capabilities_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py new file mode 100644 index 000000000000..cbb4cd877acc --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py @@ -0,0 +1,49 @@ +# 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 CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibilty features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibilty filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capabilty features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, **kwargs): + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = kwargs.get('versions', None) + self.regions = kwargs.get('regions', None) + self.vm_sizes = kwargs.get('vm_sizes', None) + self.vm_size_filters = kwargs.get('vm_size_filters', None) + self.features = kwargs.get('features', None) + self.quota = kwargs.get('quota', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result_py3.py new file mode 100644 index 000000000000..e057697f9f3f --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result_py3.py @@ -0,0 +1,49 @@ +# 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 CapabilitiesResult(Model): + """The Get Capabilities operation response. + + :param versions: The version capability. + :type versions: dict[str, ~azure.mgmt.hdinsight.models.VersionsCapability] + :param regions: The virtual machine size compatibilty features. + :type regions: dict[str, ~azure.mgmt.hdinsight.models.RegionsCapability] + :param vm_sizes: The virtual machine sizes. + :type vm_sizes: dict[str, ~azure.mgmt.hdinsight.models.VmSizesCapability] + :param vm_size_filters: The virtual machine size compatibilty filters. + :type vm_size_filters: + list[~azure.mgmt.hdinsight.models.VmSizeCompatibilityFilter] + :param features: The capabilty features. + :type features: list[str] + :param quota: The quota capability. + :type quota: ~azure.mgmt.hdinsight.models.QuotaCapability + """ + + _attribute_map = { + 'versions': {'key': 'versions', 'type': '{VersionsCapability}'}, + 'regions': {'key': 'regions', 'type': '{RegionsCapability}'}, + 'vm_sizes': {'key': 'vmSizes', 'type': '{VmSizesCapability}'}, + 'vm_size_filters': {'key': 'vmSize_filters', 'type': '[VmSizeCompatibilityFilter]'}, + 'features': {'key': 'features', 'type': '[str]'}, + 'quota': {'key': 'quota', 'type': 'QuotaCapability'}, + } + + def __init__(self, *, versions=None, regions=None, vm_sizes=None, vm_size_filters=None, features=None, quota=None, **kwargs) -> None: + super(CapabilitiesResult, self).__init__(**kwargs) + self.versions = versions + self.regions = regions + self.vm_sizes = vm_sizes + self.vm_size_filters = vm_size_filters + self.features = features + self.quota = quota 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_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py new file mode 100644 index 000000000000..49e7fae6b6d5 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.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 QuotaCapability(Model): + """The regional quota capability. + + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, **kwargs): + super(QuotaCapability, self).__init__(**kwargs) + self.regional_quotas = kwargs.get('regional_quotas', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability_py3.py new file mode 100644 index 000000000000..486c9832fd7d --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability_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 QuotaCapability(Model): + """The regional quota capability. + + :param regional_quotas: The list of region quota capabilities. + :type regional_quotas: + list[~azure.mgmt.hdinsight.models.RegionalQuotaCapability] + """ + + _attribute_map = { + 'regional_quotas': {'key': 'regionalQuotas', 'type': '[RegionalQuotaCapability]'}, + } + + def __init__(self, *, regional_quotas=None, **kwargs) -> None: + super(QuotaCapability, self).__init__(**kwargs) + self.regional_quotas = regional_quotas 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/regional_quota_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py new file mode 100644 index 000000000000..4e8819bbfeb0 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.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 RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of courses available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, **kwargs): + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = kwargs.get('region_name', None) + self.cores_used = kwargs.get('cores_used', None) + self.cores_available = kwargs.get('cores_available', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability_py3.py new file mode 100644 index 000000000000..70ce7a01fa75 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability_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 RegionalQuotaCapability(Model): + """The regional quota capacity. + + :param region_name: The region name. + :type region_name: str + :param cores_used: The number of cores used in the region. + :type cores_used: long + :param cores_available: The number of courses available in the region. + :type cores_available: long + """ + + _attribute_map = { + 'region_name': {'key': 'region_name', 'type': 'str'}, + 'cores_used': {'key': 'cores_used', 'type': 'long'}, + 'cores_available': {'key': 'cores_available', 'type': 'long'}, + } + + def __init__(self, *, region_name: str=None, cores_used: int=None, cores_available: int=None, **kwargs) -> None: + super(RegionalQuotaCapability, self).__init__(**kwargs) + self.region_name = region_name + self.cores_used = cores_used + self.cores_available = cores_available diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py new file mode 100644 index 000000000000..d6fa51ff1f94 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.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 RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(RegionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability_py3.py new file mode 100644 index 000000000000..aa424b372b14 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability_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 RegionsCapability(Model): + """The regions capability. + + :param available: The list of region capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(RegionsCapability, self).__init__(**kwargs) + self.available = available 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..d5bde1b626bb --- /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 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..544b49927dde --- /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 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/version_spec.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py new file mode 100644 index 000000000000..d3d95d985f43 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.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 VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, **kwargs): + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = kwargs.get('friendly_name', None) + self.display_name = kwargs.get('display_name', None) + self.is_default = kwargs.get('is_default', None) + self.component_versions = kwargs.get('component_versions', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec_py3.py new file mode 100644 index 000000000000..a993e923a313 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec_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 VersionSpec(Model): + """The version properties. + + :param friendly_name: The friendly name + :type friendly_name: str + :param display_name: The display name + :type display_name: str + :param is_default: Whether or not the version is the default version. + :type is_default: str + :param component_versions: The component version property. + :type component_versions: dict[str, str] + """ + + _attribute_map = { + 'friendly_name': {'key': 'friendlyName', 'type': 'str'}, + 'display_name': {'key': 'displayName', 'type': 'str'}, + 'is_default': {'key': 'isDefault', 'type': 'str'}, + 'component_versions': {'key': 'componentVersions', 'type': '{str}'}, + } + + def __init__(self, *, friendly_name: str=None, display_name: str=None, is_default: str=None, component_versions=None, **kwargs) -> None: + super(VersionSpec, self).__init__(**kwargs) + self.friendly_name = friendly_name + self.display_name = display_name + self.is_default = is_default + self.component_versions = component_versions diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py new file mode 100644 index 000000000000..9b059cd8058f --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.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 VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, **kwargs): + super(VersionsCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability_py3.py new file mode 100644 index 000000000000..869811057316 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability_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 VersionsCapability(Model): + """The version capability. + + :param available: The list of version capabilities. + :type available: list[~azure.mgmt.hdinsight.models.VersionSpec] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[VersionSpec]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VersionsCapability, self).__init__(**kwargs) + self.available = available 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/models/vm_size_compatibility_filter.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter.py new file mode 100644 index 000000000000..de0164b831e6 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter.py @@ -0,0 +1,48 @@ +# 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 VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = kwargs.get('filter_mode', None) + self.regions = kwargs.get('regions', None) + self.cluster_flavors = kwargs.get('cluster_flavors', None) + self.node_types = kwargs.get('node_types', None) + self.cluster_versions = kwargs.get('cluster_versions', None) + self.vmsizes = kwargs.get('vmsizes', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter_py3.py new file mode 100644 index 000000000000..0e1e15cdf30b --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter_py3.py @@ -0,0 +1,48 @@ +# 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 VmSizeCompatibilityFilter(Model): + """The virtual machine type compatibility filter. + + :param filter_mode: The mode for the filter. + :type filter_mode: str + :param regions: The list of regions. + :type regions: list[str] + :param cluster_flavors: The list of cluster types available. + :type cluster_flavors: list[str] + :param node_types: The list of node types. + :type node_types: list[str] + :param cluster_versions: The list of cluster versions. + :type cluster_versions: list[str] + :param vmsizes: The list of virtual machine sizes. + :type vmsizes: list[str] + """ + + _attribute_map = { + 'filter_mode': {'key': 'FilterMode', 'type': 'str'}, + 'regions': {'key': 'Regions', 'type': '[str]'}, + 'cluster_flavors': {'key': 'ClusterFlavors', 'type': '[str]'}, + 'node_types': {'key': 'NodeTypes', 'type': '[str]'}, + 'cluster_versions': {'key': 'ClusterVersions', 'type': '[str]'}, + 'vmsizes': {'key': 'vmsizes', 'type': '[str]'}, + } + + def __init__(self, *, filter_mode: str=None, regions=None, cluster_flavors=None, node_types=None, cluster_versions=None, vmsizes=None, **kwargs) -> None: + super(VmSizeCompatibilityFilter, self).__init__(**kwargs) + self.filter_mode = filter_mode + self.regions = regions + self.cluster_flavors = cluster_flavors + self.node_types = node_types + self.cluster_versions = cluster_versions + self.vmsizes = vmsizes diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py new file mode 100644 index 000000000000..4ea9c0b45ae5 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.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 VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, **kwargs): + super(VmSizesCapability, self).__init__(**kwargs) + self.available = kwargs.get('available', None) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability_py3.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability_py3.py new file mode 100644 index 000000000000..eb83370cbc7c --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability_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 VmSizesCapability(Model): + """The virtual machine sizes capability. + + :param available: The list of virtual machine size capabilities. + :type available: list[str] + """ + + _attribute_map = { + 'available': {'key': 'available', 'type': '[str]'}, + } + + def __init__(self, *, available=None, **kwargs) -> None: + super(VmSizesCapability, self).__init__(**kwargs) + self.available = available 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..4775164d2e41 --- /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 .extension_operations import ExtensionOperations +from .script_actions_operations import ScriptActionsOperations +from .script_execution_history_operations import ScriptExecutionHistoryOperations +from .operations import Operations + +__all__ = [ + 'ClustersOperations', + 'ApplicationsOperations', + 'LocationsOperations', + 'ConfigurationsOperations', + 'ExtensionOperations', + '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..ac32a4c915fb --- /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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-01-preview" + + self.config = config + + def list( + 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.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.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): + """Lists 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..fd2103ccfcbb --- /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: "2015-03-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 = "2015-03-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..c34316103990 --- /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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-01-preview" + + self.config = config + + + def _update_http_settings_initial( + self, resource_group_name, cluster_name, configuration_name, parameters, custom_headers=None, raw=False, **operation_config): + # Construct URL + url = self.update_http_settings.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_http_settings( + self, resource_group_name, cluster_name, configuration_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config): + """Configures the HTTP settings 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_http_settings_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_http_settings.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/extension_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py new file mode 100644 index 000000000000..a9296779ebed --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py @@ -0,0 +1,459 @@ +# 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 ExtensionOperations(object): + """ExtensionOperations 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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-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( + self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, **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: 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` + """ + 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 + 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( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, **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: 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'), + '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 + 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..fddc5bd6cbd8 --- /dev/null +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py @@ -0,0 +1,153 @@ +# 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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-01-preview" + + self.config = config + + def get_capabilities( + self, location, custom_headers=None, raw=False, **operation_config): + """Gets the capabilities for the specified location. + + :param location: The location. + :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: CapabilitiesResult or ClientRawResponse if raw=true + :rtype: ~azure.mgmt.hdinsight.models.CapabilitiesResult or + ~msrest.pipeline.ClientRawResponse + :raises: + :class:`ErrorResponseException` + """ + # Construct URL + url = self.get_capabilities.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('CapabilitiesResult', response) + + if raw: + client_raw_response = ClientRawResponse(deserialized, response) + return client_raw_response + + return deserialized + get_capabilities.metadata = {'url': '/subscriptions/{subscriptionId}/providers/Microsoft.HDInsight/locations/{location}/capabilities'} + + def list_usages( + self, location, custom_headers=None, raw=False, **operation_config): + """Lists the usages for the specified location. + + :param location: The location. + :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..8978d9d1a856 --- /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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-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..23b9d13e4e60 --- /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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-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_persisted_scripts( + 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_persisted_scripts.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_persisted_scripts.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..1deb836e4bbb --- /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: "2015-03-01-preview". + """ + + models = models + + def __init__(self, client, config, serializer, deserializer): + + self._client = client + self._serialize = serializer + self._deserialize = deserializer + self.api_version = "2015-03-01-preview" + + self.config = config + + def list( + 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.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.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..8a81d1b61775 --- /dev/null +++ b/azure-mgmt-hdinsight/azure_bdist_wheel.py @@ -0,0 +1,54 @@ +#------------------------------------------------------------------------- +# 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): + """The purpose of this class is to build wheel a little differently than the sdist, + without requiring to build the wheel from the sdist (i.e. you can build the wheel + directly from source). + """ + + 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/sdk_packaging.toml b/azure-mgmt-hdinsight/sdk_packaging.toml new file mode 100644 index 000000000000..5811cd9b381e --- /dev/null +++ b/azure-mgmt-hdinsight/sdk_packaging.toml @@ -0,0 +1,6 @@ +[packaging] +package_name = "azure-mgmt-hdinsight" +package_pprint_name = "HDInsight Management" +package_doc_id = "" +is_stable = false +is_arm = true 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..feee8754877b --- /dev/null +++ b/azure-mgmt-hdinsight/setup.py @@ -0,0 +1,86 @@ +#!/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 Management" + +# 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.4', + 'Programming Language :: Python :: 3.5', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + ], + zip_safe=False, + packages=find_packages(exclude=["tests"]), + install_requires=[ + 'msrest>=0.5.0', + 'msrestazure>=0.4.32,<2.0.0', + '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()