def main(): usage = "usage: %prog FQDN" description = "Clears the Beaker TFTP netboot files for the given FQDN" parser = OptionParser(usage=usage, description=description) (opts, args) = parser.parse_args() if len(args) != 1: sys.stderr.write("Must specify exactly 1 FQDN to be cleared\n") sys.exit(1) # Our sanity check on the untrusted argument is that the relevant # image directory must exist in the TFTP directory or we won't # even try to delete anything fqdn = args[0] if netboot.have_images(fqdn): netboot.clear_all(fqdn)
def handle_clear_netboot(command): netboot.clear_all(command['fqdn'])
def clear(self): netboot.clear_all(TEST_FQDN, self.tftp_root)
def clear(self): netboot.clear_all(TEST_FQDN)