How to implement command which will appear in config and show?

I meant something like this:

<?xml version="1.0" encoding="UTF-8"?><clispec xmlns="http://tail-f.com/ns/clispec/1.0" style="c">
  <operationalMode>
    <cmd name="my_feature" mount="show">            
      <cmd name="interface">                
	<callback>
          <capi>
             <cmdpoint>show_my_feature_interface</cmdpoint>                        
	  </capi>
	</callback>
      </cmd>
   </cmd>
 </operationalMode>
</clispec>

Then in callpoint (in C application) you can call maapi_cli_cmd("show my_feature interface brief"), so everytime you issue show my_feature interface it will be redirected to show my_feature interface brief.

Do you mean tailf:info "My_feature commands"; under my_feature container? In case you mix operational and config data (commands), I think you need to choose info statement that can be applied to both modes (as you datamodel is part of both modes). This info seems applicable for both modes.

What would be the purpose of calling get_object for brief if you are in detail list? Do you have some reuse in mind? If so, in C callback you can implement reuse in C (just extract common parts to some function). E.g. reuse to get key element values (as they are same for both - brief and detail).

1 Like