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:
e3abaaa
)
in 4.3 InterfaceTag (and NodeNetworkSetting) has "tagname" key instead of "name"
author
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Thu, 16 Apr 2009 13:46:12 +0000
(13:46 +0000)
committer
Barış Metin
<Talip-Baris.Metin@sophia.inria.fr>
Thu, 16 Apr 2009 13:46:12 +0000
(13:46 +0000)
plnet.py
patch
|
blob
|
history
diff --git
a/plnet.py
b/plnet.py
index
2c06d06
..
5b0c667
100755
(executable)
--- a/
plnet.py
+++ b/
plnet.py
@@
-109,11
+109,15
@@
def InitInterfaces(logger, plc, data, root="", files_only=False, program="NodeMa
for setting in settings:
# to explicitly set interface name
for setting in settings:
# to explicitly set interface name
- settingname = setting['name'].upper()
+ name_key = "name"
+ if version == 4.3:
+ name_key = "tagname"
+
+ settingname = setting[name_key].upper()
if settingname in ('IFNAME','ALIAS','CFGOPTIONS','DRIVER'):
inter[settingname]=setting['value']
else:
if settingname in ('IFNAME','ALIAS','CFGOPTIONS','DRIVER'):
inter[settingname]=setting['value']
else:
- logger.log("net:InitInterfaces WARNING: ignored setting named %s"%setting[
'name'
])
+ logger.log("net:InitInterfaces WARNING: ignored setting named %s"%setting[
name_key
])
# support aliases to interfaces either by name or HWADDR
if 'ALIAS' in inter:
# support aliases to interfaces either by name or HWADDR
if 'ALIAS' in inter: