Commit 26ded0cf authored by Antoine Durand-Gasselin's avatar Antoine Durand-Gasselin
Browse files

[gen_confs/switchs.py] more opts

darcs-hash:20090302175301-bd074-b3c60d90f9fa8a7744991bae237d225ce13e313d.gz
parent cfb77c93
......@@ -486,16 +486,16 @@ aaa port-access mac-based %(prise)s unauth-vid 1
fd.close()
if __name__ == '__main__' :
opts, args = getopt.getopt(sys.argv[1:], 'hga', ['get-conf', 'help'])
opts, args = getopt.getopt(sys.argv[1:], 'hga', ['get-conf', 'help', 'all'])
if '-h' in sys.argv or '--help' in sys.argv or len(sys.argv) == 1 :
print "%s [-g|--get-conf] <switch>" % sys.argv[0].split('/')[-1].split('.')[0]
print "Gnration du fichier de configuration des switchs donns."
sys.exit(255)
if sys.argv[1] == 'all' :
if args[0] == 'all' or 'a' in opts or '--all' in opts :
switchs = tuple(all_switchs())
else :
switchs = tuple(sys.argv[1:])
switchs = tuple(args)
sw = switch(switchs)
sw.debug = 1
sw.reconfigure()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment