From 2bac591b375b2e2f6561db5a650e5ad6c4abf908 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Oct 2018 22:47:24 +0000 Subject: [PATCH 1/4] Generated from 1502eaa09d37733a664e6dfbe14a2f3224f66bc8 Reservations RP 2018-06-01 Preview: Add new reserved resource type RedHat --- .../mgmt/reservations/models/azure_reservation_api_enums.py | 1 + .../azure/mgmt/reservations/models/reservation_properties.py | 2 +- .../mgmt/reservations/models/reservation_properties_py3.py | 2 +- azure-mgmt-reservations/azure/mgmt/reservations/version.py | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py b/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py index a3062f5067d3..cd9c4cc4f785 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/models/azure_reservation_api_enums.py @@ -96,6 +96,7 @@ class ReservedResourceType(str, Enum): sql_databases = "SqlDatabases" suse_linux = "SuseLinux" cosmos_db = "CosmosDb" + red_hat = "RedHat" class InstanceFlexibility(str, Enum): diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py b/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py index b5d5bd4ebce6..bb93e99ecf3f 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties.py @@ -19,7 +19,7 @@ class ReservationProperties(Model): sending a request. :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat' :type reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType :param instance_flexibility: Possible values include: 'On', 'Off', diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py b/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py index cef413d8aa94..adefcbc965cf 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/models/reservation_properties_py3.py @@ -19,7 +19,7 @@ class ReservationProperties(Model): sending a request. :param reserved_resource_type: Possible values include: 'VirtualMachines', - 'SqlDatabases', 'SuseLinux', 'CosmosDb' + 'SqlDatabases', 'SuseLinux', 'CosmosDb', 'RedHat' :type reserved_resource_type: str or ~azure.mgmt.reservations.models.ReservedResourceType :param instance_flexibility: Possible values include: 'On', 'Off', diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/version.py b/azure-mgmt-reservations/azure/mgmt/reservations/version.py index 3e682bbd5fb1..425e227c3b53 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/version.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "0.2.2" From 80c2562f2b6633070431d7ad117fd46f5e8c8c8c Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Oct 2018 22:49:35 +0000 Subject: [PATCH 2/4] Generated from ebf3ab084f69b5e9aeaeb0de1509c5963ca4d85c Update python version from 0.2.2 to 0.2.3 since this is a minor change --- azure-mgmt-reservations/azure/mgmt/reservations/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/version.py b/azure-mgmt-reservations/azure/mgmt/reservations/version.py index 425e227c3b53..1b09349bab85 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/version.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.2" +VERSION = "0.2.3" From 64e096120d3f852d189efad14473a8a75fd76002 Mon Sep 17 00:00:00 2001 From: azuresdkci Date: Wed, 31 Oct 2018 22:53:41 +0000 Subject: [PATCH 3/4] Packaging update of azure-mgmt-reservations --- azure-mgmt-reservations/MANIFEST.in | 4 +- azure-mgmt-reservations/azure/__init__.py | 2 +- .../azure/mgmt/__init__.py | 2 +- azure-mgmt-reservations/azure_bdist_wheel.py | 54 ------------------- azure-mgmt-reservations/setup.cfg | 1 - azure-mgmt-reservations/setup.py | 17 +++--- 6 files changed, 14 insertions(+), 66 deletions(-) delete mode 100644 azure-mgmt-reservations/azure_bdist_wheel.py diff --git a/azure-mgmt-reservations/MANIFEST.in b/azure-mgmt-reservations/MANIFEST.in index 9ecaeb15de50..6ceb27f7a96e 100644 --- a/azure-mgmt-reservations/MANIFEST.in +++ b/azure-mgmt-reservations/MANIFEST.in @@ -1,2 +1,4 @@ include *.rst -include azure_bdist_wheel.py \ No newline at end of file +include azure/__init__.py +include azure/mgmt/__init__.py + diff --git a/azure-mgmt-reservations/azure/__init__.py b/azure-mgmt-reservations/azure/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-reservations/azure/__init__.py +++ b/azure-mgmt-reservations/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-reservations/azure/mgmt/__init__.py b/azure-mgmt-reservations/azure/mgmt/__init__.py index de40ea7ca058..0260537a02bb 100644 --- a/azure-mgmt-reservations/azure/mgmt/__init__.py +++ b/azure-mgmt-reservations/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-reservations/azure_bdist_wheel.py b/azure-mgmt-reservations/azure_bdist_wheel.py deleted file mode 100644 index 8a81d1b61775..000000000000 --- a/azure-mgmt-reservations/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-reservations/setup.cfg b/azure-mgmt-reservations/setup.cfg index 856f4164982c..3c6e79cf31da 100644 --- a/azure-mgmt-reservations/setup.cfg +++ b/azure-mgmt-reservations/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-reservations/setup.py b/azure-mgmt-reservations/setup.py index f6a88ee8d422..99195938af80 100644 --- a/azure-mgmt-reservations/setup.py +++ b/azure-mgmt-reservations/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-reservations" @@ -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'], + } ) From bc42c1d2b7c2db1d67e3f2375e91eb6583d5fc24 Mon Sep 17 00:00:00 2001 From: Azure SDK for Python bot Date: Wed, 31 Oct 2018 23:10:51 +0000 Subject: [PATCH 4/4] Generated from 07969ca3858ae7344a6528ec6bb2d6656c06f534 Update the python version --- azure-mgmt-reservations/azure/mgmt/reservations/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-mgmt-reservations/azure/mgmt/reservations/version.py b/azure-mgmt-reservations/azure/mgmt/reservations/version.py index 1b09349bab85..5acf888ec624 100644 --- a/azure-mgmt-reservations/azure/mgmt/reservations/version.py +++ b/azure-mgmt-reservations/azure/mgmt/reservations/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.2.3" +VERSION = "0.3.2"