Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
re2o-firewall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Nounous
re2o-firewall
Commits
7d7c7f2f
Commit
7d7c7f2f
authored
Jul 11, 2018
by
chirac
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rattrappage de l'erreur si l'apply conf marche pas
parent
21b25f1c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
6 deletions
+4
-6
main.py
main.py
+4
-6
No files found.
main.py
View file @
7d7c7f2f
...
...
@@ -21,7 +21,6 @@ api_client = Re2oAPIClient(api_hostname, api_username, api_password)
client_hostname
=
socket
.
gethostname
().
split
(
'.'
,
1
)[
0
]
print
(
"get switchs conf"
)
all_switchs
=
api_client
.
list
(
"switchs/ports-config/"
)
# Création de l'environnement Jinja
...
...
@@ -146,14 +145,13 @@ class Switch:
with
open
(
"generated/"
+
self
.
get_conf_file_name
(),
'w+'
)
as
f
:
f
.
write
(
self
.
conf
)
print
(
"gen tpl"
)
sw
=
Switch
()
for
switch
in
all_switchs
:
sw
.
switch
=
switch
sw
.
gen_conf_and_write
()
try
:
sw
.
apply_conf
()
# sw.gen_conf_hp()
# sw.write_conf()
except
:
print
(
"Erreur dans l'application de la conf pour "
+
switch
[
"short_name"
])
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