Revision 0b7c277e

View differences:

examples/limit.py
34 34
    h1.cmd( 'kill %1')
35 35
    h2.cmd( 'kill %1')
36 36

  
37
def limit( bw=1, cpu=.3 ):
37
def limit( bw=1, cpu=.4 ):
38 38
    """Example/test of link and CPU bandwidth limits
39 39
       bw: interface bandwidth limit in Mbps
40 40
       cpu: cpu limit as fraction of overall CPU time"""
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