From 12f3c7a6b8a31ad911bf26f1eb3262c1f0192f77 Mon Sep 17 00:00:00 2001 From: Patrick Nawracay Date: Tue, 27 Feb 2018 11:10:39 +0100 Subject: [PATCH] mgr/dashboard_v2: Remove `Service` and `ServiceMeta` class Signed-off-by: Patrick Nawracay --- .../mgr/dashboard_v2/services/__init__.py | 33 ------------------- .../mgr/dashboard_v2/services/ceph_service.py | 3 +- .../dashboard_v2/tests/test_rbd_mirroring.py | 1 - .../mgr/dashboard_v2/tests/test_tcmu_iscsi.py | 1 - 4 files changed, 1 insertion(+), 37 deletions(-) diff --git a/src/pybind/mgr/dashboard_v2/services/__init__.py b/src/pybind/mgr/dashboard_v2/services/__init__.py index 46ca798bdb9..139759b658c 100644 --- a/src/pybind/mgr/dashboard_v2/services/__init__.py +++ b/src/pybind/mgr/dashboard_v2/services/__init__.py @@ -1,35 +1,2 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import - -from six import add_metaclass - - -class ServiceMeta(type): - @property - def mgr(cls): - """ - :return: Returns the MgrModule instance of this Ceph dashboard module. - """ - return cls._mgr_module - - @mgr.setter - def mgr(cls, value): - """ - :param value: The MgrModule instance of the Ceph dashboard module. - """ - cls._mgr_module = value - - -@add_metaclass(ServiceMeta) -class Service(object): - """ - Base class for all services. - """ - _mgr_module = None - - @property - def mgr(self): - """ - :return: Returns the MgrModule instance of this Ceph module. - """ - return self._mgr_module diff --git a/src/pybind/mgr/dashboard_v2/services/ceph_service.py b/src/pybind/mgr/dashboard_v2/services/ceph_service.py index ca76e16ab29..69d74ce7b3b 100644 --- a/src/pybind/mgr/dashboard_v2/services/ceph_service.py +++ b/src/pybind/mgr/dashboard_v2/services/ceph_service.py @@ -1,11 +1,10 @@ # -*- coding: utf-8 -*- from __future__ import absolute_import -from . import Service from .. import mgr -class CephService(Service): +class CephService(object): @classmethod def get_service_map(cls, service_name): service_map = {} diff --git a/src/pybind/mgr/dashboard_v2/tests/test_rbd_mirroring.py b/src/pybind/mgr/dashboard_v2/tests/test_rbd_mirroring.py index 9add9d95022..b498537087f 100644 --- a/src/pybind/mgr/dashboard_v2/tests/test_rbd_mirroring.py +++ b/src/pybind/mgr/dashboard_v2/tests/test_rbd_mirroring.py @@ -8,7 +8,6 @@ from .. import mgr from ..controllers.auth import Auth from ..controllers.summary import Summary from ..controllers.rbd_mirroring import RbdMirror -from ..services import Service from ..tools import SessionExpireAtBrowserCloseTool from .helper import ControllerTestCase diff --git a/src/pybind/mgr/dashboard_v2/tests/test_tcmu_iscsi.py b/src/pybind/mgr/dashboard_v2/tests/test_tcmu_iscsi.py index d58e972b248..11ad1d757cd 100644 --- a/src/pybind/mgr/dashboard_v2/tests/test_tcmu_iscsi.py +++ b/src/pybind/mgr/dashboard_v2/tests/test_tcmu_iscsi.py @@ -4,7 +4,6 @@ import mock from .. import mgr from ..controllers.auth import Auth -from ..services import Service from ..tools import SessionExpireAtBrowserCloseTool from ..controllers.tcmu_iscsi import TcmuIscsi from .helper import ControllerTestCase -- 2.39.5