Courseiva
AutomationmediumMultiple ChoiceObjective-mapped

350-601 Automation Practice Question

An engineer is writing a Python script using the cisco_nxapi library to configure a Nexus switch. Which of the following is a valid step to establish a connection using NX-API?

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

Instantiate an `NXAPI` object with the switch IP, username, password, and transport (http/https).

The cisco_nxapi library provides an NXAPI class that can be instantiated with switch IP, username, password, and transport protocol to connect.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Instantiate an `NXAPI` object with the switch IP, username, password, and transport (http/https).

    Why this is correct

    Correct: The NXAPI class from cisco_nxapi accepts these parameters.

  • Use the `Netmiko` library to connect via SSH and then invoke NX-API commands.

    Why it's wrong here

    Netmiko is used for SSH-based CLI, not NX-API.

  • Import `nxos` module from Ansible and use it in the script.

    Why it's wrong here

    Ansible modules are not meant to be imported in standalone Python scripts.

  • Use the `requests` library to send CLI commands directly to the switch's NX-API endpoint.

    Why it's wrong here

    While requests can be used, the cisco_nxapi library provides a higher-level abstraction.

About these practice questions

Courseiva writes every 350-601 question from scratch — 984 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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.