diff --git a/gestion/gen_confs/switchs.py b/gestion/gen_confs/switchs.py index fe2fb740..42a4e325 100644 --- a/gestion/gen_confs/switchs.py +++ b/gestion/gen_confs/switchs.py @@ -299,6 +299,11 @@ exit old_config.close() self.aff.cycle() + elif '--header' in options: + for opt, arg in opts: + if opt == '--header': + params['switch_config_header'] = arg + break else: params['switch_config_header']= '; J4899A Configuration Editor; Created on release #H.10.50' @@ -521,7 +526,7 @@ 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', 'all']) + opts, args = getopt.getopt(sys.argv[1:], 'hga', ['get-conf', 'help', 'all', 'header=' ]) if '-h' in sys.argv or '--help' in sys.argv or len(sys.argv) == 1 : print "%s [-g|--get-conf] " % sys.argv[0].split('/')[-1].split('.')[0] print "Génération du fichier de configuration des switchs donnés."