QuestionQ52

NETCONF/XML API

Refer to the exhibit.

Question Image

Which Junos command produces the output shown in the exhibit?

  • A show chassis alarms
  • B show chassis alarms | display xml rpc
  • C show chassis alarms | display xml
  • D show chassis alarms | display json
Explanation

The '| display xml rpc' modifier in the Junos CLI reveals the Junos XML API request tag element that corresponds to a given operational-mode command, without actually executing the command and returning real result data. For 'show chassis alarms', the corresponding Junos XML RPC request tag is <get-alarm-information>, which is why the output shows an empty <get-alarm-information></get-alarm-information> element nested inside <rpc> tags, along with the standard <cli><banner></banner></cli> block that Junos always appends to CLI-originated RPC replies. This is distinct from '| display xml', which returns the actual processed RESPONSE data (e.g., an <alarm-information> element containing real alarm details or a <no-active-alarms/> indicator) rather than just the empty request tag, and distinct from plain 'show chassis alarms', which returns plain-text output with no XML at all, and from '| display json', which would format the output as JSON rather than XML.

Learn more

Community Discussion

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