hil
hil copied to clipboard
Have revert_port() set VLANs based on HIL DB
There are many use cases, where a sysadmin would want HIL to set a port's state to "whatever HIL thinks it should be". These include:
- A switch or port gets replaced and all of the hosts are moved to the new one
- Someone outside of HIL manually changes a port, and we need to be sure it's back to what we think it should be
I propose that the meaning of revert_port() be changed from "Ensure nothing is connected" to "whatever HIL thinks it should be".
While doing this, it might make more sense to rename revert_port() to reset_port(), since it's really resetting the port to whatever HIL thought it should be, rather than "reverting" it to something it was in the past. Thus, reset_port() is a superset of what revert_port() does today, and I don't foresee needing a separate function to just remove networks like it does now.