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 (parent:
096106a
)
- do not allow bwlimit values under 500000
author
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 May 2007 20:22:55 +0000
(20:22 +0000)
committer
Tony Mack
<tmack@cs.princeton.edu>
Fri, 11 May 2007 20:22:55 +0000
(20:22 +0000)
PLC/NodeNetworks.py
patch
|
blob
|
history
diff --git
a/PLC/NodeNetworks.py
b/PLC/NodeNetworks.py
index
8733f8d
..
a25c366
100644
(file)
--- a/
PLC/NodeNetworks.py
+++ b/
PLC/NodeNetworks.py
@@
-4,7
+4,7
@@
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: NodeNetworks.py,v 1.1
5 2006/11/09 19:43:55 mlhuang
Exp $
+# $Id: NodeNetworks.py,v 1.1
6 2006/11/25 09:41:14 thierry
Exp $
#
from types import StringTypes
#
from types import StringTypes
@@
-109,6
+109,15
@@
class NodeNetwork(Row):
validate_dns1 = validate_ip
validate_dns2 = validate_ip
validate_dns1 = validate_ip
validate_dns2 = validate_ip
+ def validate_bwlimit(self, bwlimit):
+ if not bwlimit:
+ return bwlimit
+
+ if bwlimit < 500000:
+ raise PLCInvalidArgument, 'Minimum bw is 500 kbs'
+
+ return bwlimit
+
def validate_hostname(self, hostname):
# Optional
if not hostname:
def validate_hostname(self, hostname):
# Optional
if not hostname: