X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=PLC%2FNodeNetworks.py;h=a25c366c7bfe9571a70edf20052276d3ad37dee1;hb=50b5e3df1e68dd79876aec2a0da620a50fffd369;hp=8733f8d352b42f7fa34f1a89ef0d4edfd3e1be9b;hpb=46f99b0a050a04f27b6c7a8cdb9d48368b20d0bb;p=plcapi.git diff --git a/PLC/NodeNetworks.py b/PLC/NodeNetworks.py index 8733f8d..a25c366 100644 --- a/PLC/NodeNetworks.py +++ b/PLC/NodeNetworks.py @@ -4,7 +4,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: NodeNetworks.py,v 1.15 2006/11/09 19:43:55 mlhuang Exp $ +# $Id: NodeNetworks.py,v 1.16 2006/11/25 09:41:14 thierry Exp $ # from types import StringTypes @@ -109,6 +109,15 @@ class NodeNetwork(Row): 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: