Which Action Does This Python Network Automation Script Perform?
Refer to the exhibit. Which action results from executing the Python script? - 
Community Votes
62% of anonymous learners picked answer D. Votes are pick records left by other test-takers — they are not the verified answer.
Community Insight
It tests the precise distinction between raw and processed data streams in automation, where candidates often overlook the absence of formatting or parsing logic.
This question evaluates your ability to interpret Python-based network automation scripts that use Paramiko for remote CLI execution. The community consensus confirms the script streams raw, unformatted command output line-by-line to stdout without any data parsing.
Many candidates select Option A because it broadly describes the script's function, but they fail to recognize that certification exams require precise terminology; 'unformatted' specifically denotes the lack of data transformation, making it the technically accurate choice.
Community Discussion (8 comments)
Comments & Corrections
No comments yet — spotted an error or have a note? Share it below.
Expert Analysis
Core Script Behavior
The provided Python code leverages the Paramiko library to establish an SSH connection to a target network device. Once authenticated, it executes a user-supplied CLI command and captures the device's response. The script then iterates through the returned data stream, printing each line individually to standard output using a basicprint() statement.Why Option D is Correct
Option D accurately describes the outcome because the script outputs the raw CLI response exactly as received. As discussed in community comments [2], the output is streamed line-by-line directly from the device without any intermediate processing. Since the code lacks data parsing, JSON serialization, or pretty-printing functions, the result remains in its native, unaltered state. Exam questions frequently test this nuance to verify that engineers can differentiate between direct output and structured automation results.Why Other Options Are Incorrect
- Option A is functionally true but technically imprecise. It ignores the critical detail that the output is presented exactly as received, which is why 'unformatted' is the superior answer.
- Option B is incorrect because the loop explicitly handles multiple lines sequentially, never concatenating them into a single string.
- Option C misidentifies the primary objective. While SSH connectivity is a necessary prerequisite step [8], the script's ultimate purpose is command execution and output retrieval, not merely host reachability testing.
Official Reference
- https://docs.python.org/3/library/paramiko.html
- https://developer.cisco.com/docs/network-automation/
- RFC 4253: The Secure Shell (SSH) Transport Layer Protocol
Exam Strategy
When analyzing automation scripting questions, always trace the exact data flow from input to final output. Look for keywords like 'formatted,' 'parsed,' or 'streamed' to match the script's actual processing logic, and prioritize answers that reflect the precise technical state of the data rather than just the high-level goal.
Related Analysis
Practice All 350-401 Questions
Access 218 questions with complete answers and detailed explanations.
View Full 350-401 Practice Test →