]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: plugins: deleted `CanLog` interface
authorRicardo Dias <rdias@suse.com>
Mon, 4 Nov 2019 09:33:44 +0000 (09:33 +0000)
committerRicardo Dias <rdias@suse.com>
Tue, 12 Nov 2019 11:50:51 +0000 (11:50 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/pybind/mgr/dashboard/HACKING.rst
src/pybind/mgr/dashboard/plugins/feature_toggles.py
src/pybind/mgr/dashboard/plugins/interfaces.py
src/pybind/mgr/dashboard/plugins/plugin.py

index b273f0daee3f0e7bb42a116114d0f4d85d80c778..da41e8c17b4a48a7f71760a3d713ffad11724e15 100644 (file)
@@ -1942,7 +1942,6 @@ In order to create a new plugin, the following steps are required:
 The available Mixins (helpers) are:
 
 - ``CanMgr``: provides the plug-in with access to the ``mgr`` instance under ``self.mgr``.
-- ``CanLog``: provides the plug-in with access to the Ceph Dashboard logger under ``self.log``.
 
 The available Interfaces are:
 
@@ -1985,9 +1984,8 @@ A sample plugin implementation would look like this:
   import cherrypy
 
   @PM.add_plugin
-  class Mute(I.CanMgr, I.CanLog, I.Setupable, I.HasOptions,
-                       I.HasCommands, I.FilterRequest.BeforeHandler,
-                       I.HasControllers):
+  class Mute(I.CanMgr, I.Setupable, I.HasOptions, I.HasCommands,
+                       I.FilterRequest.BeforeHandler, I.HasControllers):
     @PM.add_hook
     def get_options(self):
       return [Option('mute', default=False, type='bool')]
index c9124195abd3cc81d35dd1948e610b9f060dd7af..6428687d48702e89991ff1fa8c7dae57562c5021 100644 (file)
@@ -46,7 +46,7 @@ class Actions(Enum):
 
 # pylint: disable=too-many-ancestors
 @PM.add_plugin
-class FeatureToggles(I.CanMgr, I.CanLog, I.Setupable, I.HasOptions,
+class FeatureToggles(I.CanMgr, I.Setupable, I.HasOptions,
                      I.HasCommands, I.FilterRequest.BeforeHandler,
                      I.HasControllers):
     OPTION_FMT = 'FEATURE_TOGGLE_{}'
index a08c3aac1c3f8d80178ae26c633e845c5a71772f..fdf6fdc58d65ffc62350673655502e9d0b5498a6 100644 (file)
@@ -9,11 +9,6 @@ class CanMgr(Mixin):
     mgr = mgr
 
 
-class CanLog(Mixin):
-    import logging
-    log = logging.getLogger()
-
-
 class CanCherrypy(Mixin):
     import cherrypy
     request = cherrypy.request
@@ -35,7 +30,7 @@ class Setupable(Interface):
     def setup(self):
         """
         Placeholder for plugin setup, right after server start.
-        CanMgr.mgr and CanLog.log are initialized by then.
+        CanMgr.mgr is initialized by then.
         """
 
 
index 0f52aefbf95c8415566831293f7337f4b7e75eb9..17225810f0f8664eec779b230bae92ca5dfb2ece 100644 (file)
@@ -4,10 +4,10 @@ from . import PLUGIN_MANAGER as PM
 from . import interfaces as I  # noqa: E741,N812
 
 
-class SimplePlugin(I.CanMgr, I.CanLog, I.HasOptions, I.HasCommands):
+class SimplePlugin(I.CanMgr, I.HasOptions, I.HasCommands):
     """
     Helper class that provides simplified creation of plugins:
-        - Default Mixins/Interfaces: CanMgr, CanLog, HasOptions & HasCommands
+        - Default Mixins/Interfaces: CanMgr, HasOptions & HasCommands
     - Options are defined by OPTIONS class variable, instead from get_options hook
     - Commands are created with by COMMANDS list of Commands() and handlers
     (less compact than CLICommand, but allows using method instances)