summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Kurilin <akurilin@mirantis.com>2015-09-09 17:18:14 +0300
committerAndrey Kurilin <akurilin@mirantis.com>2015-09-10 15:55:26 +0300
commit147a1a6ee421f9a45a562f013e233d29d43258e4 (patch)
tree2173cf53a8ffb3b891a864f0d31654ad9bcc700d
parenta96e9d57c56e53f4e02701d2ae9f9194bb6e3d5b (diff)
Deprecate 'novaclient.client.get_client_class'
This method is redundant and blocks versioned client classes to change interface. `novaclient.client.Client` should be used instead. Releated-Bug: #1493576 Change-Id: I73cea2c6062419d75646e9239c6194f4d1ffd2b1
Notes
Notes (review): Verified+2: Jenkins Code-Review+2: Kevin L. Mitchell <kevin.mitchell@rackspace.com> Workflow+1: Kevin L. Mitchell <kevin.mitchell@rackspace.com> Code-Review+2: John Garbutt <john@johngarbutt.com> Submitted-by: Jenkins Submitted-at: Thu, 10 Sep 2015 18:11:14 +0000 Reviewed-on: https://review.openstack.org/221789 Project: openstack/python-novaclient Branch: refs/heads/master
-rw-r--r--novaclient/client.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/novaclient/client.py b/novaclient/client.py
index f7ac870..399d98e 100644
--- a/novaclient/client.py
+++ b/novaclient/client.py
@@ -30,6 +30,7 @@ import logging
30import os 30import os
31import pkgutil 31import pkgutil
32import re 32import re
33import warnings
33 34
34from keystoneclient import adapter 35from keystoneclient import adapter
35from keystoneclient import session 36from keystoneclient import session
@@ -48,7 +49,7 @@ from six.moves.urllib import parse
48from novaclient import api_versions 49from novaclient import api_versions
49from novaclient import exceptions 50from novaclient import exceptions
50from novaclient import extension as ext 51from novaclient import extension as ext
51from novaclient.i18n import _ 52from novaclient.i18n import _, _LW
52from novaclient import service_catalog 53from novaclient import service_catalog
53from novaclient import utils 54from novaclient import utils
54 55
@@ -780,6 +781,8 @@ def _get_client_class_and_version(version):
780 781
781def get_client_class(version): 782def get_client_class(version):
782 """Returns Client class based on given version.""" 783 """Returns Client class based on given version."""
784 warnings.warn(_LW("'get_client_class' is deprecated. "
785 "Please use `novaclient.client.Client` instead."))
783 _api_version, client_class = _get_client_class_and_version(version) 786 _api_version, client_class = _get_client_class_and_version(version)
784 return client_class 787 return client_class
785 788