From 3d1d0300ec7402908a348260db7c1bacefac1ea6 Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sat, 23 Oct 2010 01:00:56 +0200 Subject: [PATCH] =?UTF-8?q?[switchs]=20ajout=20d'une=20option=20header=20p?= =?UTF-8?q?our=20ne=20pas=20avoir=20besoin=20de=20se=20connecter=20au=20sw?= =?UTF-8?q?itch=20pour=20g=C3=A9n=C3=A9rer=20une=20conf=20correcte...?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit darcs-hash:20101022230056-ffbb2-a6f72dd8ba1ed10bc7d89cf630ad85948aed1d30.gz --- gestion/gen_confs/switchs.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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."