hi,
is there any way to display all config true and config false leaf’s defined in yang in default show, without defining manual show template for output rendering.
thanks.
hi,
is there any way to display all config true and config false leaf’s defined in yang in default show, without defining manual show template for output rendering.
thanks.
Hi,
Do you mean something like(?):
$ pwd
/home/tailf/confd-6.3/examples.confd/cdb_oper/ifstatus
$ make all start
$ confd_cli -u admin -C
# show interfaces ; show running-config interfaces
NAME BYTES PACKETS ERRORS DROPPED BYTES PACKETS ERRORS DROPPED COLLISIONS
--------------------------------------------------------------------------------------------
lo 574584250 1416245 0 0 574584250 1416245 0 0 0
interfaces interface lo
address 127.0.0.1
prefix-length 8
!
!
You could for example implement your own show command that use the confd_load tool:
$ confd_load -o -F c -p /interfaces
interfaces interface lo
status receive bytes 574719737
status receive packets 1417516
status receive errors 0
status receive dropped 0
status transmit bytes 574719737
status transmit packets 1417516
status transmit errors 0
status transmit dropped 0
status transmit collisions 0
address 127.0.0.1
prefix-length 8
!
!
hi ,
in my requirement i want to display both config false and config true leafs as part of single show command…
list abc{
key name
leaf name{
…
}
leaf ip{
…
}
leaf status{
config false;
}
when ever i do show on above list.
ex…
#show abc
name : example
ip :0.0.0.0
status :reject
i want to above output,is this possible??
You need to implement something yourself as that feature is not available in a c-style CLI.
For example, if you are ok with using the confd_load command and have the user just provide a keypath, you could put something like this in your clispec
<cmd name="show-all">
<info>Show config and oper data</info>
<help>Run confd_load -o -F c -p /your/path/here.</help>
<callback>
<exec>
<osCommand>confd_load</osCommand>
<args>-u $(user) -g $(groups) -o -F c</args>
<options>
<uid>confd</uid>
</options>
</exec>
</callback>
<params>
<param>
<info><path></info>
<help>/path/to/show.</help>
<flag>-p</flag>
</param>
</params>
</cmd>