On Wed, Dec 12, 2018 at 03:33:15PM +0100, Ladislav Lhotka wrote:
> Hi,
> 
> in some cases, constraints expressed with "when" or "must" may only be
> intended for configuration datastores. A typical example is an
> auto-negotiable parameter:
> 
> leaf auto-foo {
>   type boolean;
>   default true;
>   description "If true, parameter 'foo' will be auto-negotiated.";
> }
> leaf foo {
>   when "../auto-foo = 'false'";
>   ...
> }
> 
> This means that if auto-foo is true, it is impossible to configure the
> foo parameter. However, even with auto-foo = true, it is desirable to
> see the auto-negotiated value in <operational>, so, ideally, the "when"
> constraint should not apply in <operational>.
> 
> How can this logic be modelled under NMDA? Is an extra leaf
> "foo-operational" needed?

I think the later is the cleanest solution if the modeler insists on
the when statement, even if people do not like this. We discussed
cases like this a lot, the common example was Ethernet auto
negotiation of link speeds. And as far as I recall, the conclusion was
to handle these corner cases properly by defining additional suitable
config false objects that always report the negotiated value in use.

/js

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

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

Reply via email to