diff --git a/azure-mgmt-hdinsight/MANIFEST.in b/azure-mgmt-hdinsight/MANIFEST.in index 9ecaeb15de50..bb37a2723dae 100644 --- a/azure-mgmt-hdinsight/MANIFEST.in +++ b/azure-mgmt-hdinsight/MANIFEST.in @@ -1,2 +1 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file diff --git a/azure-mgmt-hdinsight/azure/__init__.py b/azure-mgmt-hdinsight/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-hdinsight/azure/__init__.py +++ b/azure-mgmt-hdinsight/azure/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file diff --git a/azure-mgmt-hdinsight/azure/mgmt/__init__.py b/azure-mgmt-hdinsight/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/__init__.py +++ b/azure-mgmt-hdinsight/azure/mgmt/__init__.py @@ -1 +1 @@ -__import__('pkg_resources').declare_namespace(__name__) +__path__ = __import__('pkgutil').extend_path(__path__, __name__) \ No newline at end of file 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 43afe47bc32b..817668024088 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 @@ -17,7 +17,7 @@ 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.extensions_operations import ExtensionsOperations from .operations.script_actions_operations import ScriptActionsOperations from .operations.script_execution_history_operations import ScriptExecutionHistoryOperations from .operations.operations import Operations @@ -72,8 +72,8 @@ class HDInsightManagementClient(SDKClient): :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 extensions: Extensions operations + :vartype extensions: azure.mgmt.hdinsight.operations.ExtensionsOperations :ivar script_actions: ScriptActions operations :vartype script_actions: azure.mgmt.hdinsight.operations.ScriptActionsOperations :ivar script_execution_history: ScriptExecutionHistory operations @@ -98,7 +98,7 @@ def __init__( 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.api_version = '2018-06-01-preview' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -110,7 +110,7 @@ def __init__( self._client, self.config, self._serialize, self._deserialize) self.configurations = ConfigurationsOperations( self._client, self.config, self._serialize, self._deserialize) - self.extension = ExtensionOperations( + self.extensions = ExtensionsOperations( self._client, self.config, self._serialize, self._deserialize) self.script_actions = ScriptActionsOperations( 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 index 20db57166905..5cf5b297b638 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/__init__.py @@ -48,14 +48,6 @@ 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 @@ -104,14 +96,6 @@ 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 @@ -172,14 +156,6 @@ 'ApplicationGetEndpoint', 'ApplicationProperties', 'Application', - 'VersionSpec', - 'VersionsCapability', - 'RegionsCapability', - 'VmSizesCapability', - 'VmSizeCompatibilityFilter', - 'RegionalQuotaCapability', - 'QuotaCapability', - 'CapabilitiesResult', 'LocalizedName', 'Usage', 'UsagesListResult', diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py deleted file mode 100644 index cbb4cd877acc..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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 deleted file mode 100644 index e057697f9f3f..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/capabilities_result_py3.py +++ /dev/null @@ -1,49 +0,0 @@ -# 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/quota_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py deleted file mode 100644 index 49e7fae6b6d5..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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 deleted file mode 100644 index 486c9832fd7d..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/quota_capability_py3.py +++ /dev/null @@ -1,29 +0,0 @@ -# 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/regional_quota_capability.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py deleted file mode 100644 index 4e8819bbfeb0..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 deleted file mode 100644 index 70ce7a01fa75..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regional_quota_capability_py3.py +++ /dev/null @@ -1,36 +0,0 @@ -# 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 deleted file mode 100644 index d6fa51ff1f94..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 deleted file mode 100644 index aa424b372b14..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/regions_capability_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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/security_profile.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py index 8b75c890167d..ecb3c04b3289 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile.py @@ -35,6 +35,12 @@ class SecurityProfile(Model): :param cluster_users_group_dns: Optional. The Distinguished Names for cluster user groups :type cluster_users_group_dns: list[str] + :param aadds_resource_id: The resource ID of the user's Azure Active + Directory Domain Service. + :type aadds_resource_id: str + :param msi_resource_id: User assigned identity that has permissions to + read and create cluster-related artifacts in the user's AADDS. + :type msi_resource_id: str """ _attribute_map = { @@ -45,6 +51,8 @@ class SecurityProfile(Model): 'domain_username': {'key': 'domainUsername', 'type': 'str'}, 'domain_user_password': {'key': 'domainUserPassword', 'type': 'str'}, 'cluster_users_group_dns': {'key': 'clusterUsersGroupDNs', 'type': '[str]'}, + 'aadds_resource_id': {'key': 'aaddsResourceId', 'type': 'str'}, + 'msi_resource_id': {'key': 'msiResourceId', 'type': 'str'}, } def __init__(self, **kwargs): @@ -56,3 +64,5 @@ def __init__(self, **kwargs): 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) + self.aadds_resource_id = kwargs.get('aadds_resource_id', None) + self.msi_resource_id = kwargs.get('msi_resource_id', 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 index 08abec9760cb..44a2ad7904af 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/security_profile_py3.py @@ -35,6 +35,12 @@ class SecurityProfile(Model): :param cluster_users_group_dns: Optional. The Distinguished Names for cluster user groups :type cluster_users_group_dns: list[str] + :param aadds_resource_id: The resource ID of the user's Azure Active + Directory Domain Service. + :type aadds_resource_id: str + :param msi_resource_id: User assigned identity that has permissions to + read and create cluster-related artifacts in the user's AADDS. + :type msi_resource_id: str """ _attribute_map = { @@ -45,9 +51,11 @@ class SecurityProfile(Model): 'domain_username': {'key': 'domainUsername', 'type': 'str'}, 'domain_user_password': {'key': 'domainUserPassword', 'type': 'str'}, 'cluster_users_group_dns': {'key': 'clusterUsersGroupDNs', 'type': '[str]'}, + 'aadds_resource_id': {'key': 'aaddsResourceId', 'type': 'str'}, + 'msi_resource_id': {'key': 'msiResourceId', '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: + 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, aadds_resource_id: str=None, msi_resource_id: str=None, **kwargs) -> None: super(SecurityProfile, self).__init__(**kwargs) self.directory_type = directory_type self.domain = domain @@ -56,3 +64,5 @@ def __init__(self, *, directory_type=None, domain: str=None, organizational_unit self.domain_username = domain_username self.domain_user_password = domain_user_password self.cluster_users_group_dns = cluster_users_group_dns + self.aadds_resource_id = aadds_resource_id + self.msi_resource_id = msi_resource_id 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 d5bde1b626bb..c65f5dc49529 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account.py @@ -24,7 +24,7 @@ class StorageAccount(Model): specified for WASB storage accounts. :type container: str :param file_system: The filesystem, only to be specified for Azure Data - Lake Storage Gen 2. + Lake Storage type Gen 2. :type file_system: str :param key: The storage account access key. :type key: str 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 index 544b49927dde..41f9ea602657 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/storage_account_py3.py @@ -24,7 +24,7 @@ class StorageAccount(Model): specified for WASB storage accounts. :type container: str :param file_system: The filesystem, only to be specified for Azure Data - Lake Storage Gen 2. + Lake Storage type Gen 2. :type file_system: str :param key: The storage account access key. :type key: str diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py deleted file mode 100644 index d3d95d985f43..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index a993e923a313..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/version_spec_py3.py +++ /dev/null @@ -1,40 +0,0 @@ -# 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 deleted file mode 100644 index 9b059cd8058f..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 deleted file mode 100644 index 869811057316..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/versions_capability_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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/vm_size_compatibility_filter.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter.py deleted file mode 100644 index de0164b831e6..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 deleted file mode 100644 index 0e1e15cdf30b..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_size_compatibility_filter_py3.py +++ /dev/null @@ -1,48 +0,0 @@ -# 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 deleted file mode 100644 index 4ea9c0b45ae5..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 deleted file mode 100644 index eb83370cbc7c..000000000000 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/models/vm_sizes_capability_py3.py +++ /dev/null @@ -1,28 +0,0 @@ -# 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 index 4775164d2e41..bb15f585c444 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/__init__.py @@ -13,7 +13,7 @@ from .applications_operations import ApplicationsOperations from .locations_operations import LocationsOperations from .configurations_operations import ConfigurationsOperations -from .extension_operations import ExtensionOperations +from .extensions_operations import ExtensionsOperations from .script_actions_operations import ScriptActionsOperations from .script_execution_history_operations import ScriptExecutionHistoryOperations from .operations import Operations @@ -23,7 +23,7 @@ 'ApplicationsOperations', 'LocationsOperations', 'ConfigurationsOperations', - 'ExtensionOperations', + 'ExtensionsOperations', 'ScriptActionsOperations', 'ScriptExecutionHistoryOperations', 'Operations', diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py index ac32a4c915fb..72a5618c5fba 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/applications_operations.py @@ -24,7 +24,7 @@ class ApplicationsOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -34,11 +34,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( + def list_by_cluster( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): """Lists all of the applications for the HDInsight cluster. @@ -61,7 +61,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_cluster.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -105,11 +105,11 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications'} + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/applications'} def get( self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, **operation_config): - """Lists properties of the specified application. + """Gets properties of the specified application. :param resource_group_name: The name of the resource group. :type resource_group_name: str 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 fd2103ccfcbb..fddb64f9c5c2 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/clusters_operations.py @@ -24,7 +24,7 @@ class ClustersOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". :ivar role_name: The constant value for the roleName. Constant value: "workernode". """ @@ -35,7 +35,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.role_name = "workernode" self.config = config 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 c34316103990..c0b9a95c02f9 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/configurations_operations.py @@ -24,7 +24,7 @@ class ConfigurationsOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -34,15 +34,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def _update_http_settings_initial( + def _update_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'] + 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'), @@ -79,9 +79,9 @@ def _update_http_settings_initial( client_raw_response = ClientRawResponse(None, response) return client_raw_response - def update_http_settings( + def update( 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. + """Configures the configuration on the specified cluster. :param resource_group_name: The name of the resource group. :type resource_group_name: str @@ -103,7 +103,7 @@ def update_http_settings( :raises: :class:`ErrorResponseException` """ - raw_result = self._update_http_settings_initial( + raw_result = self._update_initial( resource_group_name=resource_group_name, cluster_name=cluster_name, configuration_name=configuration_name, @@ -125,7 +125,7 @@ def get_long_running_output(response): 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}'} + update.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/configurations/{configurationName}'} def get( self, resource_group_name, cluster_name, configuration_name, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py similarity index 86% rename from azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py rename to azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py index a9296779ebed..b7c857f73ac3 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extension_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/extensions_operations.py @@ -17,14 +17,14 @@ from .. import models -class ExtensionOperations(object): - """ExtensionOperations operations. +class ExtensionsOperations(object): + """ExtensionsOperations operations. :param client: Client for service requests. :param config: Configuration of service client. :param serializer: An object model serializer. :param deserializer: An object model deserializer. - :ivar api_version: The HDInsight client API Version. Constant value: "2015-03-01-preview". + :ivar api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -34,7 +34,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config @@ -271,32 +271,9 @@ def get_long_running_output(response): 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` - """ + def _create_initial( + self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, **operation_config): parameters = models.Extension(workspace_id=workspace_id, primary_key=primary_key) # Construct URL @@ -336,6 +313,58 @@ def create( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def create( + self, resource_group_name, cluster_name, extension_name, workspace_id=None, primary_key=None, custom_headers=None, raw=False, polling=True, **operation_config): + """Creates an HDInsight cluster extension. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param extension_name: The name of the cluster extension. + :type extension_name: str + :param workspace_id: The workspace ID for the cluster monitoring + extension. + :type workspace_id: str + :param primary_key: The certificate for the cluster monitoring + extensions. + :type primary_key: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._create_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + extension_name=extension_name, + workspace_id=workspace_id, + primary_key=primary_key, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) create.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'} def get( @@ -403,26 +432,9 @@ def get( 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` - """ + def _delete_initial( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, **operation_config): # Construct URL url = self.delete.metadata['url'] path_format_arguments = { @@ -456,4 +468,48 @@ def delete( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response + + def delete( + self, resource_group_name, cluster_name, extension_name, custom_headers=None, raw=False, polling=True, **operation_config): + """Deletes the specified extension for HDInsight cluster. + + :param resource_group_name: The name of the resource group. + :type resource_group_name: str + :param cluster_name: The name of the cluster. + :type cluster_name: str + :param extension_name: The name of the cluster extension. + :type extension_name: str + :param dict custom_headers: headers that will be added to the request + :param bool raw: The poller return type is ClientRawResponse, the + direct response alongside the deserialized response + :param polling: True for ARMPolling, False for no polling, or a + polling object for personal polling strategy + :return: An instance of LROPoller that returns None or + ClientRawResponse if raw==True + :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or + ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]] + :raises: + :class:`ErrorResponseException` + """ + raw_result = self._delete_initial( + resource_group_name=resource_group_name, + cluster_name=cluster_name, + extension_name=extension_name, + custom_headers=custom_headers, + raw=True, + **operation_config + ) + + def get_long_running_output(response): + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + + lro_delay = operation_config.get( + 'long_running_operation_timeout', + self.config.long_running_operation_timeout) + if polling is True: polling_method = ARMPolling(lro_delay, **operation_config) + elif polling is False: polling_method = NoPolling() + else: polling_method = polling + return LROPoller(self._client, raw_result, get_long_running_output, polling_method) delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/extensions/{extensionName}'} diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py index fddc5bd6cbd8..a23feb791349 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/locations_operations.py @@ -22,7 +22,7 @@ class LocationsOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -32,73 +32,15 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-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. + :param location: The location to get capabilities for. :type location: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the diff --git a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py index 8978d9d1a856..518df6a15b9c 100644 --- a/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py +++ b/azure-mgmt-hdinsight/azure/mgmt/hdinsight/operations/operations.py @@ -22,7 +22,7 @@ class Operations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config 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 23b9d13e4e60..f69fe8b17673 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,7 +22,7 @@ class ScriptActionsOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -32,7 +32,7 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config @@ -91,7 +91,7 @@ def delete( return client_raw_response delete.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions/{scriptName}'} - def list_persisted_scripts( + def list_by_cluster( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): """Lists all the persisted script actions for the specified cluster. @@ -114,7 +114,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list_persisted_scripts.metadata['url'] + url = self.list_by_cluster.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -158,7 +158,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list_persisted_scripts.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions'} + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptActions'} def get_execution_detail( self, resource_group_name, cluster_name, script_execution_id, custom_headers=None, raw=False, **operation_config): 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 1deb836e4bbb..36cfbb6fdb97 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,7 +22,7 @@ class ScriptExecutionHistoryOperations(object): :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 api_version: The HDInsight client API Version. Constant value: "2018-06-01-preview". """ models = models @@ -32,11 +32,11 @@ def __init__(self, client, config, serializer, deserializer): self._client = client self._serialize = serializer self._deserialize = deserializer - self.api_version = "2015-03-01-preview" + self.api_version = "2018-06-01-preview" self.config = config - def list( + def list_by_cluster( self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config): """Lists all scripts' execution history for the specified cluster. @@ -59,7 +59,7 @@ def internal_paging(next_link=None, raw=False): if not next_link: # Construct URL - url = self.list.metadata['url'] + url = self.list_by_cluster.metadata['url'] path_format_arguments = { 'subscriptionId': self._serialize.url("self.config.subscription_id", self.config.subscription_id, 'str'), 'resourceGroupName': self._serialize.url("resource_group_name", resource_group_name, 'str'), @@ -103,7 +103,7 @@ def internal_paging(next_link=None, raw=False): return client_raw_response return deserialized - list.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory'} + list_by_cluster.metadata = {'url': '/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.HDInsight/clusters/{clusterName}/scriptExecutionHistory'} def promote( self, resource_group_name, cluster_name, script_execution_id, custom_headers=None, raw=False, **operation_config): diff --git a/azure-mgmt-hdinsight/azure_bdist_wheel.py b/azure-mgmt-hdinsight/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-hdinsight/azure_bdist_wheel.py +++ /dev/null @@ -1,54 +0,0 @@ -#------------------------------------------------------------------------- -# 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/setup.cfg b/azure-mgmt-hdinsight/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-hdinsight/setup.cfg +++ b/azure-mgmt-hdinsight/setup.cfg @@ -1,3 +1,2 @@ [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 index feee8754877b..2f83fd18f271 100644 --- a/azure-mgmt-hdinsight/setup.py +++ b/azure-mgmt-hdinsight/setup.py @@ -10,12 +10,6 @@ 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" @@ -76,11 +70,18 @@ 'License :: OSI Approved :: MIT License', ], zip_safe=False, - packages=find_packages(exclude=["tests"]), + packages=find_packages(exclude=[ + 'tests', + # Exclude packages that will be covered by PEP420 or nspkg + 'azure', + 'azure.mgmt', + ]), install_requires=[ 'msrest>=0.5.0', 'msrestazure>=0.4.32,<2.0.0', 'azure-common~=1.1', ], - cmdclass=cmdclass + extras_require={ + ":python_version<'3.0'": ['azure-mgmt-nspkg'], + } )