Could you please guide me on how to be able to print the CLI command to the log file?
For example, if I am backing up inventory, and I am using “show chassis hardware”, I would like to see something like this:
ADMIN@ROUTER-BBBJ11.R1.AT> show chassis hardware detail | display xml | no-more
Chassis
Currently, I am only seeing the output and not seeing the hostname with the CLI command.
Here is my script
This my current output. It is not show ing the CLI
This is a best effort mailing list run mostly by volunteers. I
wouldn't expect a response in a few hours.
I may be wrong, but given that the purpose of the network modules
(such as the junos ones) is to abstract away the CLI interaction, what
you're asking sounds like the opposite?
The first line has to be in this format " ADMIN@ROUTER-BBBJ11.R1.AT> show chassis hardware detail | display xml | no-more ". By the way, there is no DNS working and I am just using IP addresses. I probably use RPC XML and see if I can change the file name to that format then use tail. Or just PyEZ.