示例#1
0
    def _broadcast_message(self, msg):
        cnf = bus.cnf
        platform = bus.platform

        msg.local_ip = platform.get_private_ip()
        msg.remote_ip = platform.get_public_ip()
        msg.behaviour = config.split(cnf.rawini.get(config.SECT_GENERAL, config.OPT_BEHAVIOUR))
        msg.role_name = cnf.rawini.get(config.SECT_GENERAL, config.OPT_ROLE_NAME)
示例#2
0
    def __init__(self):
        self._logger = logging.getLogger(__name__)
        self._handlers_chain = None
        cnf = bus.cnf
        platform = bus.platform

        LOG.debug("Initializing message listener")
        self._accept_kwargs = dict(behaviour=config.split(
            cnf.rawini.get(config.SECT_GENERAL, config.OPT_BEHAVIOUR)),
                                   platform=platform.name,
                                   os=platform_module.uname(),
                                   dist=platform_module.dist())
        LOG.debug("Keywords for each Handler::accept\n%s",
                  pprint.pformat(self._accept_kwargs))

        self.get_handlers_chain()