[j-nsp] NETCONF <get-config> vs. <get-configuration>

Chuck Anderson cra at WPI.EDU
Wed Sep 21 15:26:40 EDT 2016

Using NETCONF with Perl Net::Netconf::Manager, I'm trying to get the
candidate configuration to see what changed before issuing a commit
request so I can avoid "empty" commits after doing a "replace"
operation on a subtree.  I see that NETCONF defines a standard
<get-config> call, and I believe <get-configuration> is a
legacy/proprietary Junos call.  There is a <get-config> example in the
documentation, but there doesn't appear to be a way to see what was
changed in the candidate config vs. the committed config:


The API call I want to make is documented here:


But I can't for the life of me figure out how to pass the various
attributes inside the <get-configuration> tag with Perl.  How does one
map the attributes INSIDE a tag to the Perl API call as below?

<get-configuration changed="changed" compare="rollback" database="candidate">

This doesn't work:

$res = $jnx->get_configuration(changed => 'changed', compare => 'rollback', database => 'candidate');

because that generates this:

<rpc message-id='2'>

when I need it to be this:

<rpc message-id='2'>
  <get-configuration database="candidate" compare="rollback" changed="changed">


More information about the juniper-nsp mailing list