Commit 58c62d73 authored by Martín Ferrari's avatar Martín Ferrari

misc

parent dba7c881
COPYING
Makefile
sample-api.py
setup.cfg setup.cfg
setup.py setup.py
src/netns/__init__.py src/netns/__init__.py
COPYING
Makefile
t/core.py t/core.py
t/interfaces.py
t/node.py
t/subprocess.py
t/routing.py
...@@ -45,13 +45,17 @@ link0.connect(if1) ...@@ -45,13 +45,17 @@ link0.connect(if1)
# ppp0 = netns.PPPLink(a, b, bandwidth = ....) # ppp0 = netns.PPPLink(a, b, bandwidth = ....)
# if0 = ppp0.interface(a) # if0 = ppp0.interface(a)
# Add and connect a tap device (as if a external router were plugged into a # Add and connect a tap device (as if a external router were plugged into a
# switch) # switch)
link0.add_tunnel_if() link0.add_tunnel_if()
link0.enabled = True
if0.enabled = True
if1.enabled = True
# addresses as iproute # addresses as iproute
if0.add_v4_address(addr = '10.0.0.1', prefix_len = 24) if0.add_v4_address(addr = '10.0.0.1', prefix_len = 24)
if0.add_v6_address(addr = 'fe80::222:19ff:fe22:615d', prefix_len = 64)
if1.add_v4_address(addr = '10.0.0.2', prefix_len = 24, if1.add_v4_address(addr = '10.0.0.2', prefix_len = 24,
broadcast = '10.1.0.255') broadcast = '10.1.0.255')
......
...@@ -50,6 +50,7 @@ class TestNode(unittest.TestCase): ...@@ -50,6 +50,7 @@ class TestNode(unittest.TestCase):
ipcmd.wait() ipcmd.wait()
return outdata.split("\n") return outdata.split("\n")
# Test automatic destruction
orig_devs = len(get_devs()) orig_devs = len(get_devs())
create_stuff() create_stuff()
self.assertEquals(netns.get_nodes(), set()) self.assertEquals(netns.get_nodes(), set())
......
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