I have been automating some management network changes, namely breaking up a larger subnet/VLAN into much smaller subnets/VLANs. For this, I am using Python and the "HNMP" library to configure these settings on all the different types of radios we have in our network. I had a script that was working mostly well (Except for those pesky PMP320 CPEs...), though after a recent ePMP software update I noticed script would fail when it's setting the subnet mask and I would get an error that says "Bad Value".
After banging my head against the wall for way too long, I found that the issue was because there seems to be some added input validation on the subnet mask field that prevents you from making a silly mistake like changing the subnet mask to one that would put the default gateway outside the subnet. To work around this, I had to change the flow of my script that was previously: