Revision 0b7c277e mininet/link.py

View differences:

mininet/link.py
33 33

  
34 34
    "Basic interface object that can configure itself."
35 35

  
36
    def __init__( self, name, node=None, port=None, link=None, **kwargs ):
36
    def __init__( self, name, node=None, port=None, link=None, **params ):
37 37
        """name: interface name (e.g. h1-eth0)
38 38
           node: owning node (where this intf most likely lives)
39 39
           link: parent link if we're part of a link
......
44 44
        self.mac, self.ip, self.prefixLen = None, None, None
45 45
        # Add to node (and move ourselves if necessary )
46 46
        node.addIntf( self, port=port )
47
        self.config( **kwargs )
47
        # Save params for future reference
48
        self.params = params
49
        self.config( **params )
48 50

  
49 51
    def cmd( self, *args, **kwargs ):
50 52
        "Run a command in our owning node"

Also available in: Unified diff