Revision ac65ea3f mininet/util.py

View differences:

mininet/util.py
80 80
    #lg.info(' output: %s\n' % output)
81 81
    links = node.cmd('ip link show')
82 82
    if not intf in links:
83
        lg.error('*** Error: move_intf: % not successfully moved to %s:\n' %
83
        lg.error('*** Error: move_intf: %s not successfully moved to %s:\n' %
84 84
                 (intf, node.name))
85 85
        return False
86 86
    return True
......
152 152
# delay between interface move checks in seconds
153 153
MOVEINTF_DELAY = 0.0001
154 154

  
155
CREATE_LINK_RETRIES = 10
156

  
155 157
def createLink(node1, node2):
156 158
    '''Create a link between nodes, making an interface for each.
157 159

  
......
162 164
    intf2 = node2.newIntf()
163 165
    makeIntfPair(intf1, intf2)
164 166
    if node1.inNamespace:
165
        retry(3, MOVEINTF_DELAY, moveIntf, intf1, node1)
167
        retry(CREATE_LINK_RETRIES, MOVEINTF_DELAY, moveIntf, intf1, node1)
166 168
    if node2.inNamespace:
167
        retry(3, MOVEINTF_DELAY, moveIntf, intf2, node2)
169
        retry(CREATE_LINK_RETRIES, MOVEINTF_DELAY, moveIntf, intf2, node2)
168 170
    node1.connection[intf1] = (node2, intf2)
169 171
    node2.connection[intf2] = (node1, intf1)
170 172
    return intf1, intf2

Also available in: Unified diff