On Mon, Mar 27, 2017 at 11:44 AM, Satish Dutt <[email protected]> wrote:
> Hi Tomas,
>
>
>
> You told in the previous mail the below API needs to be overridden in the
> class which extends the DOMDataTreeCommitCohort class, for implementing the
> validation logic, before storing the data in the datastore.
>
>
>
> default CheckedFuture<PostCanCommitStep,
> DataValidationFailedException> canCommit(@Nonnull Object txId,
>
> @Nonnull Collection<DOMDataTreeCandidate> candidates,
> @Nonnull SchemaContext ctx) {
>
> }
>
>
>
>
>
> But I am not able to figure out what needs to be passed for the txID
> parameter. I assume it to be transaction ID. *But how to get access of
> that before the canCommit() can be called ?*
>
>
>
The javadocs explains the parameters. This is a callback-type API that you
implement and you register the implementation with MD-SAL. You don't
invoke it.
> Regards
>
> -Satish
>
>
>
> *From:* Tomas Cere -X (tcere - PANTHEON TECHNOLOGIES at Cisco) [mailto:
> [email protected]]
> *Sent:* Monday, March 20, 2017 8:58 PM
> *To:* Satish Dutt <[email protected]>; controller-dev@lists.
> opendaylight.org; [email protected];
> [email protected]
> *Subject:* RE: [netconf-dev] Validation hooks when using restconf
>
>
>
> This should be possible by leveraging the DOMDataTreeCommitCohort api’s.
>
>
>
> https://github.com/opendaylight/mdsal/blob/454903c516e9405ff4a1af6392a31b
> 00c04852fa/dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/
> DOMDataTreeCommitCohort.java
>
>
>
> https://github.com/opendaylight/mdsal/blob/596b89ec503f56c87d066c00d6550e
> 675eb7cf0c/dom/mdsal-dom-api/src/main/java/org/opendaylight/mdsal/dom/api/
> DOMDataTreeCommitCohortRegistry.java
>
>
>
> Tomas
>
>
>
> *From:* [email protected] [
> mailto:[email protected]
> <[email protected]>] *On Behalf Of *Satish Dutt
> *Sent:* Sunday, March 19, 2017 16:07
> *To:* [email protected]; controller-users@lists.
> opendaylight.org; [email protected]
> *Subject:* [netconf-dev] Validation hooks when using restconf
>
>
>
> Hi,
>
>
>
> From the northbound applications we are using the restconf APIs to push
> the JSON data to the ODL controller. Is there any programming hooks through
> which the JSON data can be validated in the controller before allowing the
> data to be stored in the configuration datastore ?
>
>
>
> Regards
>
> Satish
>
> _______________________________________________
> controller-dev mailing list
> [email protected]
> https://lists.opendaylight.org/mailman/listinfo/controller-dev
>
>
_______________________________________________
controller-dev mailing list
[email protected]
https://lists.opendaylight.org/mailman/listinfo/controller-dev