How to validate the data from user rest API before it changes the DataStore?

asked 2015-10-10 01:28:46 -0700

Saint gravatar image

The data store can be easily changed by users through rest API,but how can I validate the data before it changes the data store then I can decide if the data should put into the data store ?

对yang中的节点,即datastore中的数据,直接通过rest就可以更改,现在是监听数据变化,然后写自己的逻辑,不知道ODL中有没有提供一种机制,在通过rest 操作数据库之前,可以对用户数据进行验证,只有验证通过的时候才操作数据库,否则返回出错信息给用户?

edit retag flag offensive close merge delete