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
Labels
Merge Requests
21
Merge Requests
21
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
nexedi
slapos.core
Commits
91cfb629
Commit
91cfb629
authored
Jun 28, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
slapformat: Add deprecation warnings
parent
73c2643e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
slapos/format.py
slapos/format.py
+10
-3
No files found.
slapos/format.py
View file @
91cfb629
...
...
@@ -1053,6 +1053,11 @@ class Config(object):
"""
self
.
key_file
=
None
self
.
cert_file
=
None
# set up logging
self
.
logger
=
logging
.
getLogger
(
"slapformat"
)
self
.
logger
.
setLevel
(
logging
.
INFO
)
# Set options parameters
for
option
,
value
in
option_dict
.
__dict__
.
items
():
setattr
(
self
,
option
,
value
)
...
...
@@ -1077,9 +1082,13 @@ class Config(object):
if
not
getattr
(
self
,
"interface_name"
,
None
)
\
and
getattr
(
self
,
"bridge_name"
,
None
):
setattr
(
self
,
"interface_name"
,
self
.
bridge_name
)
self
.
logger
.
warning
(
'bridge_name option is deprecated and should be '
'replaced by interface_name.'
)
if
not
getattr
(
self
,
"create_tap"
,
None
)
\
and
getattr
(
self
,
"no_bridge"
,
None
):
setattr
(
self
,
"create_tap"
,
not
self
.
no_bridge
)
self
.
logger
.
warning
(
'no_bridge option is deprecated and should be '
'replaced by create_tap.'
)
# Set defaults lately
if
self
.
alter_network
is
None
:
...
...
@@ -1091,9 +1100,7 @@ class Config(object):
if
self
.
create_tap
is
None
:
self
.
create_tap
=
True
# set up logging
self
.
logger
=
logging
.
getLogger
(
"slapformat"
)
self
.
logger
.
setLevel
(
logging
.
INFO
)
# Configure logging
if
self
.
console
:
self
.
logger
.
addHandler
(
logging
.
StreamHandler
())
...
...
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