dana-i2cat/opennaas — pull request #53 by isartcanyameres (2012-03-16 10:04:10+00:00)
Title: Feature/add interface to lr moves all interface config

This patch fixes a bug regarding interface configuration being lost when interface is added to a logical router:
http://jira.i2cat.net:8080/browse/OPENNAAS-217

From the user point of view, chassis:addInterface and chassisRemoveInterface CLI commands are replaced by chassis:addInterfaceToLR and chassis:removeInterfaceFromLR ones.

These commands call newly created actions that, when executed, retrieve desired interface configuration from the source router and move it to the target one with no change.

chassis:createLogicalRouter command has also changed, as it requires calling addInterfaceToLRAction.

Checking if LR in use is active should be moved from the commands to the actions. But actions are not able to get this information right now. Hence, actions do not check that. That's a TODO.

What they do check is the existence in the source router of the interface to transfer. They fail if it is not there.

This feature has been tested and all tests pass.