JUNOS Scripting Tip: How To Get The RPC Equivalent Command For A JUNOS CLI Command

To get the RPC command for “show version”, pipe output to “| display xml rpc”

 lab@aristotle-re0> show version | display xml rpc
 <rpc-reply xmlns:junos="http://xml.juniper.net/junos/12.3R2/junos">
     <rpc>
         <get-software-information>
         </get-software-information>
     </rpc>
     <cli>
         <banner></banner>
     </cli>
 </rpc-reply>

This yields “get-software-information”. Easy!