nerdexam
Cisco

300-535 · Question #63

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 correct answer is B. response = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",. See the full explanation below for the reasoning.

Question

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?

Exhibit

300-535 question #63 exhibit

Options

  • Aresponse = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",
  • Bresponse = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/fetch-host-keys",
  • Cresponse = requests.post(baseUriOperation + "/devices/device=ios-device/ssh/request-host-
  • Dresponse = requests.put(baseUriOperation + "/devices/device=ios-device/ssh/request-host-keys",

How the community answered

(47 responses)
  • A
    15% (7)
  • B
    74% (35)
  • C
    4% (2)
  • D
    6% (3)

Community Discussion

No community discussion yet for this question.

Full 300-535 Practice