--
You received this message because you are subscribed to the Google Groups "Junos Python EZ" group.
To unsubscribe from this group and stop receiving emails from it, send an email to junos-python-...@googlegroups.com.
Visit this group at http://groups.google.com/group/junos-python-ez.
To view this discussion on the web visit https://groups.google.com/d/msgid/junos-python-ez/99380da1-6b81-478a-8fb0-e930d3411cc7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Junos OS commands can have options that do not require a value. For example, the Junos XML equivalent for the show interfaces terse command indicates that terse is an empty element.
user@router> show interfaces terse | display xml rpc <rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.1R1/junos"> <rpc> <get-interface-information> <terse/> </get-interface-information> </rpc> </rpc-reply>
In Junos PyEZ, if you want to execute an RPC and include a command option that does not take a value, add the option to the RPC method parameter list and set it equal to True. The following code executes the Junos PyEZ RPC equivalent of the show interfaces terse command:
rsp = dev.rpc.get_interface_information(terse=True)
To view this discussion on the web visit https://groups.google.com/d/msgid/junos-python-ez/0B69067C-7DD4-483C-813A-15C8EF434A00%40acm.org.