nerdexam
Cisco

200-901 · Question #246

Refer to the exhibit. A network engineer wants to automate the port enable/disable process on specific Cisco switches. The engineer creates a script to send a request through RESTCONF and uses ietf…

The correct answer is A. enable_function(Loopback1, true, 'iana-if-type:softwareLoopback'). Options C and D both start with 'def', which is the Python keyword for defining a function, not calling one. The task requires calling the function, not defining it. Option B passes the arguments in the wrong order (interface type before interface name). Option A correctly…

Understanding and Using APIs

Question

Refer to the exhibit. A network engineer wants to automate the port enable/disable process on specific Cisco switches. The engineer creates a script to send a request through RESTCONF and uses ietf as the YANG model and JSON as payload. Which command enables an interface named Loopback1?

Exhibit

200-901 question #246 exhibit

Options

  • Aenable_function(Loopback1, true, 'iana-if-type:softwareLoopback')
  • Benable_function('iana-if-type:softwareLoopback', Loopback1, true,)
  • Cdef enable_function('iana-if-type:softwareLoopback', Loopback1, false,)
  • Ddef enable_function(Loopback1, true, 'iana-if-type:softwareLoopback')

How the community answered

(44 responses)
  • A
    84% (37)
  • B
    9% (4)
  • C
    5% (2)
  • D
    2% (1)

Explanation

Options C and D both start with 'def', which is the Python keyword for defining a function, not calling one. The task requires calling the function, not defining it. Option B passes the arguments in the wrong order (interface type before interface name). Option A correctly calls the already-defined function with the proper argument order: interface name (Loopback1), enabled state (true to enable), and the IANA interface type ('iana-if-type:softwareLoopback'). This matches the IETF YANG model structure where the interface name, admin status, and type are required fields to enable a loopback interface via RESTCONF.

Topics

#RESTCONF#YANG#API Interaction#Network Automation

Community Discussion

No community discussion yet for this question.

Full 200-901 Practice