Automation

last person joined: 4 days ago 

Ask questions and share experiences about Apstra, Paragon, and all things network automation.
  • 1.  load override via NETCONF

    Posted 02-14-2017 07:57

    Hello together,

     

    have anyone a idea how I can realize a load override via NETCONF?

     

    Thanks for your help.



  • 2.  RE: load override via NETCONF

     
    Posted 02-14-2017 10:28

    Hi,

     

    Here is an example that should work (if I've got it right at least).

     

    <rpc><lock><target><candidate/></target></lock></rpc>
    
    <rpc><edit-config><target><candidate/></target><default-operation>replace</default-operation><error-option>stop-on-error</error-option><config-text><configuration-text>system {root-authentication plain-text-password-value juniper123;}</configuration-text></config-text></edit-config></rpc>
    
    <rpc><commit-configuration><log>Some test</log></commit-configuration></rpc>
    
    <rpc><unlock><target><candidate/></target></unlock></rpc>
    
    <rpc><close-session/></rpc>

    Further information can be found here:  http://www.juniper.net/documentation/en_US/junos/topics/task/configuration/netconf-configuration-setting-edit-config-mode.html

     

    Regards,

    Andy



  • 3.  RE: load override via NETCONF

    Posted 02-15-2017 03:02

    Thank you for your answer.

     

    Now I have a rpc, looking like this:

    <rpc>
    <edit-config>
    <target>
    <candidate/>
    </target>
    <default-operation>replace</default-operation>
    <url>/var/tmp/$configFileName</url>
    </edit-config>
    </rpc>

     

    Now i got the error message: syntax error, expecting <configuration> or <configuration-text>

     

    Do you have any idea, how I can fix this?



  • 4.  RE: load override via NETCONF
    Best Answer

     
    Posted 02-15-2017 03:29

    I did not realise you wanted to load the configuration via a file.  To load override configuration from a file or URL then you will have to use a different RPC.

     

    Try the RPC <load-configuration> instead, documentation can be found at the following link:

     

    http://www.juniper.net/documentation/en_US/junos/topics/reference/tag-summary/junos-xml-protocol-load-configuration.html

     

    Regards,

    Andy