Can we hide container node as it is redundant with one of the leafs under it?

Can we hide the container node as it is redundant with one of the leafs under it?

container reference-bandwidth {
  description
    "This container defines ISIS Reference Bandwidth.";

  container config {
    description
      "This container defines Reference Bandwidth configuration";
    uses isis-reference-bandwidth-config;
  }

  container state {
    config false;
    description
      "This container defines state for Reference Bandwidth.";

    uses isis-reference-bandwidth-config;
  }
}

grouping isis-reference-bandwidth-config {
  description
    "This grouping defines ISIS Reference Bandwidth Configuration.";

  leaf reference-bandwidth {
    type uint32;
    description
      "ISIS Reference Bandwidth value";
    }
}

“Hide” in what sense? You can make the node to not be rendered in the auto-generated CLI - is that what you want? To do so, you need to use tailf:cli-drop-node-name. Since you probably do not want to modify the OpenConfig module, you can use annotations like

module openconfig-isis-ann {
  ...
  import tailf-common { prefix tailf; }

  tailf:annotate-module openconfig-isis {
    tailf:annotate-statement 'grouping[name="isis-global-base"]' {
      tailf:annotate-statement 'container[name="reference-bandwidth"]' {
        tailf:cli-drop-node-name;
      }
    }
  }
}

You then add the module as an annotation file to the openconfig-isis compilation command line, like

confdc -c -o openconfig-isis.fxs -a openconfig-isis-ann.yang openconfig-isis.yang