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
18
Merge Requests
18
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
73935be5
Commit
73935be5
authored
Apr 23, 2012
by
Cédric de Saint Martin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove monkey patching of AddAddr that returns always true
parent
59f48f8d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
slapos/format.py
slapos/format.py
+5
-6
No files found.
slapos/format.py
View file @
73935be5
...
...
@@ -697,6 +697,11 @@ class Interface(object):
for
q
in
netifaces
.
ifaddresses
(
interface_name
)[
af
]]:
# add an address
callAndRead
([
'ip'
,
'addr'
,
'add'
,
address_string
,
'dev'
,
interface_name
])
# Fake success for local ipv4
if
not
ipv6
:
return
True
# wait few moments
time
.
sleep
(
2
)
# check existence on interface
...
...
@@ -1170,12 +1175,6 @@ def main(*args):
else
:
return
0
,
''
callAndRead
=
dry_callAndRead
real_addSystemAddress
=
Interface
.
_addSystemAddress
def
fake_addSystemAddress
(
*
args
,
**
kw
):
real_addSystemAddress
(
*
args
,
**
kw
)
# Fake success
return
True
Interface
.
_addSystemAddress
=
fake_addSystemAddress
def
fake_getpwnam
(
user
):
class
result
(
object
):
pw_uid
=
12345
...
...
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