Q6) RESTCONF URL for an interface description
You want to update only the description of interface GigabitEthernet1 using the standard ietf-interfaces model. Which resource path is correct?
A. /restconf/data/interfaces/interface/GigabitEthernet1/description
B. /restconf/data/ietf-interfaces:interfaces/interface=GigabitEthernet1/description
C. /restconf/operations/ietf-interfaces:interfaces/interface[name=GigabitEthernet1]/config/description
D. /restconf/data/ietf-interfaces:interfaces/GigabitEthernet1/description
Detailed Explanation: In RESTCONF, list instances are addressed as listName=keyValue. For ietf-interfaces, the list is interface keyed by name, so interface=GigabitEthernet1. The data root and module prefix are required.
Q7) Safe rollback if commit isn’t confirmed (NETCONF)
You use the <candidate> datastore and want the device to auto-rollback unless your app confirms the change within 2 minutes. What’s the correct sequence?
A. Send <commit>, then <confirmed-commit>
B. Send <commit confirmed="true" timeout="120">, then send <commit> before timeout
C. Send <validate>, then <discard-changes>
D. Send <commit> with <rollback-on-error/>
Detailed Explanation: A confirmed commit starts a timer and applies changes temporarily. If you don’t follow with a regular <commit> before the timeout, the device automatically rolls back.
Q8) OAuth2 for a SPA calling Cisco APIs on behalf of a user
A browser-only single-page app (no backend) needs user login and tokens to call Web APIs. Which OAuth 2.0/OIDC flow is recommended?
A. Client Credentials
B. Authorization Code with PKCE
C. Resource Owner Password Credentials
D. Implicit Grant
Detailed Explanation: SPAs should use Authorization Code with PKCE for security. Implicit is deprecated; Client Credentials is app-only (no user), and ROPC is discouraged.
Q9) gNMI path for OpenConfig interface counters
You need a subscription to interface counters for GigabitEthernet1 using OpenConfig. Which path is correct?
A. /interfaces/interface[name=GigabitEthernet1]/state/counters
B. /ietf-interfaces:interfaces/interface=GigabitEthernet1/counters
C. /openconfig-telemetry:subscription/GigabitEthernet1/counters
D. /ifmib:ifTable/ifEntry/GigabitEthernet1/counter
Detailed Explanation: OpenConfig uses the /interfaces/interface[name=...]/state/counters hierarchy for counters. Option B mixes models; C/D are not valid OpenConfig gNMI data paths.
Q10) Preventing lost updates with RESTCONF
Two automations may edit the same resource. How can you ensure your update only applies if no one changed the resource since you last read it?
A. Include If-Match: <ETag>; server rejects with 412 if the ETag no longer matches
B. Add Cache-Control: no-cache to the request
C. Use If-Modified-Since with the last change time
D. There is no mechanism for this in RESTCONF
Detailed Explanation: Use optimistic concurrency: read the resource to get its ETag, then send updates with If-Match. If the server’s ETag differs, you get 412 Precondition Failed, preventing accidental overwrite.