[j-nsp] Getting configuration diffs via NETCONF

Ross Vandegrift ross at kallisti.us
Tue Nov 17 14:12:03 EST 2009


On Tue, Nov 17, 2009 at 01:43:31PM -0500, Phil Shafer wrote:
> Ross Vandegrift writes:
> >Looks like I spoke too soon - the NETCONF equivalent of
> ><get-configuration> doesn't provide format control - it always returns
> >the full XML tree.  I can use NETCONF to call the op script, but at
> >that point, ssh does basically the same thing without needing to
> >distribute a script to all of my boxes.
> 
> You can use any JUNOS XML API call a NETCONF session,
> so <get-configuration format="text"/> will work.

It doesn't work as an RPC call on 9.5R2:

rvandegrift at malaclypse:~$ ssh -s lab-4200 netconf
<!-- No zombies were killed during the creation of this user interface -->
<!-- user rvandegrift, class j-super-user -->
<hello>
  <capabilities>
    <capability>urn:ietf:params:xml:ns:netconf:base:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:candidate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:confirmed-commit:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:validate:1.0</capability>
    <capability>urn:ietf:params:xml:ns:netconf:capability:url:1.0?protocol=http,ftp,file</capability>
    <capability>http://xml.juniper.net/netconf/junos/1.0</capability>
    <capability>http://xml.juniper.net/dmi/system/1.0</capability>
  </capabilities>
  <session-id>24377</session-id>
</hello>
]]>]]>
<hello></hello>
]]>]]>
<rpc><get-configuration format="text'/></rpc>
<rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" xmlns:junos="http://xml.juniper.net/junos/9.5R2/junos">
</rpc-reply>
]]>]]>
]]>]]>

Any get-configuration RPC gives me empty responses.

-- 
Ross Vandegrift
ross at kallisti.us

"If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher."
	--Woody Guthrie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <https://puck.nether.net/pipermail/juniper-nsp/attachments/20091117/eae3a754/attachment.bin>


More information about the juniper-nsp mailing list