In steps 1 and 2, we simply initialize the Python environment and connect to the remote JUNOS node.
In the subsequent steps, we use the display_xml_rpc() method on the Device object in order to make an RPC call to the JUNOS device which executes the equivalent of the | display xml rpc command modifier in order to determine the XML RPC associated with the command line.
Because Juniper haven’t implemented absolutely every aspect of the command line functionality into the XML RPI API, sometimes it isn’t possible to translate the command line into an RPC call, as seen in step 6.
But when an XML RPC call is available, it is returned within an XML structured document and the lxml.etree.dump() function shows the raw format. Once learned, ...