git://git.onelab.eu
/
pyplnet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ebf067a
)
GENICLOUD-31 Ignore BRIDGE tag if IFNAME tag is not set.
author
Marco Yuen
<marcoy@gmail.com>
Sun, 10 Jul 2011 18:14:48 +0000
(14:14 -0400)
committer
Marco Yuen
<marcoy@gmail.com>
Sun, 10 Jul 2011 18:14:48 +0000
(14:14 -0400)
plnet.py
patch
|
blob
|
history
diff --git
a/plnet.py
b/plnet.py
index
540a699
..
9768c30
100755
(executable)
--- a/
plnet.py
+++ b/
plnet.py
@@
-155,14
+155,10
@@
def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
else:
logger.log("net:InitInterfaces WARNING: interface alias (%s) not matched to an interface"% details['ALIAS'])
device_id -= 1
else:
logger.log("net:InitInterfaces WARNING: interface alias (%s) not matched to an interface"% details['ALIAS'])
device_id -= 1
- elif 'BRIDGE' in details:
- #The bridge inherits the mac of the first attached interface.
- if 'IFNAME' in details:
- ifname = details['IFNAME']
- device_id -= 1
- else:
- ifname = 'eth0'
- device_id -= 1
+ elif 'BRIDGE' in details and 'IFNAME' in details:
+ # The bridge inherits the mac of the first attached interface.
+ ifname = details['IFNAME']
+ device_id -= 1
logger.log('net:InitInterfaces: Bridge detected. Adding %s to devices_map' % ifname)
devices_map[ifname] = removeBridgedIfaceDetails(details)
bridgeName = details['BRIDGE']
logger.log('net:InitInterfaces: Bridge detected. Adding %s to devices_map' % ifname)
devices_map[ifname] = removeBridgedIfaceDetails(details)
bridgeName = details['BRIDGE']