clicon / clixon

YANG-based toolchain including NETCONF and RESTCONF interfaces and an interactive CLI
http://www.clicon.org/
Other
206 stars 69 forks source link

AUTOEXPAND: union with leafref #527

Open temabeloglinski opened 1 month ago

temabeloglinski commented 1 month ago

Hi Olof! I have a question about union wth leafref. I have a structure in which I specify several types of interfaces - loopback and Ethernet. While the network zone element is being filled, autoexpand does not work. If I leave only one element without a union, then the autoexpand works without problems. How to solve this problem?

    grouping interfaces-with-subs
    {

    list interface  {  
      key "name";
      description
        "interface name";

    leaf name {
      description "interface name";     
      type union {
      type leafref {
        path "../../../../interface/ethernet/name";
      }

      type leafref {
        path "../../../../interface/loopback/name";
      }      

    }

    }

    }

    }
root@device/> set context 1 network-zone INSIDE interface ?
  <name>                interface name
root@device/> set context 1 network-zone INSIDE interface