To request that the JUNOScript server indicate which configuration elements have changed since the last commit, a client application includes the changed="changed" attribute in the <get-configuration/> tag or opening <get-configuration> tag. It encloses the request in an <rpc> tag element:
<rpc>
<get-configuration changed="changed"/>
<!- - OR - ->
<get-configuration changed="changed">
<!- - tag elements for the configuration elements to return - ->
</get-configuration>
</rpc>
For information about the tag elements to enclose in the <get-configuration> tag element, see Specifying the Scope of Configuration Information to Return.
The JUNOScript server indicates which elements have changed by including the junos:changed="changed" attribute in the opening tag of every parent tag element in the path to the changed configuration element. If the changed configuration element is represented by a single (empty) tag, the junos:changed="changed" attribute appears in the tag. If the changed element is represented by a container tag element, the junos:changed="changed" attribute appears in the opening container tag and also in the opening tag for each child tag element enclosed in the container tag element.
The JUNOScript server encloses its response in <rpc-reply> and <configuration> tag elements. For information about the standard attributes in the opening <configuration> tag, see Requesting Information from the Committed or Candidate Configuration.
<rpc-reply xmlns:junos="URL">
<configuration standard-attributes junos:changed="changed">
<!- - opening-tag-for-each-parent-level junos:changed="changed" - ->
<!- - For each changed element, EITHER - ->
<element junos:changed="changed"/>
<!- - OR - ->
<element junos:changed="changed">
<first-child-of-element junos:changed="changed">
<second-child-of-element junos:changed="changed">
<!- - additional children of element - ->
</element>
<!- - closing-tag-for-each-parent-level - ->
</configuration>
</rpc-reply>
![]() |
Note: When a commit operation succeeds, the JUNOScript server removes the junos:changed="changed" attribute from all tag elements. However, if warnings are generated during the commit, the attribute is not removed. In this case, the junos:changed="changed" attribute appears on tag elements that changed before the commit as well as those that changed after the commit. An example of a commit-time warning is the message explaining that a configuration element will not actually apply until the routing platform is rebooted. The warning appears in the tag string that the JUNOScript server returns to confirm the success of the commit, enclosed in an <xnm:warning> tag element. To remove the junos:changed="changed" attribute from elements that changed before the commit, the client application must take any action necessary to eliminate the cause of the warning, and commit the configuration again. |
The changed attribute can be combined with one or more of the following other attributes in the <get-configuration/> tag or opening <get-configuration> tag:
It does not make sense to combine the changed attribute with the format="text" attribute. The junos:changed="changed" attribute appears only in JUNOS XML-tagged output, which is the default output format.
The application can also include the changed attribute after requesting an indicator for identifiers (as described in Requesting an Indicator for Identifiers).
The following example shows how to request change indicators for configuration elements at the [edit system syslog] hierarchy level in the candidate configuration. The output indicates that a log file called interactive-commands has been configured since the last commit.
