A government agency forbids guest shell and on-box package installs. An automation host must collect interface status from Nexus switches with a Python script the agency already runs on that host. Which approach matches the constraint?
Select an answer to reveal the explanation.
Short Explanation
The agency will not let you set up a workshop inside the switch, so you keep the tools on your own bench. You run Python on the automation host and ask the switch over NX-API. Guest shell would break the rule they just wrote down.
Full Explanation
Off-box Python on the agency's automation host can post NX-API requests over HTTPS and receive JSON or XML, including the output of a show command. That uses the switch as a service and leaves no extra packages on the switch, which matches a ban on guest shell and on-box installs. Guest shell is an on-box Linux environment. Putting the script and its libraries there violates the constraint even though the language is still Python. POAP runs at boot when a switch has no startup configuration. Show commands are not limited to first boot, and a production status collection is not a bootstrap. An inventory file only lists hosts. Without a playbook or a script that actually connects, it does not collect interface status. Caveat: NX-API has to be enabled on the switches, and the automation host needs a network path to the management interface plus an account that is allowed to run the show command. Operational check: send one NX-API show request from the jump host and confirm the JSON body contains the same interface status you see in an interactive session.