def LastScanned(self): scan = Scan() args = self.Args() scan.set_args(args) last_scanned = scan.get_last_time_all_scanned() if last_scanned: return last_scanned.strftime("%Y-%m-%d %H:%M:%S") return "Last scan time was not found"
def _ScanSetup(self, scan_targets, scanner, scan_type, rootfs, _all, images, containers): scan = Scan() args = self.Args() scan.useTTY = False if scan_targets: args.scan_targets = scan_targets if scanner: args.scanner = scanner if scan_type: args.scan_type = scan_type if len(scan_targets): args.scan_targets = scan_targets args.rootfs = rootfs args.all = _all args.images = images args.containers = containers scan.set_args(args) return scan
def ScanList(self): scan_list = Scan() args = self.Args() scan_list.set_args(args) return json.dumps(scan_list.get_scanners_list())
def ScanList(self): scan_list = Scan() args = self.Args() scan_list.set_args(args) return scan_list.get_scanners_list()