On Mon, 2018-09-10 at 11:48 +0200, Balazs Lengyel wrote:
> Hello,
> We would like to remove the if:interfaces-state with a deviation as it will
> never contain any information. So we wanted to use
> deviation /if:interfaces-state {
> deviate not-supported;
> }
>
> However after this we get an error as ietf-interfaces has a definition:
I think this check really goes overboard. Sec. 9.9.2 in RFC 7950 says:
The "path" expression evaluates to a node set consisting of zero,
one, or more nodes. If the "require-instance" property is "true",
this node set MUST be non-empty.
However, evaluating an XPath expression make sense only in the context of a
concrete instance data tree. Therefore, no error should be reported unless an
instance of a leaf with the "instance-state-ref" type exists. With the typedef
below, we are two steps away from that.
Lada
> /*
> * Legacy typedefs
> */
>
> typedef interface-state-ref {
> type leafref {
> path "/if:interfaces-state/if:interface/if:name";
> }
> status deprecated;
> description
> "This type is used by data models that need to reference
> the operationally present interfaces.";
> }
>
> Here the path statement will point at a non-existent branch.
>
> So is there a correct way to indicate we do not support /interface-state ?
> regards Balazs
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod
--
Ladislav Lhotka
Head, CZ.NIC Labs
PGP Key ID: 0xB8F92B08A9F76C67
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod