From d0449cba2d0dfa3802e4a8d323ca7563a7aa5d46 Mon Sep 17 00:00:00 2001 From: Sebastian Wagner Date: Mon, 4 May 2020 12:47:38 +0200 Subject: [PATCH] mgr/cephadm: move nfs and osd to services/ Signed-off-by: Sebastian Wagner (cherry picked from commit 011747c74e9308d9301613395020800f556e85c4) --- src/pybind/mgr/cephadm/module.py | 4 ++-- src/pybind/mgr/cephadm/services/__init__.py | 0 src/pybind/mgr/cephadm/{ => services}/nfs.py | 2 +- src/pybind/mgr/cephadm/{ => services}/osd.py | 0 src/pybind/mgr/cephadm/tests/test_cephadm.py | 4 ++-- 5 files changed, 5 insertions(+), 5 deletions(-) create mode 100644 src/pybind/mgr/cephadm/services/__init__.py rename src/pybind/mgr/cephadm/{ => services}/nfs.py (99%) rename src/pybind/mgr/cephadm/{ => services}/osd.py (100%) diff --git a/src/pybind/mgr/cephadm/module.py b/src/pybind/mgr/cephadm/module.py index ca6ad58e2085..541737bd5e90 100644 --- a/src/pybind/mgr/cephadm/module.py +++ b/src/pybind/mgr/cephadm/module.py @@ -39,8 +39,8 @@ from orchestrator import OrchestratorError, OrchestratorValidationError, HostSpe from . import remotes from . import utils -from .nfs import NFSGanesha -from .osd import RemoveUtil, OSDRemoval +from .services.nfs import NFSGanesha +from .services.osd import RemoveUtil, OSDRemoval from .inventory import Inventory, SpecStore, HostCache try: diff --git a/src/pybind/mgr/cephadm/services/__init__.py b/src/pybind/mgr/cephadm/services/__init__.py new file mode 100644 index 000000000000..e69de29bb2d1 diff --git a/src/pybind/mgr/cephadm/nfs.py b/src/pybind/mgr/cephadm/services/nfs.py similarity index 99% rename from src/pybind/mgr/cephadm/nfs.py rename to src/pybind/mgr/cephadm/services/nfs.py index 1c0a45200ec7..2eaa9344ab6d 100644 --- a/src/pybind/mgr/cephadm/nfs.py +++ b/src/pybind/mgr/cephadm/services/nfs.py @@ -8,7 +8,7 @@ from ceph.deployment.service_spec import NFSServiceSpec import cephadm from orchestrator import OrchestratorError -from . import utils +from .. import utils logger = logging.getLogger(__name__) diff --git a/src/pybind/mgr/cephadm/osd.py b/src/pybind/mgr/cephadm/services/osd.py similarity index 100% rename from src/pybind/mgr/cephadm/osd.py rename to src/pybind/mgr/cephadm/services/osd.py diff --git a/src/pybind/mgr/cephadm/tests/test_cephadm.py b/src/pybind/mgr/cephadm/tests/test_cephadm.py index 2d9ba86ee1d1..8226bdb2ed74 100644 --- a/src/pybind/mgr/cephadm/tests/test_cephadm.py +++ b/src/pybind/mgr/cephadm/tests/test_cephadm.py @@ -5,7 +5,7 @@ from contextlib import contextmanager import pytest from ceph.deployment.drive_group import DriveGroupSpec, DeviceSelection -from cephadm.osd import OSDRemoval +from cephadm.services.osd import OSDRemoval try: from typing import Any, List @@ -341,7 +341,7 @@ class TestCephadm(object): ) ]) )) - @mock.patch("cephadm.osd.RemoveUtil.get_pg_count", lambda _, __: 0) + @mock.patch("cephadm.services.osd.RemoveUtil.get_pg_count", lambda _, __: 0) def test_remove_osds(self, cephadm_module): with self._with_host(cephadm_module, 'test'): c = cephadm_module.list_daemons(refresh=True) -- 2.47.3