From: netmod <[email protected]> on behalf of tom petch 
<[email protected]>
Sent: 24 December 2020 12:38

I have answered my own question.  I had a thought as I dropped off to sleep on 
December 24th, resisted the temptation to follow it up until this week and have 
now seen how and where grid-type is defined.  I had to look at the YANG modules 
in five I-D/RFC and pursue grouping/uses nested to a depth of eight.  Complex.  
It reminds me of when I used to maintain system code and developed a  clear 
sense of code that was easy to maintain and code that was hard to maintain, 
where mistakes were more likely.  I would put this as beyond hard, that 
tracking down 'grid-type' is a good exercise for anyone wondering how good 
there YANG skills are (with a time limit of an hour:-)

Martin recently identified a flaw in one of those five I-D/RFC and while the 
flaw is not germane to my challenge, yet I see the underlying complexity as a 
common thread.

Tom Petch


Try again
________________________________________
From: tom petch
Sent: 24 December 2020 12:34

I wonder if you can help me with a when in a grouping; where does grid-type in 
when come from below?

ccamp-wson-27 has (slightly edited)
  augment "/nw:networks/nw:network/nw:node/tet:te/"
+ "tet:te-node-attributes/tet:connectivity-matrices/tet:label-restrictions/"
           + "tet:label-restriction/tet:label-step/tet:technology" {
       when "../../../../../../../nw:network-types/tet:te-topology/"
          + "wson:wson-topology" {
         description ...";
       }
       description ...";
       case wson {
         uses l0-types:wson-label-step;
       }
     }

with a tree diagram
    augment /nw:networks/nw:network/nw:node/tet:te
 
/tet:te-node-attributes/tet:connectivity-matrices/tet:connectivity-matrix/tet:from/tet:label-restrictions
               /tet:label-restriction/tet:label-step/tet:technology:
       +--:(wson)
          +--rw (l0-grid-type)?
             +--:(dwdm)
             |  +--rw wson-dwdm-channel-spacing?   identityref
             +--:(cwdm)
                +--rw wson-cwdm-channel-spacing?   identityref


while l0-types has
    grouping wson-label-step {
       description "Label step information for WSON";
       choice l0-grid-type {
         description    "Grid type: DWDM, CWDM, etc.";
         case dwdm {
           leaf wson-dwdm-channel-spacing {
             when 'derived-from-or-self(../../grid-type,
             "wson-grid-dwdm")'
             {
              description "Valid only when grid type is DWDM.";
             }
             type identityref {
               base dwdm-ch-spc-type;
             }
             description ...";
             reference ... ";
           }
         }
         case cwdm {
.......

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