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
This commit is contained in:
parent
a96e9d57c5
commit
147a1a6ee4
|
@ -30,6 +30,7 @@ import logging
|
||||||
import os
|
import os
|
||||||
import pkgutil
|
import pkgutil
|
||||||
import re
|
import re
|
||||||
|
import warnings
|
||||||
|
|
||||||
from keystoneclient import adapter
|
from keystoneclient import adapter
|
||||||
from keystoneclient import session
|
from keystoneclient import session
|
||||||
|
@ -48,7 +49,7 @@ from six.moves.urllib import parse
|
||||||
from novaclient import api_versions
|
from novaclient import api_versions
|
||||||
from novaclient import exceptions
|
from novaclient import exceptions
|
||||||
from novaclient import extension as ext
|
from novaclient import extension as ext
|
||||||
from novaclient.i18n import _
|
from novaclient.i18n import _, _LW
|
||||||
from novaclient import service_catalog
|
from novaclient import service_catalog
|
||||||
from novaclient import utils
|
from novaclient import utils
|
||||||
|
|
||||||
|
@ -780,6 +781,8 @@ def _get_client_class_and_version(version):
|
||||||
|
|
||||||
def get_client_class(version):
|
def get_client_class(version):
|
||||||
"""Returns Client class based on given version."""
|
"""Returns Client class based on given version."""
|
||||||
|
warnings.warn(_LW("'get_client_class' is deprecated. "
|
||||||
|
"Please use `novaclient.client.Client` instead."))
|
||||||
_api_version, client_class = _get_client_class_and_version(version)
|
_api_version, client_class = _get_client_class_and_version(version)
|
||||||
return client_class
|
return client_class
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue