Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Using Configuration Response Tag Elements in Junos XML Protocol Requests and Configuration Changes

The Junos XML protocol server encloses its response to each configuration request within <rpc-reply> and <configuration> elements. Enclosing each configuration response within a <configuration> element contrasts with how the server encloses each different operational response in an tag named for that type of response—for example, the <chassis-inventory> tag for chassis information or the <interface-information> tag for interface information.

The Junos XML tag elements within the <configuration> element represent configuration hierarchy levels, configuration objects, and object characteristics, always ordered from higher to deeper levels of the hierarchy. When a client application loads a configuration, it can emit the same tag elements in the same order as the Junos XML protocol server uses when returning configuration information. This consistent representation makes handling configuration information more straightforward. For instance, the client application can request the current configuration, store the Junos XML protocol server’s response to a local memory buffer, make changes or apply transformations to the buffered data, and submit the altered configuration as a change to the candidate configuration. Because the altered configuration is based on the Junos XML protocol server’s response, it is certain to be syntactically correct. For more information about changing routing platform configuration, see Requesting Configuration Changes Using the Junos XML Protocol.

Similarly, when a client application requests information about a configuration element (hierarchy level or configuration object), it uses the same elements that the Junos XML protocol server will return in response. To represent the element, the client application sends a complete stream of elements from the top of the configuration hierarchy (represented by the <configuration> tag) down to the requested element. The innermost element, which represents the level or object, is either empty or includes the identifier tag only. The Junos XML protocol server’s response includes the same stream of parent tag elements, but the tag element for the requested configuration element contains all the tag elements that represent the element’s characteristics or child levels. For more information, see Requesting Configuration Data Using the Junos XML Protocol.

The tag streams emitted by the Junos XML protocol server and by a client application can differ in the use of white space, as described in XML and Junos XML Management Protocol Conventions Overview.