A schema node identifier is a string that identifies a node in the schema tree.


Since the release 18.10 where the server was changed to implement YANG correctly, the 'choice' and 'case' names MUST be properly used within a 'deviation' and 'augment' paths.
However, note that the 'choice' and 'case' names MUST NOT appear in XPath (must/when/path).


For example, assume we have the following YANG module with 'case' 'choice' statements:


container type {
     choice interface-type {
       case a {
         leaf ethernet { ... }
       }
       case b {
         container vlan { ... }
       }
     }
}


Now, in order to augment, for instance, the container "vlan", the following Path should be used:


augment "/type/interface-type/b/vlan" { ... }


However, in scenarios where the "ethernet" leaf or "vlan" container have to be used in "when/must/path" statement, the 'choice' and 'case' names are not getting used:


    typedef type-ref {
      type leafref {
        path "/type/ethernet";
      }
    }


As a shorthand, the "case" statement can be omitted if the branch contains a single "anydata", "anyxml", "choice", "container", "leaf", "list", or "leaf-list" statement. In this case, the case node still exists in the schema tree, and its identifier is the same as the identifier of the child node. Schema node identifiers MUST always explicitly include case node identifiers. The following example:


choice interface-type {
  container ethernet { ... }
}


is equivalent to:

choice interface-type {
  case ethernet {
    container ethernet { ... }
  }
}


The case identifier MUST be unique within a choice.

As a result, in case the following data model is used:


container type {
     choice interface-type {
         container vlan { ... }
     }
}


The correct was to specify the target "vlan" node in, for instance, augment statement would look as follows:


augment "/type/interface-type/vlan/vlan" { ... }