Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
slapos.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
Nicolas Wavrant
slapos.core
Commits
aad13817
Commit
aad13817
authored
Jun 06, 2017
by
Tomáš Peterka
Committed by
Rafael Monnerat
Jun 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[format] Use own logger for logging because the builtin is used for testing
parent
81748d83
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
slapos/format.py
slapos/format.py
+7
-3
No files found.
slapos/format.py
View file @
aad13817
...
@@ -60,6 +60,10 @@ from slapos.util import mkdir_p
...
@@ -60,6 +60,10 @@ from slapos.util import mkdir_p
import
slapos.slap
as
slap
import
slapos.slap
as
slap
from
slapos
import
version
from
slapos
import
version
logger
=
logging
.
getLogger
(
"slapos.format"
)
def
prettify_xml
(
xml
):
def
prettify_xml
(
xml
):
root
=
lxml
.
etree
.
fromstring
(
xml
)
root
=
lxml
.
etree
.
fromstring
(
xml
)
return
lxml
.
etree
.
tostring
(
root
,
pretty_print
=
True
)
return
lxml
.
etree
.
tostring
(
root
,
pretty_print
=
True
)
...
@@ -946,9 +950,9 @@ class Interface(object):
...
@@ -946,9 +950,9 @@ class Interface(object):
if
self
.
isBridge
():
if
self
.
isBridge
():
callAndRead
([
'brctl'
,
'addif'
,
self
.
name
,
tap
.
name
])
callAndRead
([
'brctl'
,
'addif'
,
self
.
name
,
tap
.
name
])
else
:
else
:
self
.
logger
.
warning
(
"Interface slapos.cfg:interface_name={} is not a bridge."
logger
.
warning
(
"Interface slapos.cfg:interface_name={} is not a bridge."
"TUN/TAP interface {} might not have internet connection."
"TUN/TAP interface {} might not have internet connection."
""
.
format
(
self
.
name
,
tap
.
name
))
""
.
format
(
self
.
name
,
tap
.
name
))
def
_addSystemAddress
(
self
,
address
,
netmask
,
ipv6
=
True
):
def
_addSystemAddress
(
self
,
address
,
netmask
,
ipv6
=
True
):
"""Adds system address to interface
"""Adds system address to interface
...
...
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