A government agency engineer runs Python on a workstation that sends show commands to a Nexus switch through NX-API. Which description matches this script?
Select an answer to reveal the explanation.
Short Explanation
You can picture this as a phone call from a desk outside the building: Python runs on your workstation and asks NX-API for the show output. The off-box script does not need to live on the switch. On-box Python imports the cli module inside the switch interpreter, which is not where your script runs.
Full Explanation
Off-box Python runs outside the switch and communicates with it through an API. Here, Python runs on the workstation and sends show commands through NX-API, so the workstation hosts the interpreter and the switch returns the API response. On-box Python imports the cli module inside the switch interpreter and runs CLI locally; that is a different design from this workstation script. An EEM applet runs an action in response to an event such as a syslog line. NX-API does not require a syslog trigger, so that description does not fit a workstation request. Guest shell is an isolated Linux environment on the switch where you can install extra packages. An external script does not need to be installed in guest shell to call NX-API. Caveat: the switch must have the nxapi feature enabled, and the workstation needs network reachability and valid credentials; without these, the correct script style may still fail to connect. Practical check: run the script from the workstation, verify that the NX-API reply contains the show output, and confirm that the switch’s Python interpreter did not start the process.