summaryrefslogtreecommitdiff
path: root/novaclient/v1_1/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'novaclient/v1_1/__init__.py')
-rw-r--r--novaclient/v1_1/__init__.py30
1 files changed, 28 insertions, 2 deletions
diff --git a/novaclient/v1_1/__init__.py b/novaclient/v1_1/__init__.py
index 1971228..9da7681 100644
--- a/novaclient/v1_1/__init__.py
+++ b/novaclient/v1_1/__init__.py
@@ -1,4 +1,3 @@
1# Copyright (c) 2012 OpenStack Foundation
2# 1#
3# All Rights Reserved. 2# All Rights Reserved.
4# 3#
@@ -14,4 +13,31 @@
14# License for the specific language governing permissions and limitations 13# License for the specific language governing permissions and limitations
15# under the License. 14# under the License.
16 15
17from novaclient.v1_1.client import Client # noqa 16# NOTE(akurilin): This module is left for backward compatibility. Feel free to
17# remove it, when openstack project will use correct way to
18# obtain novaclient object.
19# Known problems:
20# * python-openstackclient -
21# https://bugs.launchpad.net/python-openstackclient/+bug/1418024
22# * neutron - https://bugs.launchpad.net/neutron/+bug/1418017
23
24
25import sys
26import warnings
27
28from novaclient import v2
29
30warnings.warn("Module novaclient.v1_1 is deprecated (taken as a basis for "
31 "novaclient.v2). "
32 "The preferable way to get client class or object you can find "
33 "in novaclient.client module.")
34
35
36class MovedModule(object):
37 def __init__(self, new_module):
38 self.new_module = new_module
39
40 def __getattr__(self, attr):
41 return getattr(self.new_module, attr)
42
43sys.modules["novaclient.v1_1"] = MovedModule(v2)