[j-nsp] Getting configuration diffs via NETCONF
Phil Shafer
phil at juniper.net
Mon Nov 16 12:43:47 EST 2009
Ross Vandegrift writes:
>Is there anyway to programmatically request a diff of the candidate
>and committed configurations? I want the exact output of "show |
>compare", and I want it in the form at the CLI for human documentation
>purposes.
No, we don't have this yet, but should. We can easily make both
the text output and the equivalent XML (think of the content that
will make that delta using the delete, insert, etc attributes), but
we simply have not done it.
>I assume that JUNOS uses some XSLT/SLAX to convert XML hierarchies to
>the form presented at the CLI. Are those sheets available somewhere
>for me to use? An acceptable solution might be to fetch the candidate
>and committed configurations, process them with the appropriate style
>sheets, and produce the diff myself.
JUNOS does not use XSLT internally at all. Most command output is
generated at the source (RPD, DCD, etc) as XML and is converted to
XML in the CLI using a proprietary formatting language called ODL
(Output Definition Language). But config is handled differently,
with MGD generating text or xml (as required) from the config
database as needed. For normal "show configuration" output, MGD
does the heavy lifting and the CLI just displays the lines in an
opaque way.
Thanks,
Phil
More information about the juniper-nsp
mailing list