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
Arnaud Véron
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):
...
@@ -697,6 +697,11 @@ class Interface(object):
for
q
in
netifaces
.
ifaddresses
(
interface_name
)[
af
]]:
for
q
in
netifaces
.
ifaddresses
(
interface_name
)[
af
]]:
# add an address
# add an address
callAndRead
([
'ip'
,
'addr'
,
'add'
,
address_string
,
'dev'
,
interface_name
])
callAndRead
([
'ip'
,
'addr'
,
'add'
,
address_string
,
'dev'
,
interface_name
])
# Fake success for local ipv4
if
not
ipv6
:
return
True
# wait few moments
# wait few moments
time
.
sleep
(
2
)
time
.
sleep
(
2
)
# check existence on interface
# check existence on interface
...
@@ -1170,12 +1175,6 @@ def main(*args):
...
@@ -1170,12 +1175,6 @@ def main(*args):
else
:
else
:
return
0
,
''
return
0
,
''
callAndRead
=
dry_callAndRead
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
):
def
fake_getpwnam
(
user
):
class
result
(
object
):
class
result
(
object
):
pw_uid
=
12345
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