Closed edvgui closed 2 years ago
Implementation proposal:
set_...
operations from the service to the IpModelBase
object. Those operations should return a copy of the object after the modification has been applied.IpModelBase
if possible, to decrease the chances of any bad usage of the servicesIpModelBase
object, in an attribute probably, this object should be used to run any command to apply any modification. IpBaseModel
object should have a load/reload/clone method, taking the identifier and the host in attribute and returning a copy of the object in the latest state on the hostset_...
operations shouldn't use the get_one
method from the service, but the load/reload/clone method from the object
When moving an interface to another namespace while the interface is up, the server will bring it down, move it, then put it back up again. The latest action will raise a 404 because the server still tries to find the interface where it used to be, not where it has been found.
The interface is actually moved as expected, but will stay in a down state.
There is already a mechanism to handle those kind of situation in the code: we attach the host the interface is on to each interface object we generate, that way we know on which host to run the next action for this interface. This mechanism has some week points and should be reviewed/improved.
To reproduce it: