From: Kefu Chai Date: Fri, 9 Feb 2018 10:10:19 +0000 (+0800) Subject: mgr: import absolute_import to enforce absolute_import X-Git-Tag: v13.0.2~257^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=5e34b7480c8baa2a6b8b9b406a0344fac2809c87;p=ceph.git mgr: import absolute_import to enforce absolute_import to make sure new "import" statements in future in these files do not assume relative import. Signed-off-by: Kefu Chai --- diff --git a/src/pybind/mgr/dashboard/module.py b/src/pybind/mgr/dashboard/module.py index 213f05f0319e7..cb1ae8cabd86a 100644 --- a/src/pybind/mgr/dashboard/module.py +++ b/src/pybind/mgr/dashboard/module.py @@ -3,6 +3,8 @@ Demonstrate writing a Ceph web interface inside a mgr module. """ +from __future__ import absolute_import + # We must share a global reference to this instance, because it is the # gatekeeper to all accesses to data from the C++ side (e.g. the REST API # request handlers need to see it) diff --git a/src/pybind/mgr/dashboard/rbd_iscsi.py b/src/pybind/mgr/dashboard/rbd_iscsi.py index c7882738ae26e..6152c8f8087b5 100644 --- a/src/pybind/mgr/dashboard/rbd_iscsi.py +++ b/src/pybind/mgr/dashboard/rbd_iscsi.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import rados import rbd diff --git a/src/pybind/mgr/dashboard/rbd_ls.py b/src/pybind/mgr/dashboard/rbd_ls.py index d6d88c30717f1..1f5108aa7cc03 100644 --- a/src/pybind/mgr/dashboard/rbd_ls.py +++ b/src/pybind/mgr/dashboard/rbd_ls.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import rbd import rados diff --git a/src/pybind/mgr/dashboard/rbd_mirroring.py b/src/pybind/mgr/dashboard/rbd_mirroring.py index edc3a9815f200..08e63e863e6cf 100644 --- a/src/pybind/mgr/dashboard/rbd_mirroring.py +++ b/src/pybind/mgr/dashboard/rbd_mirroring.py @@ -1,3 +1,4 @@ +from __future__ import absolute_import import json import re diff --git a/src/pybind/mgr/dashboard/rgw.py b/src/pybind/mgr/dashboard/rgw.py index 257e22ef2f1b5..0e851f9e7873d 100644 --- a/src/pybind/mgr/dashboard/rgw.py +++ b/src/pybind/mgr/dashboard/rgw.py @@ -1,5 +1,7 @@ # -*- code: utf-8 -*- +from __future__ import absolute_import + import json from .remote_view_cache import RemoteViewCache diff --git a/src/pybind/mgr/restful/decorators.py b/src/pybind/mgr/restful/decorators.py index 47f82f5a68d41..03a9448298c1c 100644 --- a/src/pybind/mgr/restful/decorators.py +++ b/src/pybind/mgr/restful/decorators.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + from pecan import request, response from base64 import b64decode from functools import wraps diff --git a/src/pybind/mgr/restful/hooks.py b/src/pybind/mgr/restful/hooks.py index 7623a71538f2c..d677dcc2a15a7 100644 --- a/src/pybind/mgr/restful/hooks.py +++ b/src/pybind/mgr/restful/hooks.py @@ -1,3 +1,5 @@ +from __future__ import absolute_import + from pecan.hooks import PecanHook import traceback diff --git a/src/pybind/mgr/restful/module.py b/src/pybind/mgr/restful/module.py index 72af5b8464cc7..ecae22100d188 100644 --- a/src/pybind/mgr/restful/module.py +++ b/src/pybind/mgr/restful/module.py @@ -1,6 +1,7 @@ """ A RESTful API for Ceph """ +from __future__ import absolute_import import os import json