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)
Exemple #2
0
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)
Exemple #3
0
def handle_clear_netboot(command):
    netboot.clear_all(command['fqdn'])
Exemple #4
0
 def clear(self):
     netboot.clear_all(TEST_FQDN, self.tftp_root)
Exemple #5
0
def handle_clear_netboot(command):
    netboot.clear_all(command['fqdn'])
Exemple #6
0
 def clear(self):
     netboot.clear_all(TEST_FQDN)
Exemple #7
0
 def clear(self):
     netboot.clear_all(TEST_FQDN)
Exemple #8
0
 def clear(self):
     netboot.clear_all(TEST_FQDN, self.tftp_root)