Relates to https://github.com/atlanticwave-sdx/sdx-controller/issues/161
This adds the first few items to handle link failure. The SDX controller maintains a link-connection dict in the database. When a connection is placed, the link and corresponding connection request is added to the dict. The link is formatted as a serialized list of ports (sorted by name).
When failure request comes from the LC, SDX controller first looks at the dict, if a key (link) is found, SDX will first call pce to remove the connection, then do path computation, and place the connection again.
Relates to https://github.com/atlanticwave-sdx/sdx-controller/issues/161 This adds the first few items to handle link failure. The SDX controller maintains a link-connection dict in the database. When a connection is placed, the link and corresponding connection request is added to the dict. The link is formatted as a serialized list of ports (sorted by name).
When failure request comes from the LC, SDX controller first looks at the dict, if a key (link) is found, SDX will first call pce to remove the connection, then do path computation, and place the connection again.