Commit c5cc2f5b authored by Cédric de Saint Martin's avatar Cédric de Saint Martin

Merge branch 'no_bridge'

parents 2aef3d12 73935be5
...@@ -699,6 +699,11 @@ class Interface(object): ...@@ -699,6 +699,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
...@@ -1174,12 +1179,6 @@ def main(*args): ...@@ -1174,12 +1179,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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment