From 6587fc948846623aa27ac5c76c0b6c7fc99a276d Mon Sep 17 00:00:00 2001 From: EdLeafe Date: Mon, 21 Dec 2015 10:22:33 -0600 Subject: [PATCH 01/13] Update references to novaclient 1.1 Recent releases of novaclient removed the references to the v1.1 client. This patch updates the import statements to refer to the v2 client, and also updates the check for the 1.1 extensions. The required version for python-novaclient has also been increased to use 2.27.0 as the minimum. --- pyrax/__init__.py | 19 ++++++++++--------- setup.py | 2 +- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/pyrax/__init__.py b/pyrax/__init__.py index a5b8b1ae..6409cf8c 100755 --- a/pyrax/__init__.py +++ b/pyrax/__init__.py @@ -37,10 +37,6 @@ import six.moves.configparser as ConfigParser import warnings -# Ignore UserWarnings. Currently we're getting warnings about novaclient.v1_1 -# deprecations as UserWarning instead of DeprecationWarning (why?). -warnings.filterwarnings("ignore", ".*novaclient.v1_1 is deprecated.*") - # keyring is an optional import try: import keyring @@ -61,8 +57,9 @@ from novaclient import exceptions as _cs_exceptions from novaclient import auth_plugin as _cs_auth_plugin from novaclient import client as nc - from novaclient.v1_1 import client as _cs_client - from novaclient.v1_1.servers import Server as CloudServer + from novaclient import client as _cs_client + from novaclient import API_MAX_VERSION as _cs_max_version + from novaclient.v2.servers import Server as CloudServer from .autoscale import AutoScaleClient from .cloudcdn import CloudCDNClient @@ -120,7 +117,7 @@ services = tuple() _client_classes = { - "compute": _cs_client.Client, + "compute": _cs_client.get_client_class(_cs_max_version), "cdn": CloudCDNClient, "object_store": StorageClient, "database": CloudDatabaseClient, @@ -679,8 +676,12 @@ def connect_to_cloudservers(region=None, context=None, verify_ssl=None, **kwargs insecure = not get_setting("verify_ssl") else: insecure = not verify_ssl - extensions = nc.discover_extensions("1.1") - cloudservers = _cs_client.Client(context.username, context.password, + try: + extensions = nc.discover_extensions(_cs_max_version) + except AttributeError: + extensions = None + clt_class = _cs_client.get_client_class(_cs_max_version) + cloudservers = clt_class(context.username, context.password, project_id=context.tenant_id, auth_url=context.auth_endpoint, auth_system=id_type, region_name=region, service_type="compute", auth_plugin=auth_plugin, insecure=insecure, extensions=extensions, diff --git a/setup.py b/setup.py index 36ae12bc..85f3a781 100755 --- a/setup.py +++ b/setup.py @@ -84,7 +84,7 @@ def run(self): "Operating System :: OS Independent", ], install_requires=[ - "python-novaclient>=2.13.0,<=2.27.0", + "python-novaclient>=2.27.0", "rackspace-novaclient", "keyring", "requests>=2.2.1", From 646eac4ff9f5a607f067ef0f8e18b456f54b79c1 Mon Sep 17 00:00:00 2001 From: Rahman Syed Date: Thu, 14 Jan 2016 10:09:30 -0600 Subject: [PATCH 02/13] Exclude Managed DNS from service registration to avoid conflict with Cloud DNS --- pyrax/base_identity.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyrax/base_identity.py b/pyrax/base_identity.py index 671d31a9..8387b89a 100644 --- a/pyrax/base_identity.py +++ b/pyrax/base_identity.py @@ -648,6 +648,10 @@ def _parse_service_catalog(self): if not hasattr(service, "endpoints"): # Not an OpenStack service continue + if service.prefix == '' and service.service_type == 'dns': + # Skip service registration of Managed DNS + # so it doesn't conflict with Cloud DNS + continue setattr(self.services, service.service_type, service) self.regions.update(list(service.endpoints.keys())) # Update the 'ALL' services to include all available regions. From 617f7617e805b11be99688f4ce76df5da165b303 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 14 Jan 2016 11:32:28 -0600 Subject: [PATCH 03/13] Limit dependency versions further, to limit problems going forward --- setup.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index 85f3a781..0c5d322e 100755 --- a/setup.py +++ b/setup.py @@ -84,11 +84,11 @@ def run(self): "Operating System :: OS Independent", ], install_requires=[ - "python-novaclient>=2.27.0", + "python-novaclient==2.27.0", "rackspace-novaclient", "keyring", - "requests>=2.2.1", - "six>=1.9.0", + "requests>=2.2.1,<3", + "six>=1.9.0,<2", ] + testing_requires, packages=[ "pyrax", From 8a3e0839153bd6002156a877144d6c23ff29de9f Mon Sep 17 00:00:00 2001 From: briancurtin Date: Wed, 2 Sep 2015 16:37:49 -0500 Subject: [PATCH 04/13] Update release notes for 1.9.5 --- RELEASENOTES.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 896f7bf8..5fd361bc 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,12 @@ # Release Notes for pyrax +### 2015.09.02 - Version 1.9.5 + + - Cloud Servers + - Handle a change to python-novaclient 2.27.0 + - Pin python-novaclient to less or equal to 2.27.0 + - Suppress deprecation warnings emitted for novaclient.v1_1 + ### 2015.04.16 - Version 1.9.4 - Cloud CDN From f1d4e503e112b287731451a5fa5765bc5b918b1e Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:29:16 -0600 Subject: [PATCH 05/13] Bump version to 1.9.6 and update RELEASENOTES.md --- RELEASENOTES.md | 10 ++++++++++ pyrax/version.py | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5fd361bc..5d67ba17 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,5 +1,15 @@ # Release Notes for pyrax +### 2016.01.19 - Version 1.9.6 + + - Cloud DNS + - Ignore new Managed DNS offering + + - General + - Pin python-novaclient to 2.27.0 + - Pin six and requests to not exceed the next semver major release + - Update references for novaclient v1.1 to v2 + ### 2015.09.02 - Version 1.9.5 - Cloud Servers diff --git a/pyrax/version.py b/pyrax/version.py index 70b71bca..e24d6854 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.4" +version = "1.9.6" From bc737d3aaf942aafbf4852c3c10fb5e965992389 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:34:31 -0600 Subject: [PATCH 06/13] Bump version back to 1.9.4, temporarily --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index e24d6854..70b71bca 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.6" +version = "1.9.4" From 8196a1f0225644cc341e8a7c36d48615dc4705ee Mon Sep 17 00:00:00 2001 From: briancurtin Date: Wed, 2 Sep 2015 16:38:41 -0500 Subject: [PATCH 07/13] Bump to 1.9.5 --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index 70b71bca..ce5165b8 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.4" +version = "1.9.5" From d64e10d5deebed4f4b05f5c7ca9113ac910196e7 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:35:01 -0600 Subject: [PATCH 08/13] Bump version to 1.9.6 --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index ce5165b8..e24d6854 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.5" +version = "1.9.6" From 1035c5a8b10d229d24470341db14f78a8fc5d249 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:47:13 -0600 Subject: [PATCH 09/13] Revert "Bump version to 1.9.6" This reverts commit d64e10d5deebed4f4b05f5c7ca9113ac910196e7. --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index e24d6854..ce5165b8 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.6" +version = "1.9.5" From 87a7939e801e812406a31436bdb03434281ab62f Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:47:27 -0600 Subject: [PATCH 10/13] Revert "Bump to 1.9.5" This reverts commit 8196a1f0225644cc341e8a7c36d48615dc4705ee. --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index ce5165b8..70b71bca 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.5" +version = "1.9.4" From 36371a4feb7c9eadecd7ec24cb3fbb8093e0000e Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:47:35 -0600 Subject: [PATCH 11/13] Revert "Bump version back to 1.9.4, temporarily" This reverts commit bc737d3aaf942aafbf4852c3c10fb5e965992389. --- pyrax/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyrax/version.py b/pyrax/version.py index 70b71bca..e24d6854 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.4" +version = "1.9.6" From c64b7f579ddecd48a49be54774da4692e2b0d50e Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:47:43 -0600 Subject: [PATCH 12/13] Revert "Bump version to 1.9.6 and update RELEASENOTES.md" This reverts commit f1d4e503e112b287731451a5fa5765bc5b918b1e. --- RELEASENOTES.md | 10 ---------- pyrax/version.py | 2 +- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5d67ba17..5fd361bc 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,15 +1,5 @@ # Release Notes for pyrax -### 2016.01.19 - Version 1.9.6 - - - Cloud DNS - - Ignore new Managed DNS offering - - - General - - Pin python-novaclient to 2.27.0 - - Pin six and requests to not exceed the next semver major release - - Update references for novaclient v1.1 to v2 - ### 2015.09.02 - Version 1.9.5 - Cloud Servers diff --git a/pyrax/version.py b/pyrax/version.py index e24d6854..70b71bca 100644 --- a/pyrax/version.py +++ b/pyrax/version.py @@ -1,3 +1,3 @@ # -*- coding: utf-8 -*- -version = "1.9.6" +version = "1.9.4" From e7d729f435adf8cae8f2bae48d04b00f910cdcd1 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Tue, 19 Jan 2016 12:47:52 -0600 Subject: [PATCH 13/13] Revert "Update release notes for 1.9.5" This reverts commit 8a3e0839153bd6002156a877144d6c23ff29de9f. --- RELEASENOTES.md | 7 ------- 1 file changed, 7 deletions(-) diff --git a/RELEASENOTES.md b/RELEASENOTES.md index 5fd361bc..896f7bf8 100644 --- a/RELEASENOTES.md +++ b/RELEASENOTES.md @@ -1,12 +1,5 @@ # Release Notes for pyrax -### 2015.09.02 - Version 1.9.5 - - - Cloud Servers - - Handle a change to python-novaclient 2.27.0 - - Pin python-novaclient to less or equal to 2.27.0 - - Suppress deprecation warnings emitted for novaclient.v1_1 - ### 2015.04.16 - Version 1.9.4 - Cloud CDN