Ejemplo n.º 1
0
    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))
Ejemplo n.º 2
0
Archivo: fping.py Proyecto: 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))
Ejemplo n.º 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'])
Ejemplo n.º 4
0
    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))