Bug 3712: SFP validation of SF types at creation time 59/50559/10
authorDiego Granados <diego.jesus.granados.lopez@ericsson.com>
Mon, 16 Jan 2017 10:58:39 +0000 (11:58 +0100)
committerBrady Johnson <brady.allen.johnson@ericsson.com>
Mon, 6 Feb 2017 09:02:03 +0000 (09:02 +0000)
commitcaa282a7055d47cb66504781ac12d0eb575964af
treef81b8f8d36640a9e4f16f861949363f087bcbaec
parentdcedab37d76ea335121222c1017597d55c86d46e
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>
sfc-provider/pom.xml
sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/ServiceFunctionChainListener.java [new file with mode: 0644]
sfc-provider/src/main/java/org/opendaylight/sfc/provider/listeners/ServiceFunctionListener.java
sfc-provider/src/main/java/org/opendaylight/sfc/provider/validators/ServiceFunctionPathCohort.java [new file with mode: 0644]
sfc-provider/src/main/java/org/opendaylight/sfc/provider/validators/ServiceFunctionPathValidator.java [new file with mode: 0644]
sfc-provider/src/main/java/org/opendaylight/sfc/provider/validators/util/DataValidationFailedWithMessageException.java [new file with mode: 0644]
sfc-provider/src/main/java/org/opendaylight/sfc/provider/validators/util/SfcDatastoreCache.java [new file with mode: 0644]
sfc-provider/src/main/java/org/opendaylight/sfc/provider/validators/util/ValidationConstants.java [new file with mode: 0644]
sfc-provider/src/main/resources/org/opendaylight/blueprint/sfc-provider.xml