From d90d380e17d461a11db3390fced4bd35220e2b36 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Mon, 1 Nov 2021 08:45:39 -0700 Subject: [PATCH] rgwam: reorganize code Signed-off-by: Yehuda Sadeh --- src/pybind/mgr/rgw/__init__.py | 4 ---- src/pybind/mgr/rgw/module.py | 4 ++-- src/python-common/ceph/rgw/__init__.py | 3 +++ src/{pybind/mgr => python-common/ceph}/rgw/diff.py | 0 .../mgr/rgw/rgwam.py => python-common/ceph/rgw/rgwam_core.py} | 1 - src/{pybind/mgr => python-common/ceph}/rgw/types.py | 0 src/{pybind/mgr/rgw/cli.py => rgw/rgwam.py} | 4 ++-- 7 files changed, 7 insertions(+), 9 deletions(-) create mode 100644 src/python-common/ceph/rgw/__init__.py rename src/{pybind/mgr => python-common/ceph}/rgw/diff.py (100%) rename src/{pybind/mgr/rgw/rgwam.py => python-common/ceph/rgw/rgwam_core.py} (99%) rename src/{pybind/mgr => python-common/ceph}/rgw/types.py (100%) rename src/{pybind/mgr/rgw/cli.py => rgw/rgwam.py} (98%) diff --git a/src/pybind/mgr/rgw/__init__.py b/src/pybind/mgr/rgw/__init__.py index cfcdc91056e..b14787608bc 100644 --- a/src/pybind/mgr/rgw/__init__.py +++ b/src/pybind/mgr/rgw/__init__.py @@ -2,7 +2,3 @@ try: from .module import Module except ImportError: pass - -import logging - -log = logging.getLogger(__name__) diff --git a/src/pybind/mgr/rgw/module.py b/src/pybind/mgr/rgw/module.py index 7defab0c623..42b01a8f36e 100644 --- a/src/pybind/mgr/rgw/module.py +++ b/src/pybind/mgr/rgw/module.py @@ -11,8 +11,8 @@ from ceph.deployment.service_spec import RGWSpec from typing import cast, Any, Optional, Sequence from . import * -from .types import RGWAMException, RGWAMEnvMgr -from .rgwam import EnvArgs, RGWAM +from ceph.rgw.types import RGWAMException, RGWAMEnvMgr +from ceph.rgw.rgwam_core import EnvArgs, RGWAM class RGWAMOrchMgr(RGWAMEnvMgr): diff --git a/src/python-common/ceph/rgw/__init__.py b/src/python-common/ceph/rgw/__init__.py new file mode 100644 index 00000000000..3988bf129e2 --- /dev/null +++ b/src/python-common/ceph/rgw/__init__.py @@ -0,0 +1,3 @@ +import logging + +log = logging.getLogger(__name__) diff --git a/src/pybind/mgr/rgw/diff.py b/src/python-common/ceph/rgw/diff.py similarity index 100% rename from src/pybind/mgr/rgw/diff.py rename to src/python-common/ceph/rgw/diff.py diff --git a/src/pybind/mgr/rgw/rgwam.py b/src/python-common/ceph/rgw/rgwam_core.py similarity index 99% rename from src/pybind/mgr/rgw/rgwam.py rename to src/python-common/ceph/rgw/rgwam_core.py index c902eaf9f53..3a9df6f0b8c 100644 --- a/src/pybind/mgr/rgw/rgwam.py +++ b/src/python-common/ceph/rgw/rgwam_core.py @@ -1,4 +1,3 @@ -#!@Python3_EXECUTABLE@ # -*- mode:python -*- # vim: ts=4 sw=4 smarttab expandtab # diff --git a/src/pybind/mgr/rgw/types.py b/src/python-common/ceph/rgw/types.py similarity index 100% rename from src/pybind/mgr/rgw/types.py rename to src/python-common/ceph/rgw/types.py diff --git a/src/pybind/mgr/rgw/cli.py b/src/rgw/rgwam.py similarity index 98% rename from src/pybind/mgr/rgw/cli.py rename to src/rgw/rgwam.py index 2b3287cbaa3..c0017dc21e7 100755 --- a/src/pybind/mgr/rgw/cli.py +++ b/src/rgw/rgwam.py @@ -18,8 +18,8 @@ import logging from urllib.parse import urlparse -from .rgwam import RGWAM, EnvArgs -from .types import RGWAMEnvMgr, RGWAMException +from ceph.rgw.rgwam_core import RGWAM, EnvArgs +from ceph.rgw.types import RGWAMEnvMgr, RGWAMException class RGWAMCLIMgr(RGWAMEnvMgr): def __init__(self): -- 2.39.5