From f119599612e2314c80737142c0ee41d400392954 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Thu, 15 Feb 2018 13:02:36 -0800 Subject: [PATCH] Generated from c1231602ae9bd6efbc9247e7d4dd456befc6cd93 (#1987) HDInsight Python conf --- .../hdinsight/hd_insight_management_client.py | 2 +- .../models/application_get_endpoint.py | 1 + .../models/application_get_https_endpoint.py | 1 + .../models/application_get_properties.py | 1 + .../hdinsight/models/capabilities_result.py | 1 + .../cluster_create_parameters_extended.py | 1 + .../models/cluster_create_properties.py | 1 + .../hdinsight/models/cluster_definition.py | 1 + .../models/cluster_get_properties.py | 1 + ...er_list_persisted_script_actions_result.py | 1 + ...ist_runtime_script_action_detail_result.py | 1 + .../models/cluster_monitoring_request.py | 1 + .../models/cluster_monitoring_response.py | 1 + .../models/cluster_patch_parameters.py | 1 + .../models/cluster_resize_parameters.py | 1 + .../mgmt/hdinsight/models/compute_profile.py | 1 + .../hdinsight/models/connectivity_endpoint.py | 1 + .../hdinsight/models/data_disks_groups.py | 1 + .../azure/mgmt/hdinsight/models/errors.py | 1 + .../execute_script_action_parameters.py | 1 + .../azure/mgmt/hdinsight/models/extension.py | 1 + .../mgmt/hdinsight/models/hardware_profile.py | 1 + .../models/http_connectivity_settings.py | 1 + .../models/linux_operating_system_profile.py | 1 + .../azure/mgmt/hdinsight/models/operation.py | 1 + .../hdinsight/models/operation_display.py | 1 + .../hdinsight/models/operation_resource.py | 1 + .../azure/mgmt/hdinsight/models/os_profile.py | 1 + .../mgmt/hdinsight/models/quota_capability.py | 1 + .../azure/mgmt/hdinsight/models/quota_info.py | 1 + .../models/regional_quota_capability.py | 1 + .../hdinsight/models/regions_capability.py | 1 + .../azure/mgmt/hdinsight/models/resource.py | 1 + .../azure/mgmt/hdinsight/models/role.py | 1 + .../hdinsight/models/runtime_script_action.py | 1 + .../mgmt/hdinsight/models/script_action.py | 1 + .../models/script_action_execution_summary.py | 1 + ...ript_action_persisted_get_response_spec.py | 1 + .../mgmt/hdinsight/models/security_profile.py | 1 + .../mgmt/hdinsight/models/ssh_profile.py | 1 + .../mgmt/hdinsight/models/ssh_public_key.py | 1 + .../mgmt/hdinsight/models/storage_account.py | 1 + .../mgmt/hdinsight/models/storage_profile.py | 1 + .../mgmt/hdinsight/models/version_spec.py | 1 + .../hdinsight/models/versions_capability.py | 1 + .../models/virtual_network_profile.py | 1 + .../models/vm_size_compatibility_filter.py | 1 + .../hdinsight/models/vm_sizes_capability.py | 1 + .../operations/applications_operations.py | 81 ++-- .../operations/clusters_operations.py | 345 +++++++++++------- .../operations/configurations_operations.py | 86 +++-- .../operations/extension_operations.py | 171 +++++---- .../operations/location_operations.py | 6 +- .../mgmt/hdinsight/operations/operations.py | 6 +- .../operations/script_actions_operations.py | 10 +- .../script_execution_history_operations.py | 8 +- 56 files changed, 508 insertions(+), 254 deletions(-) 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 index f6318123171e..9d7680ceef1d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/hd_insight_management_client.py @@ -51,7 +51,7 @@ def __init__( super(HDInsightManagementClientConfiguration, self).__init__(base_url) - self.add_user_agent('hdinsightmanagementclient/{}'.format(VERSION)) + self.add_user_agent('azure-mgmt-hdinsight/{}'.format(VERSION)) self.add_user_agent('Azure-SDK-For-Python') self.credentials = credentials 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 index b6234220934d..ccadfada0fd9 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_endpoint.py @@ -30,6 +30,7 @@ class ApplicationGetEndpoint(Model): } def __init__(self, location=None, destination_port=None, public_port=None): + super(ApplicationGetEndpoint, self).__init__() 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 index 94651027838c..1bba53c0f5e8 100644 --- 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 @@ -37,6 +37,7 @@ class ApplicationGetHttpsEndpoint(Model): } def __init__(self, additional_properties=None, access_modes=None, location=None, destination_port=None, public_port=None): + super(ApplicationGetHttpsEndpoint, self).__init__() self.additional_properties = additional_properties self.access_modes = access_modes self.location = location diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_properties.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_properties.py index 3f887e7015f0..4ba56aeeb2db 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_properties.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/application_get_properties.py @@ -71,6 +71,7 @@ class ApplicationGetProperties(Model): } def __init__(self, compute_profile=None, install_script_actions=None, uninstall_script_actions=None, https_endpoints=None, ssh_endpoints=None, application_type=None, errors=None, additional_properties=None): + super(ApplicationGetProperties, self).__init__() self.compute_profile = compute_profile self.install_script_actions = install_script_actions self.uninstall_script_actions = uninstall_script_actions diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py index aae0707acf2a..8a7a29cad272 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py @@ -40,6 +40,7 @@ class CapabilitiesResult(Model): } def __init__(self, versions=None, regions=None, vm_sizes=None, vm_size_filters=None, features=None, quota=None): + super(CapabilitiesResult, self).__init__() self.versions = versions self.regions = regions self.vm_sizes = vm_sizes 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 index d54f13b90713..7927aac2f513 100644 --- 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 @@ -30,6 +30,7 @@ class ClusterCreateParametersExtended(Model): } def __init__(self, location=None, tags=None, properties=None): + super(ClusterCreateParametersExtended, self).__init__() 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 index 45822185244c..b78c2ff3c72a 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_create_properties.py @@ -44,6 +44,7 @@ class ClusterCreateProperties(Model): } def __init__(self, cluster_version=None, os_type=None, tier=None, cluster_definition=None, security_profile=None, compute_profile=None, storage_profile=None): + super(ClusterCreateProperties, self).__init__() self.cluster_version = cluster_version self.os_type = os_type self.tier = tier diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py index 6f6d7f118396..98e79926a591 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_definition.py @@ -34,6 +34,7 @@ class ClusterDefinition(Model): } def __init__(self, blueprint=None, kind=None, component_version=None, configurations=None): + super(ClusterDefinition, self).__init__() self.blueprint = blueprint self.kind = kind self.component_version = component_version 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 index e6c6beda023c..5242ab2e8368 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_get_properties.py @@ -67,6 +67,7 @@ class ClusterGetProperties(Model): } def __init__(self, cluster_definition, cluster_version=None, os_type=None, tier=None, security_profile=None, compute_profile=None, provisioning_state=None, created_date=None, cluster_state=None, quota_info=None, errors=None, connectivity_endpoints=None): + super(ClusterGetProperties, self).__init__() self.cluster_version = cluster_version self.os_type = os_type self.tier = tier 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 index 3e5946f2fc61..7d903592e729 100644 --- 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 @@ -34,5 +34,6 @@ class ClusterListPersistedScriptActionsResult(Model): } def __init__(self, value=None): + super(ClusterListPersistedScriptActionsResult, self).__init__() 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 index 610fcc0ccc5b..bc2d276ceba0 100644 --- 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 @@ -36,5 +36,6 @@ class ClusterListRuntimeScriptActionDetailResult(Model): } def __init__(self): + super(ClusterListRuntimeScriptActionDetailResult, self).__init__() 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 index 42977c6c4d1a..a098cf444d9f 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_request.py @@ -27,5 +27,6 @@ class ClusterMonitoringRequest(Model): } def __init__(self, workspace_id=None, primary_key=None): + super(ClusterMonitoringRequest, self).__init__() 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 index 0fe85a202298..bbb45491a96b 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_monitoring_response.py @@ -29,5 +29,6 @@ class ClusterMonitoringResponse(Model): } def __init__(self, cluster_monitoring_enabled=None, workspace_id=None): + super(ClusterMonitoringResponse, self).__init__() self.cluster_monitoring_enabled = cluster_monitoring_enabled self.workspace_id = workspace_id 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 index e46d7e15bf8e..47f605463e36 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_patch_parameters.py @@ -24,4 +24,5 @@ class ClusterPatchParameters(Model): } def __init__(self, tags=None): + super(ClusterPatchParameters, self).__init__() self.tags = tags 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 index 382a533a341f..1e2d2fd6b694 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/cluster_resize_parameters.py @@ -24,4 +24,5 @@ class ClusterResizeParameters(Model): } def __init__(self, target_instance_count=None): + super(ClusterResizeParameters, self).__init__() 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 index b8fa6863ed8f..af0d6e401b39 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/compute_profile.py @@ -24,4 +24,5 @@ class ComputeProfile(Model): } def __init__(self, roles=None): + super(ComputeProfile, self).__init__() 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 index fb8d813b9bce..27af32fa916d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/connectivity_endpoint.py @@ -33,6 +33,7 @@ class ConnectivityEndpoint(Model): } def __init__(self, name=None, protocol=None, location=None, port=None): + super(ConnectivityEndpoint, self).__init__() self.name = name self.protocol = protocol self.location = location 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 index 5494fcd9449c..457f47a13f27 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/data_disks_groups.py @@ -39,6 +39,7 @@ class DataDisksGroups(Model): } def __init__(self, disks_per_node=None): + super(DataDisksGroups, self).__init__() 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/errors.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py index 0622a6dadc42..c412ade0d8ee 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/errors.py @@ -27,5 +27,6 @@ class Errors(Model): } def __init__(self, code=None, message=None): + super(Errors, self).__init__() 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 index 2afb0dcdbc8f..4dcd2a45c89b 100644 --- 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 @@ -33,5 +33,6 @@ class ExecuteScriptActionParameters(Model): } def __init__(self, persist_on_success, script_actions=None): + super(ExecuteScriptActionParameters, self).__init__() 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 index 442453107187..7ec50e9e9757 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/extension.py @@ -28,5 +28,6 @@ class Extension(Model): } def __init__(self, workspace_id=None, primary_key=None): + super(Extension, self).__init__() 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 index 38c46c6bb00b..32a2f4317e2d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/hardware_profile.py @@ -24,4 +24,5 @@ class HardwareProfile(Model): } def __init__(self, vm_size=None): + super(HardwareProfile, self).__init__() self.vm_size = vm_size diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/http_connectivity_settings.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/http_connectivity_settings.py index 594332aa6d3d..46bb11c0ff41 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/http_connectivity_settings.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/http_connectivity_settings.py @@ -31,6 +31,7 @@ class HttpConnectivitySettings(Model): } def __init__(self, enabled_credential=None, username=None, password=None): + super(HttpConnectivitySettings, self).__init__() self.enabled_credential = enabled_credential self.username = username self.password = password 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 index dd382247f560..1004c31d765d 100644 --- 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 @@ -30,6 +30,7 @@ class LinuxOperatingSystemProfile(Model): } def __init__(self, username=None, password=None, ssh_profile=None): + super(LinuxOperatingSystemProfile, self).__init__() self.username = username self.password = password self.ssh_profile = ssh_profile diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py index d07662b30d8a..5de1fbc492d4 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation.py @@ -27,5 +27,6 @@ class Operation(Model): } def __init__(self, name=None, display=None): + super(Operation, self).__init__() self.name = name self.display = display diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py index c9ab849ae97d..c87511b9dbca 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_display.py @@ -31,6 +31,7 @@ class OperationDisplay(Model): } def __init__(self, provider=None, resource=None, operation=None): + super(OperationDisplay, self).__init__() self.provider = provider self.resource = resource self.operation = operation diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py index 998d6ed22472..01abdc92b31f 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/operation_resource.py @@ -28,5 +28,6 @@ class OperationResource(Model): } def __init__(self, status=None, error=None): + super(OperationResource, self).__init__() 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 index 897105bd7e3b..2799b6fe6d74 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/os_profile.py @@ -25,4 +25,5 @@ class OsProfile(Model): } def __init__(self, linux_operating_system_profile=None): + super(OsProfile, self).__init__() self.linux_operating_system_profile = linux_operating_system_profile diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py index 09410cffe171..ed841269770b 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py @@ -25,4 +25,5 @@ class QuotaCapability(Model): } def __init__(self, regional_quotas=None): + super(QuotaCapability, self).__init__() 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 index 48035933fe5e..8faa03f5e181 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_info.py @@ -24,4 +24,5 @@ class QuotaInfo(Model): } def __init__(self, cores_used=None): + super(QuotaInfo, self).__init__() 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 index d67c2ea487d8..613390293da9 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py @@ -30,6 +30,7 @@ class RegionalQuotaCapability(Model): } def __init__(self, region_name=None, cores_used=None, cores_available=None): + super(RegionalQuotaCapability, self).__init__() 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 index 7cc5cf60645d..8ab571bf6e2c 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py @@ -24,4 +24,5 @@ class RegionsCapability(Model): } def __init__(self, available=None): + super(RegionsCapability, self).__init__() 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 index c65b3fb52345..13fc953251a6 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/resource.py @@ -39,6 +39,7 @@ class Resource(Model): } def __init__(self): + super(Resource, self).__init__() 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 index 07240c1802a5..eb257f6bd546 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/role.py @@ -47,6 +47,7 @@ class Role(Model): } def __init__(self, name=None, min_instance_count=None, target_instance_count=None, hardware_profile=None, os_profile=None, virtual_network_profile=None, data_disks_groups=None, script_actions=None): + super(Role, self).__init__() self.name = name self.min_instance_count = min_instance_count self.target_instance_count = target_instance_count 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 index 29e97f93f23d..d34d3ea5d6c9 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/runtime_script_action.py @@ -46,6 +46,7 @@ class RuntimeScriptAction(Model): } def __init__(self, name, uri, roles, parameters=None): + super(RuntimeScriptAction, self).__init__() self.name = name self.uri = uri self.parameters = parameters diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py index d4d3ff233771..557fabea8b7e 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/script_action.py @@ -36,6 +36,7 @@ class ScriptAction(Model): } def __init__(self, name, uri, parameters): + super(ScriptAction, self).__init__() self.name = name self.uri = uri self.parameters = parameters 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 index f59a2b6dd13b..837e49d6e97a 100644 --- 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 @@ -36,5 +36,6 @@ class ScriptActionExecutionSummary(Model): } def __init__(self): + super(ScriptActionExecutionSummary, self).__init__() 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 index d40ec14be824..2e55724b312b 100644 --- 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 @@ -36,6 +36,7 @@ class ScriptActionPersistedGetResponseSpec(Model): } def __init__(self, name=None, uri=None, parameters=None, roles=None, application_name=None): + super(ScriptActionPersistedGetResponseSpec, self).__init__() 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 index 64f8f31500a5..443c7b9fbc08 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py @@ -48,6 +48,7 @@ class SecurityProfile(Model): } def __init__(self, directory_type=None, domain=None, organizational_unit_dn=None, ldaps_urls=None, domain_username=None, domain_user_password=None, cluster_users_group_dns=None): + super(SecurityProfile, self).__init__() self.directory_type = directory_type self.domain = domain self.organizational_unit_dn = organizational_unit_dn diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py index ab78184f5235..263d11030d86 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_profile.py @@ -24,4 +24,5 @@ class SshProfile(Model): } def __init__(self, public_keys=None): + super(SshProfile, self).__init__() 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 index 203c42e1b2a1..a6324bca3921 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/ssh_public_key.py @@ -24,4 +24,5 @@ class SshPublicKey(Model): } def __init__(self, certificate_data=None): + super(SshPublicKey, self).__init__() 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 index c9e0a44e7404..8e8f2a576930 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py @@ -34,6 +34,7 @@ class StorageAccount(Model): } def __init__(self, name=None, is_default=None, container=None, key=None): + super(StorageAccount, self).__init__() self.name = name self.is_default = is_default self.container = container diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py index 6a536360fa9d..fd6f60df65cc 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_profile.py @@ -24,4 +24,5 @@ class StorageProfile(Model): } def __init__(self, storageaccounts=None): + super(StorageProfile, self).__init__() self.storageaccounts = storageaccounts diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py index f2de9f9f00d8..dcb001e8af4d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py @@ -33,6 +33,7 @@ class VersionSpec(Model): } def __init__(self, friendly_name=None, display_name=None, is_default=None, component_versions=None): + super(VersionSpec, self).__init__() self.friendly_name = friendly_name self.display_name = display_name self.is_default = is_default diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py index 26ce741b9b4f..1045c9985223 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py @@ -24,4 +24,5 @@ class VersionsCapability(Model): } def __init__(self, available=None): + super(VersionsCapability, self).__init__() 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 index 4bebaa7021b9..8579f6f0565d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/virtual_network_profile.py @@ -27,5 +27,6 @@ class VirtualNetworkProfile(Model): } def __init__(self, id=None, subnet=None): + super(VirtualNetworkProfile, self).__init__() 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 index 92ae660696ef..c45a95fb69a9 100644 --- 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 @@ -39,6 +39,7 @@ class VmSizeCompatibilityFilter(Model): } def __init__(self, filter_mode=None, regions=None, cluster_flavors=None, node_types=None, cluster_versions=None, vmsizes=None): + super(VmSizeCompatibilityFilter, self).__init__() self.filter_mode = filter_mode self.regions = regions self.cluster_flavors = cluster_flavors 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 index 22304381a79c..59b19c7d76b0 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py @@ -24,4 +24,5 @@ class VmSizesCapability(Model): } def __init__(self, available=None): + super(VmSizesCapability, self).__init__() self.available = available diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py index 128e84bbc80e..098140876bb9 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,11 +24,13 @@ class ApplicationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The HDInsight client API Version. Constant value: "2015-03-01-preview". :ivar application_name: The constant value for the application name. Constant value: "hue". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -89,7 +92,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -154,7 +157,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -223,7 +226,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -241,23 +244,9 @@ def create( return deserialized - def delete( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **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 dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications/{applicationName}' path_format_arguments = { @@ -283,18 +272,58 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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 dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -307,10 +336,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py index d58bb2a458a3..a00caca4f10b 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,11 +24,13 @@ class ClustersOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -38,27 +41,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def create( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns Cluster or - ClientRawResponse if raw=true - :rtype: - ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hdinsight.models.Cluster] - or ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _create_initial( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}' path_format_arguments = { @@ -86,19 +71,71 @@ def create( body_content = self._serialize.body(parameters, 'ClusterCreateParametersExtended') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns Cluster or + ClientRawResponse if raw=true + :rtype: + ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.hdinsight.models.Cluster] + or ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -107,10 +144,7 @@ def get_long_running_output(response): exp.request_id = response.headers.get('x-ms-request-id') raise exp - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('Cluster', response) + deserialized = self._deserialize('Cluster', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) @@ -118,10 +152,6 @@ def get_long_running_output(response): return deserialized - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -180,7 +210,7 @@ def update( # Construct and send request request = self._client.patch(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -198,23 +228,9 @@ def update( return deserialized - def delete( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _delete_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}' path_format_arguments = { @@ -239,22 +255,62 @@ def delete( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) + + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - if response.status_code not in [202, 200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -263,10 +319,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -317,7 +369,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -383,7 +435,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -402,26 +454,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def resize( - self, resource_group_name, cluster_name, target_instance_count=None, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + 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 @@ -452,19 +487,63 @@ def resize( body_content = self._serialize.body(parameters, 'ClusterResizeParameters') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -477,10 +556,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -533,7 +608,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -552,29 +627,9 @@ def internal_paging(next_link=None, raw=False): return deserialized - def execute_script_actions( - self, resource_group_name, cluster_name, persist_on_success, script_actions=None, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + 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 @@ -604,23 +659,71 @@ def execute_script_actions( body_content = self._serialize.body(parameters, 'ExecuteScriptActionParameters') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): - if response.status_code not in [202, 200]: + if response.status_code not in [200, 202]: exp = CloudError(response) exp.request_id = response.headers.get('x-ms-request-id') raise exp @@ -629,10 +732,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py index ab0969a53d08..871826b124a2 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,11 +24,13 @@ class ConfigurationsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar configuration_name: The constant for configuration type of gateway. Constant value: "gateway". :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 @@ -38,26 +41,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def update_http_settings( - self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **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 parameters: The name of the resource group. - :type parameters: - ~azure.mgmt.hdinsight.models.HttpConnectivitySettings - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _update_http_settings_initial( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}' path_format_arguments = { @@ -86,19 +72,63 @@ def update_http_settings( body_content = self._serialize.body(parameters, 'HttpConnectivitySettings') # Construct and send request - def long_running_send(): + request = self._client.post(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.post(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [200, 202, 204]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + def update_http_settings( + self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, **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 parameters: The name of the resource group. + :type parameters: + ~azure.mgmt.hdinsight.models.HttpConnectivitySettings + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._update_http_settings_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + parameters=parameters, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -111,10 +141,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -168,7 +194,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py index a708f75ab4a9..cae633fcb1db 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py @@ -12,6 +12,7 @@ import uuid from msrest.pipeline import ClientRawResponse from msrestazure.azure_exceptions import CloudError +from msrest.exceptions import DeserializationError from msrestazure.azure_operation import AzureOperationPoller from .. import models @@ -23,11 +24,13 @@ class ExtensionOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :param deserializer: An object model deserializer. :ivar api_version: The HDInsight client API Version. Constant value: "2015-03-01-preview". :ivar extension_name: The name of the cluster extension. Constant value: "clustermonitoring". """ + models = models + def __init__(self, client, config, serializer, deserializer): self._client = client @@ -38,29 +41,9 @@ def __init__(self, client, config, serializer, deserializer): self.config = config - def enable_monitoring( - self, resource_group_name, cluster_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + 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 @@ -90,19 +73,67 @@ def enable_monitoring( body_content = self._serialize.body(parameters, 'ClusterMonitoringRequest') # Construct and send request - def long_running_send(): + request = self._client.put(url, query_parameters) + response = self._client.send( + request, header_parameters, body_content, stream=False, **operation_config) - request = self._client.put(url, query_parameters) - return self._client.send( - request, header_parameters, body_content, **operation_config) + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + 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 + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -115,10 +146,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -170,7 +197,7 @@ def get_monitoring_status( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -188,24 +215,9 @@ def get_monitoring_status( return deserialized - def disable_monitoring( - self, resource_group_name, cluster_name, custom_headers=None, raw=False, **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: returns the direct response alongside the - deserialized response - :return: An instance of AzureOperationPoller that returns None or - ClientRawResponse if raw=true - :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or - ~msrest.pipeline.ClientRawResponse - :raises: :class:`CloudError` - """ + def _disable_monitoring_initial( + self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/clustermonitoring' path_format_arguments = { @@ -230,18 +242,59 @@ def disable_monitoring( header_parameters['accept-language'] = self._serialize.header("self.config.accept_language", self.config.accept_language, 'str') # Construct and send request - def long_running_send(): + request = self._client.delete(url, query_parameters) + response = self._client.send(request, header_parameters, stream=False, **operation_config) - request = self._client.delete(url, query_parameters) - return self._client.send(request, header_parameters, **operation_config) + if response.status_code not in [202]: + exp = CloudError(response) + exp.request_id = response.headers.get('x-ms-request-id') + raise exp + + 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, **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: returns the direct response alongside the + deserialized response + :return: An instance of AzureOperationPoller that returns None or + ClientRawResponse if raw=true + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrest.pipeline.ClientRawResponse + :raises: :class:`CloudError` + """ + raw_result = self._disable_monitoring_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + if raw: + return raw_result + + # Construct and send request + def long_running_send(): + return raw_result.response def get_long_running_status(status_link, headers=None): request = self._client.get(status_link) if headers: request.headers.update(headers) + header_parameters = {} + header_parameters['x-ms-client-request-id'] = raw_result.response.request.headers['x-ms-client-request-id'] return self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) def get_long_running_output(response): @@ -254,10 +307,6 @@ def get_long_running_output(response): client_raw_response = ClientRawResponse(None, response) return client_raw_response - if raw: - response = long_running_send() - return get_long_running_output(response) - long_running_operation_timeout = operation_config.get( 'long_running_operation_timeout', self.config.long_running_operation_timeout) @@ -320,7 +369,7 @@ def create( # Construct and send request request = self._client.put(url, query_parameters) response = self._client.send( - request, header_parameters, body_content, **operation_config) + request, header_parameters, body_content, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) @@ -376,7 +425,7 @@ def get( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -437,7 +486,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [202]: exp = CloudError(response) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/location_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/location_operations.py index 22d2e192533a..80d95f6241d6 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/location_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/location_operations.py @@ -22,10 +22,12 @@ class LocationOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -75,7 +77,7 @@ def get_capabilities( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py index b699df3adf5a..f6859bcb063d 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py @@ -22,10 +22,12 @@ class Operations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -76,7 +78,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 index 89a6e248e2c3..213cae13f5f1 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/script_actions_operations.py @@ -22,10 +22,12 @@ class ScriptActionsOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -80,7 +82,7 @@ def delete( # Construct and send request request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -142,7 +144,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -207,7 +209,7 @@ def get_execution_detail( # Construct and send request request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) 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 index e679bdc1a158..a88ebf7e2ac3 100644 --- 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 @@ -22,10 +22,12 @@ class ScriptExecutionHistoryOperations(object): :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. - :param deserializer: An objec model deserializer. + :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 @@ -86,7 +88,7 @@ def internal_paging(next_link=None, raw=False): # Construct and send request request = self._client.get(url, query_parameters) response = self._client.send( - request, header_parameters, **operation_config) + request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response) @@ -150,7 +152,7 @@ def promote( # Construct and send request request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, **operation_config) + response = self._client.send(request, header_parameters, stream=False, **operation_config) if response.status_code not in [200]: exp = CloudError(response)