]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard_v2: Remove `Service` and `ServiceMeta` class
authorPatrick Nawracay <pnawracay@suse.com>
Tue, 27 Feb 2018 10:10:39 +0000 (11:10 +0100)
committerRicardo Dias <rdias@suse.com>
Mon, 5 Mar 2018 13:07:17 +0000 (13:07 +0000)
Signed-off-by: Patrick Nawracay <pnawracay@suse.com>
src/pybind/mgr/dashboard_v2/services/__init__.py
src/pybind/mgr/dashboard_v2/services/ceph_service.py
src/pybind/mgr/dashboard_v2/tests/test_rbd_mirroring.py
src/pybind/mgr/dashboard_v2/tests/test_tcmu_iscsi.py

index 46ca798bdb9812c9571ffcb6a628163c98143dbe..139759b658ca10386fe66e2a391a4501341b7ea0 100644 (file)
@@ -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
index ca76e16ab290536f776e9c5b7f48148e3353e4db..69d74ce7b3b05a3db64b56cbfd4e04675b046852 100644 (file)
@@ -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 = {}
index 9add9d95022dff8aa751f034b703160361be6057..b498537087f243238833f0e6bba6da77d3434646 100644 (file)
@@ -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
 
index d58e972b24812ce56a33b2d02fe64a97960ae8a4..11ad1d757cd2723e5fa3aa82088326191bd1d35b 100644 (file)
@@ -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