[j-nsp] certain commands executed on CLI provide additional information over corresponding RPCs

Saku Ytti saku at ytti.fi
Thu Mar 8 04:51:05 EST 2018


Hey Phil,

I'm hijacking this for a bit.

You have | display json and xml, I assume json was relatively modest
amount of work, as you have formal source of data, so someone only
needed to write translator, without being aware of all context to
support | display json, which also means, no one needs to do any work
to get display xml or json to work on new command introduced?

If this is remotely true, shouldn't it be equally possibly to present
all data over SNMP which is presentable as JSON and XML? There are
bunch of gaps on relatively important stuff, which I'd love to see
available in SNMP. This week particularly I was frustrated to find how
'show class-of-service fabric statistics' is not available over SNMP.
Perhaps introduce some CLI-MIB where all json/xml supporting commands
are generated in OIDs and command in CLI to ask OID for particular
command?




On 8 March 2018 at 07:26, Phil Shafer <phil at juniper.net> wrote:
> Martin T writes:
>>I have noticed that certain commands executed on CLI provide some
>>additional information over corresponding RPCs. For example "show ipv6
>>neighbors" or "show system storage" on CLI show column names while XML
>>output does not contain this data. Why is that so?
>
> Both the CLI and RPC content contain the same information, but the
> CLI takes the data supplied by the RPC and displays it using rules
> specified by the developer.  These rules include column headers,
> field titles, and other gritty little details.
>
> But these are "display" features.  The API is meant to allow access
> to the data, and to make that data the same data used by the CLI,
> so the API is complete, up-to-date, well-tested, and useful.
>
> If you want to use the API to get pure text data, we do have the
> 'format="text"' attribute that can be put on an RPC.
>
> Thanks,
>  Phil
> _______________________________________________
> juniper-nsp mailing list juniper-nsp at puck.nether.net
> https://puck.nether.net/mailman/listinfo/juniper-nsp



-- 
  ++ytti


More information about the juniper-nsp mailing list