Bug 3712: SFP validation of SF types at creation time
This commit makes use of DOMDataTreeCommitCohorts (callbacks
that can be registered in order to participate in commit
validation) in order to make sure that newly-added datastore
SFPs are consistent with previously defined SFCs and SFs.
Specifically, it is checked that the types for the SFs the
SFP references are consistent with the SF types that the
SFC specifies.
Since the datastore commit transaction is kept open during
validation, this validation must be as fast as possible.
Controller guidelines about not opening new datastore
reads in order to validate a DS write have been followed
to the maximum extent; for this reason, a datastore cache
has been deployed to cover both SFs and SFCs. On systems
with less than 500 SFs & SFCs deployed, caches will provide
total coverage (i.e. validation will never need to access
datastore)
Testing: manually tested (complex interactions between
controller-mdsal-scf are too hard to simulate). Proper CSIT
tests will be delivered to the sfc suites in the integration
project.
Change-Id: I5886d0be9191043aa8227c242a1498e518b31a38
Signed-off-by: Diego Granados <diego.jesus.granados.lopez@ericsson.com>