QuestionQ98

Understanding and Using APIs

Question Image

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

  • A enable_function(Loopback1, true, 'iana-if-type:softwareLoopback')
  • B enable_function('iana-if-type:softwareLoopback', Loopback1, true,)
  • C def enable_function('iana-if-type:softwareLoopback', Loopback1, false,)
  • D def enable_function(Loopback1, true, 'iana-if-type:softwareLoopback')
Explanation

The function accepts its arguments in the order if_name, if_status, and if_type. Enabling the Loopback1 interface requires the values Loopback1, true, and iana-if-type:softwareLoopback in that order. Cisco RESTCONF interface data represents a loopback with the iana-if-type:softwareLoopback type and uses enabled: true to enable it.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!