Hi,

tom petch <[email protected]> wrote:
> Any one of many, many YANG modules from such as TEAS and CCAMP have dozens 
> and dozens of augment, some more than a 100, almost all controlled by 'when'. 
>  The 'when' are almost all performing the same test for a presence container 
> for the network type but because the tree is ten deep and the augments take 
> place at different levels and the 'when' use the relative form of the Xpath 
> statement, then the 'when' take many different forms and it is not obvious 
> that they are correct.
> 
> Is there a drawback to using the absolute form of the Xpath statement which 
> would then always be the same?
> 
> Thus
>            A YANG Data Model for Flexi-Grid Optical Networks
>                    draft-ietf-ccamp-flexigrid-yang-11
> has
> 
>        when "../../../../../../nw:network-types/tet:te-topology/"
>           + "flexgt:flexi-grid-topology" {
>        when "../../../../../nw:network-types/tet:te-topology/"
>           + "flexgt:flexi-grid-topology" {
>        when "../../../../nw:network-types/tet:te-topology/"
>           + "flexgt:flexi-grid-topology" {
> 
> which could be 
>        when "/nw:networks/nw:network/nw:network-types"
>           + "/tet:te-topology/flexgt:flexi-grid-topology" {

This is not the same as the relative paths, since "nw:network" is a
list.  If there is one network with
nw:network-types/tet:te-topology/flexgt:flexi-grid-topology set, then
this expression always returns true!


/martin




> 
> if I understand aright.
> 
> Tom Petch
> _______________________________________________
> netmod mailing list
> [email protected]
> https://www.ietf.org/mailman/listinfo/netmod

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

Reply via email to