Loading cloudcontrol/node/host/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ from subprocess import Popen, PIPE, STDOUT from sjrpc.utils import pass_connection, threadless from sjrpc.core.protocols import TunnelProtocol from cloudcontrol.common.client.tags import Tag, tag_inspector from cloudcontrol.common.client.plugins import Base as BasePlugin from cloudcontrol.node.plugins import Base as BasePlugin from cloudcontrol.node.host import tags Loading cloudcontrol/node/plugins.pydeleted 100644 → 0 +0 −47 Original line number Diff line number Diff line """Plugins helpers for Cloud Control node.""" from cloudcontrol.node.tags import TagDB class Base(object): """Example skeleton plugin for cc-node. If you want to create your own plugin for the `cc-node` you may create an object that would quack just like this one or just inherit from this class. """ def __init__(self, *args, **kwargs): """ :param loop: MainLoop instance """ #: MainLoop instance self.main = kwargs.pop('loop') # plugins may define tags (see :mod:`ccnode.tags`) self.tag_db = TagDB() # plugins may define handler functions that would be called by the # server self.rpc_handler = dict() # tag_db and rpc_handler can be implemented as properties if more logic # is needed def __hash__(self): """This method is used when registering a plugin in the main loop. By default, only one instance is allowed. Subclasses can overide this method to change this behaviour. """ return hash(self.__class__.__name__) def start(self): """Used to start pyev watchers.""" pass def stop(self): """Cleanup for plugins, can be used to clean pyev watchers.""" self.main = None # TODO dependencies Loading
cloudcontrol/node/host/__init__.py +1 −1 Original line number Diff line number Diff line Loading @@ -16,8 +16,8 @@ from subprocess import Popen, PIPE, STDOUT from sjrpc.utils import pass_connection, threadless from sjrpc.core.protocols import TunnelProtocol from cloudcontrol.common.client.tags import Tag, tag_inspector from cloudcontrol.common.client.plugins import Base as BasePlugin from cloudcontrol.node.plugins import Base as BasePlugin from cloudcontrol.node.host import tags Loading
cloudcontrol/node/plugins.pydeleted 100644 → 0 +0 −47 Original line number Diff line number Diff line """Plugins helpers for Cloud Control node.""" from cloudcontrol.node.tags import TagDB class Base(object): """Example skeleton plugin for cc-node. If you want to create your own plugin for the `cc-node` you may create an object that would quack just like this one or just inherit from this class. """ def __init__(self, *args, **kwargs): """ :param loop: MainLoop instance """ #: MainLoop instance self.main = kwargs.pop('loop') # plugins may define tags (see :mod:`ccnode.tags`) self.tag_db = TagDB() # plugins may define handler functions that would be called by the # server self.rpc_handler = dict() # tag_db and rpc_handler can be implemented as properties if more logic # is needed def __hash__(self): """This method is used when registering a plugin in the main loop. By default, only one instance is allowed. Subclasses can overide this method to change this behaviour. """ return hash(self.__class__.__name__) def start(self): """Used to start pyev watchers.""" pass def stop(self): """Cleanup for plugins, can be used to clean pyev watchers.""" self.main = None # TODO dependencies