Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
nemu3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
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
nexedi
nemu3
Commits
58c62d73
Commit
58c62d73
authored
May 26, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
misc
parent
dba7c881
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
3 deletions
+13
-3
MANIFEST
MANIFEST
+7
-2
sample-api.py
sample-api.py
+5
-1
t/node.py
t/node.py
+1
-0
No files found.
MANIFEST
View file @
58c62d73
COPYING
Makefile
sample-api.py
setup.cfg
setup.py
src/netns/__init__.py
COPYING
Makefile
t/core.py
t/interfaces.py
t/node.py
t/subprocess.py
t/routing.py
sample-api.py
View file @
58c62d73
...
...
@@ -45,13 +45,17 @@ link0.connect(if1)
# ppp0 = netns.PPPLink(a, b, bandwidth = ....)
# if0 = ppp0.interface(a)
# Add and connect a tap device (as if a external router were plugged into a
# switch)
link0
.
add_tunnel_if
()
link0
.
enabled
=
True
if0
.
enabled
=
True
if1
.
enabled
=
True
# addresses as iproute
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
,
broadcast
=
'10.1.0.255'
)
...
...
t/node.py
View file @
58c62d73
...
...
@@ -50,6 +50,7 @@ class TestNode(unittest.TestCase):
ipcmd
.
wait
()
return
outdata
.
split
(
"
\
n
"
)
# Test automatic destruction
orig_devs
=
len
(
get_devs
())
create_stuff
()
self
.
assertEquals
(
netns
.
get_nodes
(),
set
())
...
...
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