Re: [controller-dev] Getting RPC error when registering my cohert
On Thu, Apr 6, 2017 at 9:18 AM, Satish Duttwrote: > 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:tompante...@gmail.com] > *Sent:* Monday, April 03, 2017 7:34 PM > *To:* Satish Dutt > *Cc:* tpant...@brocade.com; controller-dev@lists.opendaylight.org; > controller-us...@lists.opendaylight.org > *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 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 registerCommitCohort() { > *if *(*commitCohortReg*.get() != *null*) { > *return *RpcResultBuilder.*success*().buildFuture(); > } > > *final *DOMDataTreeCommitCohortRegistry commitCohortRegistry = ( > DOMDataTreeCommitCohortRegistry) > *domDataBroker*.getSupportedExtensions().get( > DOMDataTreeCommitCohortRegistry.*class*); > > *if *(commitCohortRegistry == *null*) { > > *// Shouldn't happen **return *RpcResultBuilder.*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 controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev
Re: [controller-dev] Getting RPC error when registering my cohert
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 ? Regards, -Satish From: Tom Pantelis [mailto:tompante...@gmail.com] Sent: Monday, April 03, 2017 7:34 PM To: Satish DuttCc: tpant...@brocade.com; controller-dev@lists.opendaylight.org; controller-us...@lists.opendaylight.org 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 > 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 registerCommitCohort() { if (commitCohortReg.get() != null) { return RpcResultBuilder.success().buildFuture(); } final DOMDataTreeCommitCohortRegistry commitCohortRegistry = (DOMDataTreeCommitCohortRegistry) domDataBroker.getSupportedExtensions().get(DOMDataTreeCommitCohortRegistry.class); if (commitCohortRegistry == null) { // Shouldn't happen return RpcResultBuilder.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 controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev
[controller-dev] Getting RPC error when registering my cohert
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 FutureregisterCommitCohort() { if (commitCohortReg.get() != null) { return RpcResultBuilder.success().buildFuture(); } final DOMDataTreeCommitCohortRegistry commitCohortRegistry = (DOMDataTreeCommitCohortRegistry) domDataBroker.getSupportedExtensions().get(DOMDataTreeCommitCohortRegistry.class); if (commitCohortRegistry == null) { // Shouldn't happen return RpcResultBuilder.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 controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev