예제 #1
0
파일: fping.py 프로젝트: stmille/vaping
    def __init__(self, config, ctx):
        super(FPingBase, self).__init__(config, ctx)

        if not which(self.pluginmgr_config['command']):
            self.log.critical("missing fping, install it or set `command` in the fping config")
            raise RuntimeError("fping command not found")

        self.count = int(self.pluginmgr_config.get('count', 0))
예제 #2
0
파일: fping.py 프로젝트: 20c/vaping
    def __init__(self, config, ctx):
        super(FPingBase, self).__init__(config, ctx)

        if not which(self.config['command']):
            self.log.critical("missing fping, install it or set `command` in the fping config")
            raise RuntimeError("fping command not found - install the fping package")

        self.count = int(self.config.get('count', 0))
        self.period = int(self.config.get('period', 0))
예제 #3
0
    def init(self):
        if not which(self.config['command']):
            self.log.critical("missing fping, install it or set `command` in the fping config")

            raise RuntimeError("fping command not found")

        self.hosts = []
        for k,v in list(self.config.items()):
            # dict means it's a group
            if isinstance(v, collections.Mapping):
                self.hosts.extend(v['hosts'])
예제 #4
0
파일: fping.py 프로젝트: tcrichton/vaping
    def __init__(self, config, ctx):
        super().__init__(config, ctx)

        if not which(self.config["command"]):
            self.log.critical(
                "missing fping, install it or set `command` in the fping config"
            )
            raise RuntimeError(
                "fping command not found - install the fping package")

        self.count = int(self.config.get("count", 0))
        self.period = int(self.config.get("period", 0))