From the top level container I want to access list attribute value…e.g
Container aut
{
Container use
{
Tail:cli-show-template “usm : $(msm)”; //but this not accessing my list attribute value…
List unm
{
Key “msm”;
Leaf msm{
Type string;
}
Leaf ab{
\ some type
}
}}}
Also I want access every list attribute individually…
Pls suggest some idea to access my list entries…
Following is an example of how to access your list entries using the show-template feature:
container aut {
container use {
list unm {
config false;
key "msm";
tailf:cli-suppress-table;
tailf:cli-show-template-enter "";
tailf:cli-show-template-legend
"MSM "
+"$(.selected~=ab?AB )\n"
+"=============="
+"$(.selected~=ab?=====)\n";
tailf:cli-show-template
"$(msm|ljust:5) - "
+"$(.selected~=ab?$(ab|ljust:8) )\n";
tailf:cli-show-template-footer
"$(.?% $(.licounter) entries in the table.\n:"
+"% No entries in the table.\n)";
leaf msm {
type string;
}
leaf ab{
type string;
}
}
}
}
Description of the Show templates feature can be found in Chapter 16.27.2, Show templates, of the ConfD User Guide. You can also refer to the tailf_yang_extensions section in Volume 5 of the ConfD man-pages for more information on the various show-template related YANG annotations and the definition of the YANG type called cli-template-string. There are also various show-template related examples in ConfD Premium that are available including the one under examples.conf/cli/show_templates.
You won’t be able to specify the list instances at the container level with the show template feature. Can you describe your display requirements when the user types the following:
suppose user typed “show aut use” command then it should display output in tabular format…
for this command (" show aut use unm " ) it should not display output in tabular format.(it should be in auto rendered format)… How i can achieve this requirement by using show template ?. Pls suggest some Idea…
You are right.I’m seeing same output format for both the command.only few output differences like 1st command listing all the user details in tabular format. 2nd command listing that specific user detail in same (tabular) format.as per my require ment 2nd command output format should be differ from my 1st command…