On Tue, May 23, 2017 at 11:19 AM, Vishweshwar Hegde <vhe...@advaoptical.com> wrote:
> > > Thanks Tom for the detailed information. > > > > Could you please point me some reference or examples for “Perhaps you > could add your own layer on top of restconf that does such validation and > updating prior to sending to restconf.” > > This will be very useful to validate or modify input data. > I have no reference or example - it's just a thought off the top of my head - you'd have to implement it. > > > Regards, > > -Vishwa > > *From:* Tom Pantelis [mailto:tompante...@gmail.com] > *Sent:* Tuesday, May 23, 2017 8:36 PM > *To:* Vishweshwar Hegde <vhe...@advaoptical.com> > *Cc:* Robert Varga <n...@hq.sk>; mdsal-...@lists.opendaylight.org; > controller-dev@lists.opendaylight.org > *Subject:* Re: [controller-dev] [mdsal-dev] Cohort or Restconf- How to > alter input data? > > > > > > > > On Tue, May 23, 2017 at 10:50 AM, Vishweshwar Hegde < > vhe...@advaoptical.com> wrote: > > Thanks Robert for the information. > > Please refer below scenario: > public static final QName QNAME = QName.create(XYZ.QNAME, "abc").intern(); > public static final YangInstanceIdentifier.NodeIdentifier NODEID = new > YangInstanceIdentifier.NodeIdentifier(QNAME); > > In our cohort flow for "abc" input value from NBI is "123" cohort > validation should change to "999". > > Any pointers for this scenario? > > > > The cohort API is for validating input, not changing it. Not sure I > understand the use case whereby user input should be automatically changed > by the system - I'd think you'd want to report an error and let the user > pass the correct input. > > > > But if you really need to alter user inout data then you can do it via > DTCL although that's after the fact. Perhaps you could add your own layer > on top of restconf that does such validation and updating prior to sending > to restconf. > > > > > Regards, > -Vishwa > > > -----Original Message----- > From: Robert Varga [mailto:n...@hq.sk] > Sent: Tuesday, May 23, 2017 7:03 PM > To: Vishweshwar Hegde <vhe...@advaoptical.com>; > mdsal-...@lists.opendaylight.org; controller-dev@lists.opendaylight.org > Subject: Re: [mdsal-dev] Cohort or Restconf- How to alter input data? > > > > On 23/05/17 12:44, Vishweshwar Hegde wrote: > > Hello, > > > > > > > > Is there any way can we alter or put condition to change restconf > > input data? > > > > > > > > We are using cohort to validate restconf input data. > > > > > > > > Problem with DTCL is to getting into internal looping. > > > > > > > > Please provide your suggestions or alternative options to solve this > > problem. > > > > Depends on the use case and requirements, but the place to implement this > is definitely not in the data store itself. > > Bye, > Robert > > _______________________________________________ > controller-dev mailing list > controller-dev@lists.opendaylight.org > https://lists.opendaylight.org/mailman/listinfo/controller-dev > > >
_______________________________________________ controller-dev mailing list controller-dev@lists.opendaylight.org https://lists.opendaylight.org/mailman/listinfo/controller-dev