A network engineer's Netmiko script must capture 'show ip interface brief' from an IOS XE switch and then set descriptions on two interfaces, leaving the change in running config only because the save window is later tonight. Which Netmiko call pattern in one session meets both requirements?
Select an answer to reveal the explanation.
Short Explanation
You have one connection and two kinds of work, so use the call designed for each. send_command returns the show output as text, while send_config_set applies the descriptions in configuration mode; leave out any save call until tonight.
Full Explanation
Netmiko provides separate calls for EXEC and configuration work. Use send_command for show ip interface brief: it runs in EXEC mode and returns the command output as a string for your script to capture. Use send_config_set for the two description lines: it enters global configuration mode, applies the lines, exits configuration mode, and returns the session output, leaving the changes in running configuration. Sending the show command and descriptions together through send_config_set does not meet the capture requirement because configuration mode rejects a bare show command, so you do not get usable show output. Sending the descriptions through send_command does not apply them because EXEC mode rejects configuration keywords with an invalid input error. Calling save_config after applying the descriptions violates the timing requirement because it copies running configuration to startup configuration before the save window. Exam caveat: send_config_set exits configuration mode by default; if you send a save command through it, you need the do prefix. Practical check: print both return values, then inspect show running-config to confirm the descriptions are present and show startup-config to confirm they have not been saved yet.