A network engineer is automating the configuration of a new VLAN on a Cisco Catalyst 9000 switch using RESTCONF. The engineer sends a PUT request to the URI 'https://switch/restconf/data/Cisco-NX-OS-device:Native/VlanList' with a JSON payload containing the VLAN details. The switch responds with a 405 Method Not Allowed error. What is the most likely cause of this error?
Trap 1: The engineer used the wrong URI; the correct URI should include a…
Incorrect because the URI for creating a new list entry does not require a specific ID; the POST method is used to add an entry to the list.
Trap 2: The payload format is incorrect; the engineer must use XML instead…
Incorrect because RESTCONF supports both JSON and XML; the format is not the cause of a 405 error.
Trap 3: The switch does not support RESTCONF for VLAN configuration;…
Incorrect because Cisco Catalyst 9000 switches support RESTCONF for VLAN configuration; the error is method-related.
- A
The engineer used the wrong URI; the correct URI should include a specific VLAN ID.
Why wrong: Incorrect because the URI for creating a new list entry does not require a specific ID; the POST method is used to add an entry to the list.
- B
The engineer should have used the POST method instead of PUT to create a new list entry.
Correct because RESTCONF uses POST to create a new resource in a list, while PUT is used to replace an existing resource.
- C
The payload format is incorrect; the engineer must use XML instead of JSON.
Why wrong: Incorrect because RESTCONF supports both JSON and XML; the format is not the cause of a 405 error.
- D
The switch does not support RESTCONF for VLAN configuration; NETCONF must be used instead.
Why wrong: Incorrect because Cisco Catalyst 9000 switches support RESTCONF for VLAN configuration; the error is method-related.