Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Benjamin Graillot
scripts
Commits
26ded0cf
Commit
26ded0cf
authored
Mar 02, 2009
by
Antoine Durand-Gasselin
Browse files
[gen_confs/switchs.py] more opts
darcs-hash:20090302175301-bd074-b3c60d90f9fa8a7744991bae237d225ce13e313d.gz
parent
cfb77c93
Changes
1
Hide whitespace changes
Inline
Side-by-side
gestion/gen_confs/switchs.py
View file @
26ded0cf
...
...
@@ -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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment