On Thu, Apr 6, 2017 at 9:18 AM, Satish Dutt <[email protected]> wrote:
> Thanks for the clarification. Is there any way we can set the response > code in the canCommit() method of the cohert in case of failure ? > > > I don't know what type of response code you're referring to. Can you elaborate? You can subclass DataValidationFailedException and add whatever additional information you want or format the error message appropriately with specific information. > Regards, > > -Satish > > > > *From:* Tom Pantelis [mailto:[email protected]] > *Sent:* Monday, April 03, 2017 7:34 PM > *To:* Satish Dutt <[email protected]> > *Cc:* [email protected]; [email protected]; > [email protected] > *Subject:* Re: Getting RPC error when registering my cohert > > > > You need Boron SR3. The DOMDataTreeCommitCohortRegistry wasn't advertised > prior to that. > > > > On Sun, Apr 2, 2017 at 8:01 AM, Satish Dutt <[email protected]> wrote: > > Hi Thomas, > > > > I have taken the example code provided in the CarProvider for registering > my cohert in my provider class. But whenever I am trying to register my > cohert, I am always getting the *” RPC error > DOMDataTreeCommitCohortRegistry not found “* . Below is my code snippet : > > > > @Override > *public synchronized *Future<RpcResult<Void>> registerCommitCohort() { > *if *(*commitCohortReg*.get() != *null*) { > *return *RpcResultBuilder.<Void>*success*().buildFuture(); > } > > *final *DOMDataTreeCommitCohortRegistry commitCohortRegistry = ( > DOMDataTreeCommitCohortRegistry) > *domDataBroker*.getSupportedExtensions().get( > DOMDataTreeCommitCohortRegistry.*class*); > > *if *(commitCohortRegistry == *null*) { > > *// Shouldn't happen **return *RpcResultBuilder.<Void>*failed*( > ).withError(ErrorType.*APPLICATION*, > *"DOMDataTreeCommitCohortRegistry not found"* > ).buildFuture(); > } > > > > … > > … > > } > > > > I am using the mdsal-dom-api-2.1.0-Boron.jar . Is the issue related to the > older jar version being used ? > > > > Regards > > -Satish > > > > > > >
_______________________________________________ controller-dev mailing list [email protected] https://lists.opendaylight.org/mailman/listinfo/controller-dev
