Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 

Using NETCONF Configuration Response Tag Elements in NETCONF Requests and Configuration Changes

 

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

The Junos XML tag elements within the <configuration> tag 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 NETCONF 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 NETCONF server’s response in 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 NETCONF server’s response, it is certain to be syntactically correct.

Similarly, when a client application requests information about a configuration element (hierarchy level or configuration object), it uses the same tag elements that the NETCONF server will return in response. To represent the element, the client application sends a complete stream of tag elements from the top of the configuration hierarchy (represented by the <configuration> tag element) down to the requested element. The innermost tag element, which represents the level or object, is either empty or includes the identifier tag element only. The NETCONF 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 NETCONF.

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