On 12/01/2017 17:38, Andy Bierman wrote:


On Thu, Jan 12, 2017 at 9:34 AM, Juergen Schoenwaelder <[email protected] <mailto:[email protected]>> wrote:

    On Thu, Jan 12, 2017 at 09:19:54AM -0800, Andy Bierman wrote:
    >
    > YANG statements:
    >    - It is not possible to define these statements so they are
    different
    > for config and oper
    >       - must
    >       - when
    >       - unique
    >       - key
    >       - min-elements
    >       - max-elements
    >       - leafref (path)
    >       - if-feature
    >       - deviation
    >       - type (or any sub-statements of type-stmt)
    >       - status
    >       - description
    >       - reference

    Considering statements that constraint 'values', it is not entirely
    clear to me what they mean for state nodes. If a server has
    operational state that violates a must or range or ... constraint in
    the YANG model, what is the server expected to do?


The client uses the YANG validation to check on what the server is sending.
The server is buggy if it is sending data that violates YANG constraints.
If any of these statements need to be different for config and oper
then the old style YANG has to be used instead.
You just have a separate state leaf. These are still allowed in a combined tree.

The config true leaf in the operational state datastore represents the applied configuration. The additional state leaf represents some more complex state derived from the applied configuration, just like the rest of the config false leaves.

Rob




    /js


Andy


    --
    Juergen Schoenwaelder           Jacobs University Bremen gGmbH
    Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
    Fax:   +49 421 200 3103         <http://www.jacobs-university.de/
    <http://www.jacobs-university.de/>>




_______________________________________________
Netconf mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netconf

_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to