clicon / clixon-controller

Clixon network controller
Apache License 2.0
13 stars 4 forks source link

YANG error when poking on EOS configuration #26

Closed krihal closed 10 months ago

krihal commented 11 months ago
khn@zoomie[/]# set devices device arista* conf ?
Aug 15 11:21:51: xp_yang_op_eq: 122: Yang error: Invalid path-arg (Error in xy1 or xy2) : Invalid argument
CLI command error
khn@zoomie> show configuration devices device arista* config ?
Aug 15 11:23:41: xp_yang_op_eq: 122: Yang error: Invalid path-arg (Error in xy1 or xy2) : Invalid argument
olofhagsand commented 11 months ago

This happens when the memory optimization is enabled in the controller:

<clixon-config xmlns="http://clicon.org/config">
   <autocli>
     <grouping-treeref>true</grouping-treeref>                <----
olofhagsand commented 11 months ago

An example from ietf-yang-library.yang is:

  grouping module-implementation-parameters {
    description
      "Parameters for describing the implementation of a module.";
    leaf-list feature {
      type yang:yang-identifier;
    ...
    leaf-list deviation {
      type leafref {
        path "../../module/name";
      }

The path "../.." goes beyond the scope of the grouping and assumes that there is a "module" node in the context where the "uses" is done. I think is broken YANG.