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
b14c2a3c
Commit
b14c2a3c
authored
Jun 08, 2010
by
Martín Ferrari
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Basic skeleton
parent
324926ab
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
src/netns/__init__.py
src/netns/__init__.py
+42
-0
No files found.
src/netns/__init__.py
View file @
b14c2a3c
#!/usr/bin/env python
# vim:ts=4:sw=4:et:ai:sts=4
import
os
class
__Config
(
object
):
def
__init__
(
self
):
self
.
run_as
=
None
config
=
__Config
()
def
get_nodes
():
return
set
()
def
set_cleanup_hooks
(
on_exit
=
False
,
on_signals
=
[]):
pass
class
Node
(
object
):
def
__init__
(
self
):
self
.
pid
=
0
def
add_if
(
self
,
mac_address
=
None
,
mtu
=
None
):
return
Interface
()
def
start_process
(
self
,
args
):
return
Process
()
def
run_process
(
self
,
args
):
return
(
""
,
""
)
class
Link
(
object
):
def
connect
(
self
,
iface
):
pass
class
Interface
(
object
):
def
__init__
(
self
):
self
.
name
=
None
self
.
mac_address
=
None
def
add_v4_address
(
self
,
addr
,
prefix_len
,
broadcast
=
None
):
pass
def
add_v6_address
(
self
,
addr
,
prefix_len
):
pass
class
Process
(
object
):
def
__init__
(
self
):
self
.
pid
=
os
.
getpid
()
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