Hi All,
I'm trying to automate some changes on a SRX HE Cluster. I sometimes run into issues when my script runs whilst someone is on the CLI in configure mode at the same time. When the SRXs are in cluster mode we cant use a shared candidate.
The error is:
private edits in use. Try 'configure private' or 'configure exclusive'
I've figured out how to do 'configure exclusive' by using the cfg.lock() method which works around part of the issue. This would effectively make my firewall configuration script block for the duration of the time its processing the single request. All other requests would have to be queued which would make my script and the frontend more complex.
Is there a way to obtain a private candidate config using PyEZ? It looks like this is possible using netconf
https://www.juniper.net/documentation/en_US/junos13.3/topics/reference/tag-summary/netconf-junos-xml-protocol-open-configuration.htmlThis way i would be able to process any inbound requests as they're received without worrying about a queueing system (although i would have to find a way of limiting simulataneous connections).
Thanks,
Daryl.