exam questions

Exam 300-535 All Questions

View all questions & answers for the 300-535 exam

Exam 300-535 topic 1 question 37 discussion

Actual exam question from Cisco's 300-535
Question #: 37
Topic #: 1
[All 300-535 Questions]


Refer to the exhibit. A Python script is created to add a new device on Cisco NSO using RESTCONF API. The device is added successfully, but a 405 Method Not
Allowed RESTCONF error code has received as the line to fetch SSH keys runs. Which code is missing to complete the script?

  • A. response = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys", auth=auth, headers=headers)
  • B. response = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys", auth=auth, headers=headers)
  • C. response = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/request-host-keys", auth=auth, headers=headers)
  • D. response = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/request-host-keys", auth=auth, headers=headers)
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

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
ZanaHiwa
Highly Voted 4 years, 1 month ago
B: B. response = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys", auth=auth, headers=headers)
upvoted 6 times
...
endermao
Highly Voted 4 years, 1 month ago
Agree with ZanaHiwa, B is the correct one
upvoted 5 times
...
maciey1989
Most Recent 8 months ago
But the questions says the script is failing with 'Method Not Allowed' so the missing line should use wrong method, which is PUT in answer A..
upvoted 2 times
...
working_on_hcip
1 year, 1 month ago
Selected Answer: B
I´ll go with B
upvoted 1 times
...
Zizu007
1 year, 6 months ago
B is the answer
upvoted 1 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 ...