git://git.onelab.eu
/
plcapi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
a2b3ff7
)
Use correct gateway address for secondary interfaces.
author
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 8 Dec 2010 15:27:24 +0000
(10:27 -0500)
committer
Daniel Hokka Zakrisson
<dhokka@cs.princeton.edu>
Wed, 8 Dec 2010 15:27:24 +0000
(10:27 -0500)
PLC/Interfaces.py
patch
|
blob
|
history
diff --git
a/PLC/Interfaces.py
b/PLC/Interfaces.py
index
bd933cd
..
7e72f74
100644
(file)
--- a/
PLC/Interfaces.py
+++ b/
PLC/Interfaces.py
@@
-186,10
+186,11
@@
class Interface(Row):
# DHCP!
elif method == "static":
# DHCP!
elif method == "static":
-
if 'is_primary' in self and self['is_primary'] is True
:
-
for key in ['gateway', 'dns1'
]:
-
if key not in self or not self[key]
:
+
for key in ['gateway', 'dns1']
:
+
if key not in self or not self[key
]:
+
if 'is_primary' in self and self['is_primary'] is True
:
raise PLCInvalidArgument, "For static method primary network, %s is required" % key
raise PLCInvalidArgument, "For static method primary network, %s is required" % key
+ else:
globals()[key] = self[key]
for key in ['ip', 'network', 'broadcast', 'netmask']:
if key not in self or not self[key]:
globals()[key] = self[key]
for key in ['ip', 'network', 'broadcast', 'netmask']:
if key not in self or not self[key]: