Hi,
Ladislav Lhotka <[email protected]> wrote:
> 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;
> > }
Yes, this is the proper way to do it.
> >
> > 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.
It also says about the "path" statement:
It takes as an
argument a string that MUST refer to a leaf or leaf-list node.
The intention was that it is an error if the path doesn't refer to a
leaf[-list] schema node, but depending on "require-instance" the leaf
instance might not have to exist.
However, I do agree that it in this particular case, as long as the
type isn't used in the system, it should not be reported as an error.
/martin
>
> 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
>
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod