exam questions

Exam 350-601 All Questions

View all questions & answers for the 350-601 exam

Exam 350-601 topic 1 question 212 discussion

Actual exam question from Cisco's 350-601
Question #: 212
Topic #: 1
[All 350-601 Questions]

Refer to the exhibit.

Why does the Python code for Cisco NX-API print an error message?

  • A. The JSON is not a supported format for the NX-API.
  • B. The "type" is wrong in the header of the request and should be "cli_conf"
  • C. NX-API does not allow configuration for features via the requests module.
  • D. The "type" is wrong in the body of the request and should be "cli_conf"
Show Suggested Answer Hide Answer
Suggested Answer: D 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
john350601
Highly Voted 2 years, 9 months ago
D Seems to be right. "Commands that belong to different message types should not be mixed. For example, show commands are cli_show message type and are not supported in cli_conf mode." https://www.cisco.com/c/en/us/td/docs/switches/datacenter/nexus7000/sw/programmability/guide/cisco_nexus7000_programmability_guide_8x/b-cisco-nexus7000-programmability-guide-8x_chapter_011.html
upvoted 16 times
...
blurain
Highly Voted 2 years, 1 month ago
Answer is D, the payload "type" value is wrong in the body of the request. For the request to be successful, it should be changes to "cli_conf". For example, if we run the same request with the updated payload: { "ins_api": { "version": "1.0", "type": "cli_conf", "chunk": "0", "sid": "1", "input": "configure terminal ;feature hsrp", "output_format": "json" } } We get a 200 response: { "ins_api": { "sid": "eoc", "type": "cli_conf", "version": "1.0", "outputs": { "output": [ { "code": "200", "msg": "Success", "body": {} }, { "code": "200", "msg": "Success", "body": {} } ] } } } CLI verification: nxos9kv# sh run | inc hsrp feature hsrp
upvoted 10 times
...
Hsma
Most Recent 6 months, 4 weeks ago
Selected Answer: D
Answer should be D
upvoted 1 times
...
GuyThatTakesDumps
7 months, 2 weeks ago
Selected Answer: D
D is right!
upvoted 1 times
...
mauchi
1 year ago
Selected Answer: D
Ofc D is correct - JSON is indeed supported while running python modules on NXOS, the type in the header is ok (as the payload is indeed json code), and similarly NX-API support to do all config via python requests...
upvoted 1 times
...
engabelal
2 years, 3 months ago
Answer should be D
upvoted 4 times
...
Ultimabstract
2 years, 9 months ago
Answer should be D In the header, we specify the "content-type" = XML or JSON In the body, we specify the "type" = cli_show or cli_conf
upvoted 9 times
...
AllenT
2 years, 10 months ago
I think this is either B or D. I can't find anything on a requests module, but the cli_show type is for show commands.
upvoted 3 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago