-
Notifications
You must be signed in to change notification settings - Fork 0
Tips
(ack to Mark Tees for providing the list)
-
Check out the examples in the 'juniper' directory if you haven't already. Outside of using a context manager there are helpers for building the xml snippets to send. https://github.com/leopoul/ncclient/blob/master/examples/juniper/edit-config-std.py
-
Compare the xml for existing config on a running Junos device by using the cli commands like this "show configuration routing-options | display xml". Alternatively try referencing the Junos XML API documentation like the ones found here: https://www.juniper.net/documentation/en_US/junos12.3/information-products/topic-collections/junos-xml-ref-config/index.html
-
Also, you can use set commands to edit config also and write statements just like its SQL. Examples for that are also in the juniper directory. https://github.com/leopoul/ncclient/blob/master/examples/juniper/edit-config-text-std.py
You can get status info NETCONF equivalent query via:
show l2circuit connections brief | display xml rpc
which will return:
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/13.3R3/junos">
<rpc>
<get-l2ckt-connection-information>
<brief/>
</get-l2ckt-connection-information>
</rpc>
</rpc-reply>
So to query for L2 circuit connections via NETCONF you could use the rpc .../rpc part.