ConfD User Community

Remove the Default options from CLI


#1

Hi,

I have an example Yang created for operational commands and try to run it. All the new commands get displayed correctly.

But when i run the CLI, I can see many default options get displayed like - describe, complete-on-space, devtools, disable, file, prompt1, prompt2, … etc.
But I would like to retain the generic ones like aaa, show, configure, screen-width, screen-length, no, clear, … etc.

This there a way to optimize the general commands and how can it be done. Your help is much appreciated.


#2

For built-in commands you can use hide option in clispec. See ConfD User guide, clispec section.
(description of /clispec/$MODE/modifications/hide)

E.g.

<?xml version="1.0" encoding="UTF-8"?>
<clispec xmlns="http://tail-f.com/ns/clispec/1.0" style="c">  
    <operationalMode>
        <modifications>
            <hide src="show jobs"/>
            <hide src="show notification"/>
            <hide src="show parser"/>
            <hide src="xpath"/>
            <hide src="job"/>
            <hide src="prompt1"/>
            <hide src="prompt2"/>
        </modifications>
    </operationalMode>
</clispec>

This cannot be used for autorendered datamodel “commands”. For this tailf:hidden statement with hide group argument can be used (see also confd.conf in ConfD User Guide for hide groups).

leaf dummy {
   tailf:hidden "dummy";
   type uint32;
}