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
Léo-Paul Géneau
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
Show 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):
...
@@ -1053,6 +1053,11 @@ class Config(object):
"""
"""
self
.
key_file
=
None
self
.
key_file
=
None
self
.
cert_file
=
None
self
.
cert_file
=
None
# set up logging
self
.
logger
=
logging
.
getLogger
(
"slapformat"
)
self
.
logger
.
setLevel
(
logging
.
INFO
)
# Set options parameters
# Set options parameters
for
option
,
value
in
option_dict
.
__dict__
.
items
():
for
option
,
value
in
option_dict
.
__dict__
.
items
():
setattr
(
self
,
option
,
value
)
setattr
(
self
,
option
,
value
)
...
@@ -1077,9 +1082,13 @@ class Config(object):
...
@@ -1077,9 +1082,13 @@ class Config(object):
if
not
getattr
(
self
,
"interface_name"
,
None
)
\
if
not
getattr
(
self
,
"interface_name"
,
None
)
\
and
getattr
(
self
,
"bridge_name"
,
None
):
and
getattr
(
self
,
"bridge_name"
,
None
):
setattr
(
self
,
"interface_name"
,
self
.
bridge_name
)
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
)
\
if
not
getattr
(
self
,
"create_tap"
,
None
)
\
and
getattr
(
self
,
"no_bridge"
,
None
):
and
getattr
(
self
,
"no_bridge"
,
None
):
setattr
(
self
,
"create_tap"
,
not
self
.
no_bridge
)
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
# Set defaults lately
if
self
.
alter_network
is
None
:
if
self
.
alter_network
is
None
:
...
@@ -1091,9 +1100,7 @@ class Config(object):
...
@@ -1091,9 +1100,7 @@ class Config(object):
if
self
.
create_tap
is
None
:
if
self
.
create_tap
is
None
:
self
.
create_tap
=
True
self
.
create_tap
=
True
# set up logging
# Configure logging
self
.
logger
=
logging
.
getLogger
(
"slapformat"
)
self
.
logger
.
setLevel
(
logging
.
INFO
)
if
self
.
console
:
if
self
.
console
:
self
.
logger
.
addHandler
(
logging
.
StreamHandler
())
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