+ self.maxexemptrate,
+ ByteMax,
+ ExemptByteMax,
+ ByteThresh,
+ ExemptByteThresh,
+ avgrate,
+ avgexemptrate) = vals
+
+ # The shitty bit. Gotta bias the limits so as not to overflow xmlrpc
+ self.ByteMax = ByteMax * 1024
+ self.ByteThresh = ByteMax * 1024
+ self.ExemptByteMax = ExemptByteMax * 1024
+ self.ExemptByteThresh = ExemptByteThresh * 1024
+
+ # The hack here is that when i pass 0 to the xmlrpc request to NM,
+ # for rate limits and it comes back non zero, then screw the byte limits.
+ # Mult by the period and recompute the byte limits. The thought is
+ # If/when PLC switches to byte limits, the avgrates wont be used as
+ # slice attributes and will return as 0
+ if (avgrate != 0):
+ self.ByteMax = avgrate * period