Compiling a default yang model with --export none, not working

I need to hide “show cli” without modifying the yang file

container cli is present in tailf-common-monitoring-ann.yang.

I have tried:

/opt/confd/bin/confdc -c -o /opt/confd/src/confd/yang/tailf-common-monitoring.fxs -a /opt/confd/src/confd/yang/tailf-common-monitoring-ann.yang – /opt/confd/src/confd/yang/tailf-common-monitoring.yang --export none

this method did not work. Any suggestions on how I can achieve this?

You can use the “hide” element in the clispec. From the clasped man-page:

/clispec/$MODE/modifications/hide

The “hide” element makes it possible to hide a built-in command

Attributes:

src (cmdpathType)
The “src” attribute is mandatory. It specifies which command to hide. cmdpathType is a space-separated list of commands, pointing out a specific sub-command.

An example:

    <modifications>
    <hide src="file show"/>
    </modifications>

Which file do I add the xml ?

The clispec file (.cli-file).

See for example the intro/1-2-3-start-query-model example.

$ cat commands-j.cli
<clispec xmlns="http://tail-f.com/ns/clispec/1.0" style="j">
  <operationalMode>
    <cmd name="ping">
      <info>Ping a host</info>
      <help>Verify IP (ICMP) connectivity to a host.</help>
      <callback>
        <exec>
          <osCommand>ping</osCommand>
          <options>
            <uid>confd</uid>
          </options>
        </exec>
      </callback>
      ...

You can read more about clasped in the User Guide.

I tried adding
[root@nfvis cli]# cat confd.cli

I still see:

nfvis# show ?
Possible completions:
cli Display cli settings
confd-state Display ConfD status information
debug-logs Display debug logs
history Display CLI command history
jobs Display background jobs