openconfig / public

Repository for publishing OpenConfig models, documentation, and other material for the community.
Apache License 2.0
903 stars 655 forks source link

'when' path to tunnel-type? #36

Closed ghost closed 3 months ago

ghost commented 8 years ago

In module openconfig-mpls-sr and couple other places, there are when statements which refer to the tunnel-type leaf, which is defined inside a sibling container or is a sibling node.

The relevant section of the pyang tree of this model looks like below:

         |     +--rw segment-routing
         |        +--rw tunnel
         |           +--rw config
         |           |  +--rw tunnel-type?   oc-mplst:tunnel-type
         |           +--ro state
         |           |  +--ro tunnel-type?   oc-mplst:tunnel-type
         |           +--rw p2p-lsp
         |     +--rw ldp!
         |     |  +--rw tunnel
         |     |     +--rw tunnel-type?   oc-mplst:tunnel-type
         |     |     +--rw ldp-type?      enumeration
         |     |     +--rw p2p-lsp
         |     |     |  +--rw fec-address*   inet:ip-prefix
         |     |     +--rw p2mp-lsp
         |     |     +--rw mp2mp-lsp

Currently, the when expressions in the above linked yang modules looks like below, which does not seem to make sense given the above tree:

container p2mp-lsp {
   when "tunnel-type = 'P2MP'" {
container mp2mp-lsp {
  when "tunnel-type = 'MP2MP'" {
container p2p-lsp {
  when "tunnel-type = 'P2P'" {

Should it be something like when "../tunnel-type in openconfig-ldp.yang and when "../config/tunnel-type in openconfig-sr.yang?

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 180 days with no activity. If you wish to keep this issue active, please remove the stale label or add a comment, otherwise will be closed in 14 days.