parser.set_defaults(command=commands.update_nodeinfo)
parser.add_argument("--domain", help="Instance name (aka. domain)")
parser.add_argument("--software", help="Name of software, e.g. 'lemmy'")
+ parser.add_argument("--mode", help="Name of detection mode, e.g. 'auto_discovery'")
parser.add_argument("--force", action="store_true", help="Forces update of data, no matter what.")
parser.add_argument("--no-software", action="store_true", help="Checks only entries with no software type detected.")
elif args.software is not None and args.software != "":
logger.info("Fetching domains for args.software='%s'", args.software)
database.cursor.execute("SELECT domain, software FROM instances WHERE software = ?", [args.software])
+ elif args.mode is not None and args.mode != "":
+ logger.info("Fetching domains for args.mode='%s'", args.mode.upper())
+ database.cursor.execute("SELECT domain, software FROM instances WHERE detection_mode = ? AND (last_nodeinfo < ? OR last_nodeinfo IS NULL)", [args.mode.upper(), time.time() - config.get("recheck_nodeinfo")])
elif args.no_software:
logger.info("Fetching domains with no software type detected ...")
database.cursor.execute("SELECT domain, software FROM instances WHERE software IS NULL AND (last_nodeinfo < ? OR last_nodeinfo IS NULL)", [time.time() - config.get("recheck_nodeinfo")])