Re: show and config

I have the following config.

submodule ABC {

belongs-to my-config { prefix TEST; }

list network {
  key name;
  leaf name {
    type string;
  }
  ...........
  list my_list {
     key myname;
     leaf myname {
        ........
     }
     ......
  }

  }
}

submodule XYZ {
belongs-to my-config { prefix TEST; }

container XXX {
   config false;
   list network {
      key name;
      leaf name {
         type leafref { path "/network/name"; }  <<<<<<<<<<<<<< Not fetching the configured networks 
      }
      <<<<<< callpoint to get some stats for the above n/w name >>>>
    }
}

Basically this is done like this as i dont want the existing sub module ABC to be touched for “show network …”

instead want "show XXX network ".

Is this possible without having to do any changes submodule ABC ???

Yes. Although I’m not sure exactly what you mean, what you have ought to work.

Another example:

module top {
  yang-version 1.1;
  namespace "http://tail-f.com/ns/example/top";
  prefix top;

  include s1;
  include s2;
}

submodule s1 {
  belongs-to top { prefix t; }

  list network {
    key name;
    leaf name {
      type string;
    }

    list another-list {
      key name;
      leaf name {
        type string;
      }
    }
  }
}

submodule s2 {
  belongs-to top { prefix t2; }

  include s1;

  import tailf-common {
    prefix tailf;
  }

 container xxx {
    config false;
    tailf:callpoint cp;
    list network {
      key name;
      leaf name {
        type leafref {
          path "/network/name";
        }
      }
    }
  }
}

And when I login I get:
$ make cli
/home/jojohans/confd-6.4.2/bin/confd_cli --user=admin --groups=admin
–interactive || echo Exit

admin connected from 10.0.2.2 using ssh on lab
admin@lab> show xxx network
Error: application communication failure
[error][2017-07-11 12:23:51]
admin@lab>

(I get the “application communication failure” error because I didn’t implement the callpoint)

yes something similiar to it.

Here when the call-point is implemented. Does the network.name gets auto-filled using the leafref path or should one implement it explicitly thru the confd_get_next calls?