Phil Shafer <[email protected]> writes:

> Andy Bierman writes:
>>mandatory for config=false means it must exist in an <rpc-reply> for a <get>
>>operation retrieval.  It is by definition "server-supplied", so there is no
>>server validation to worry about.
>>
>>YANG constraints are used on clients.
>>Not that we are super-server-centric here, but client software
>>uses YANG, not just server software.
>
> I must be missing your meaning here.  Can you please give a
> use case for when the data modeler would use "mandatory true"
> for a "config false" top-level node?

An existing use case is the NACM module in RFC 6536:

      +--rw nacm
         +--rw enable-nacm?            boolean
         +--rw read-default?           action-type
         +--rw write-default?          action-type
         +--rw exec-default?           action-type
         +--rw enable-external-groups? boolean
         +--ro denied-operations       yang:zero-based-counter32
         +--ro denied-data-writes      yang:zero-based-counter32
         +--ro denied-notifications    yang:zero-based-counter32
         ...

The top-level node "nacm" contains three mandatory counters, and this
makes it mandatory as well. My understanding is that if a client asks
for complete state data, these counters must always be present in the
reply.

The situation here is a bit trickier because "nacm" is configuration but
I guess it is just an artefact caused by putting configuration and state
data inside the same container.

Lada

>
> Thanks,
>  Phil

-- 
Ladislav Lhotka, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67

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

Reply via email to