Basic interface object that can configure itself.
More...
|
def | __init__ (self, name, node=None, port=None, link=None, mac=None, **params) |
|
def | cmd (self, *args, **kwargs) |
| Run a command in our owning node.
|
|
def | ifconfig (self, *args) |
| Configure ourselves using ifconfig.
|
|
def | setIP (self, ipstr, prefixLen=None) |
| Set our IP address.
|
|
def | setMAC (self, macstr) |
| Set the MAC address for an interface. More...
|
|
def | updateIP (self) |
| Return updated IP address based on ifconfig.
|
|
def | updateMAC (self) |
| Return updated MAC address based on ifconfig.
|
|
def | updateAddr (self) |
| Return IP address and MAC address based on ifconfig.
|
|
def | IP (self) |
| Return IP address.
|
|
def | MAC (self) |
| Return MAC address.
|
|
def | isUp (self, setUp=False) |
| Return whether interface is up.
|
|
def | rename (self, newname) |
| Rename interface.
|
|
def | setParam (self, results, method, **param) |
| Internal. More...
|
|
def | config (self, mac=None, ip=None, ifconfig=None, up=True, **_params) |
| Configure Node according to (optional) More...
|
|
def | delete (self) |
| Delete interface.
|
|
def | status (self) |
| Return intf status as a string.
|
|
def | __repr__ (self) |
|
def | __str__ (self) |
|
|
| node |
|
| name |
|
| link |
|
| mac |
|
| prefixLen |
|
| ip |
|
| params |
|
Basic interface object that can configure itself.
◆ __init__()
def mininet.link.Intf.__init__ |
( |
|
self, |
|
|
|
name, |
|
|
|
node = None , |
|
|
|
port = None , |
|
|
|
link = None , |
|
|
|
mac = None , |
|
|
** |
params |
|
) |
| |
- Parameters
-
name | interface name (e.g. h1-eth0) |
node | owning node (where this intf most likely lives) |
link | parent link if we're part of a link other arguments are passed to config() |
◆ config()
def mininet.link.Intf.config |
( |
|
self, |
|
|
|
mac = None , |
|
|
|
ip = None , |
|
|
|
ifconfig = None , |
|
|
|
up = True , |
|
|
** |
_params |
|
) |
| |
Configure Node according to (optional)
- Parameters
-
parameters | |
mac | MAC address |
ip | IP address |
ifconfig | arbitrary interface configuration Subclasses should override this method and call the parent class's config(**params) |
◆ setMAC()
def mininet.link.Intf.setMAC |
( |
|
self, |
|
|
|
macstr |
|
) |
| |
Set the MAC address for an interface.
- Parameters
-
macstr | MAC address as string |
◆ setParam()
def mininet.link.Intf.setParam |
( |
|
self, |
|
|
|
results, |
|
|
|
method, |
|
|
** |
param |
|
) |
| |
Internal.
- Parameters
-
method | configure a single parameter |
results | dict of results to update |
method | config method name |
param | arg=value (ignore if value=None) value may also be list or dict |
The documentation for this class was generated from the following file: