A logistics company script runs inside the Nexus Python interpreter on the switch and must execute a show command there. Which module should the script use?
Select an answer to reveal the explanation.
Short Explanation
The on-box interpreter is an intercom already inside the building. You call the cli module from that Python process and it runs the show command on the switch. A laptop script is a phone call from outside, and it is a different tool than the one this job is using.
Full Explanation
NX-OS provides a Python interpreter on the switch, and the cli module inside that interpreter runs CLI and returns the output to the script. A logistics script that is already running in that interpreter should import the cli module and pass the show command, which keeps the work on the box. An off-box script that posts to NX-API is Python too, but it runs outside the chassis and uses the API, not the on-box cli module. The guest shell is a separate Linux environment with its own packages. Its package manager installs libraries. It is not the module that executes a show command inside the switch Python interpreter. PowerShell modules for UCS and Intersight run on a Windows host against the compute API. They are not how on-box Python reaches the Nexus CLI, and the cli module is exactly that path. Caveat: the script still has to be allowed to run on the switch, and a show command that the role denies will fail even when the module is correct. Operational check: run the script in the on-box interpreter, confirm it returns the show output, and confirm no external NX-API session was required.