vapor-ware/netbox-virtual-circuit-plugin

VCID modeling problem

Closed this issue · 2 comments

As per networkapi specs the maximum allowed vcid number should be 4294967295(2^32-1) rather then present maximum number which is 32767.

The current maximum value for a VCID is 32767 is because it models after the PositiveSmallIntegerField. If I changed it to PositiveIntegerField, the maximum value would become 2147483647 or 2^31 - 1, but not 2^32 - 1 as mentioned above. If we want it to go over 2^31 - 1, then BigIntegerField might suffice though it doesn't put any constraint on negative numbers as it's also capped at 2^63 - 1, which I don't think we would want to have.

Any idea @marcoceppi, @edaniszewski?

We should do negative number validation at the controller level and see if we can set a maximum integer size at the database column level.

Either that or just have the controller validate via maximum virtual circuit size