This KB describes the change of XML output of show task replication command that was implemented in 23.1R1 and newer JunOS OS and JunOS OS Evolved releases.
show task replication
Starting from 23.1R1 release, XML output of show task replication has the following format:
show task replication | display xml <rpc-reply xmlns:junos="http://xml.juniper.net/junos/23.4R2-S3.9/junos"> <task-replication-state> <task-gres-state>Enabled</task-gres-state> <task-re-mode>Master</task-re-mode> <task-protocol-replication> <task-protocol-replication-name>OSPF</task-protocol-replication-name> <task-protocol-replication-state>Complete</task-protocol-replication-state> <task-protocol-replication-name>BGP</task-protocol-replication-name> <task-protocol-replication-state>Complete</task-protocol-replication-state> </task-protocol-replication> </task-replication-state> <cli> <banner>{master}</banner> </cli> </rpc-reply>
In earlier releases the XML structure was different:
show task replication | display xml <rpc-reply xmlns:junos="http://xml.juniper.net/junos/22.4R0/junos"> <task-replication-state> <task-gres-state>Enabled</task-gres-state> <task-re-mode>Master</task-re-mode> <task-protocol-replication-name>OSPF</task-protocol-replication-name> <task-protocol-replication-state>Complete</task-protocol-replication-state> <task-protocol-replication-name>BGP</task-protocol-replication-name> <task-protocol-replication-state>Complete</task-protocol-replication-state> </task-replication-state> <cli> <banner>{master}</banner> </cli> </rpc-reply>
The reason for this change was the fact that the generated XML output was invalid:
show task replication | display xml validate ERROR: Duplicate data element <task-protocol-replication-name> ERROR: Duplicate data element <task-protocol-replication-state> ERROR: Duplicate data element <task-protocol-replication-name> ERROR: Duplicate data element <task-protocol-replication-state> FAIL: The emitted XML is INVALID
In 23.1R1 and newer releases, the generated XML output is valid:
show task replication | display xml validate PASS: The emitted XML is VALID
This change was mentioned in the release notes for 23.1R1 (PTX, JunOS OS Evolved) and 23.2R1 (MX/EX/ACX/etc., Junos OS and JunOS OS Evolved):
https://www.juniper.net/documentation/us/en/software/junos/release-notes/23.1/junos-evo-release-notes-23.1r1/topics/what-changed/ptx-what-change-cover.html
https://www.juniper.net/documentation/us/en/software/junos/release-notes/23.2/junos-release-notes-23.2r1/topics/what-changed/mx-what-change-cover.html
Prior to this change the output of a show task replication | display xml validate returned an error of the form ERROR: Duplicate data element <task-protocol-replication-name>. With this change the XML output is properly structured with no validation errors.
show task replication | display xml validate
ERROR: Duplicate data element <task-protocol-replication-name>