350-601 Automation Practice Question
Exhibit
Refer to the exhibit.
{
"totalCount": "1",
"imdata": [
{
"l1PhysIf": {
"attributes": {
"id": "Eth1/1",
"adminSt": "up",
"descr": "To-Server",
"mtu": "1500",
"switchportMode": "access",
"accessVlan": "100"
}
}
}
]
}Refer to the exhibit. An automation script queries the Cisco Nexus 9000 using the NX-API JSON format and receives the above output. The script is designed to validate that interface Eth1/1 is in access mode with VLAN 100. However, the script reports a failure. What is the most likely reason?
⚠ Common exam trap
Cisco often tests the nuance that NX-API returns all values as strings, tricking candidates who assume numeric fields are returned as integers and overlook the need for type conversion in validation logic.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The script uses strict type checking, and the values are returned as strings instead of integers.
The NX-API returns all values as strings in JSON output, including numeric fields like VLAN IDs. If the script uses strict type checking (e.g., `===` in Python or JavaScript), comparing the string '100' to the integer 100 will fail, even though the interface is correctly configured in access mode with VLAN 100. This is a common pitfall when parsing NX-API responses without explicit type conversion.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
The script uses strict type checking, and the values are returned as strings instead of integers.
Why this is correct
JSON returns numbers as strings in this context; a type mismatch causes failure.
- ✗
The JSON output is malformed and cannot be parsed.
Why it's wrong here
The JSON is valid.
- ✗
The interface is administratively down.
Why it's wrong here
The output shows 'adminSt': 'up'.
- ✗
The JSON output is missing the 'switchportMode' field.
Why it's wrong here
The output includes 'switchportMode'.
Visual reference
Go deeper
Related to this question
About these practice questions
This 350-601 question is part of Courseiva's 984-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This 350-601 practice question is part of Courseiva's free Cisco certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the 350-601 exam.