By default, the JUNOScript server displays the tag element for each user-defined configuration group as a child of the <groups> tag element, instead of displaying them as children of the elements to which they are applied. This display mode parallels the default behavior of the CLI configuration mode show command, which displays the [edit groups] hierarchy as a separate hierarchy in the configuration.
To request that the JUNOScript server not display the <groups> or <apply-groups> tag elements separately, but instead enclose tag elements inherited from user-defined groups within the inheriting tag elements, a client application includes the inherit="inherit" attribute in the <get-configuration/> tag or opening <get-configuration> tag. It encloses the request in an <rpc> tag element:
<rpc>
<get-configuration inherit="inherit"/>
<!- - OR - ->
<get-configuration inherit="inherit">
<!- - tag elements for the configuration elements to return - ->
</get-configuration>
</rpc>
To request that the JUNOScript server include tag elements that are inherited from the junos-defaults group as well as user-defined configuration groups, the client application includes the inherit="defaults" attribute in the <get-configuration/> tag or opening <get-configuration> tag:
<rpc>
<get-configuration inherit="defaults"/>
<!- - OR - ->
<get-configuration inherit="defaults">
<!- - 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.
When the client includes the inherit="inherit" attribute, the output includes the same information as the output from the following CLI configuration mode command, and does not include configuration elements inherited from the junos-defaults group:
- user@host# show | display inheritance | except
##
When the client includes the inherit="defaults" attribute, the output includes the same information as the output from the following CLI configuration mode command:
- user@host# show | display inheritance defaults
| except ##
In both cases, the JUNOScript server encloses its output in the <rpc-reply> tag element and either the <configuration> tag element (for JUNOS XML-tagged output) or <configuration-text> tag element (for formatted ASCII output). For information about the attributes in the opening <configuration> tag, see Requesting Information from the Committed or Candidate Configuration.
<rpc-reply xmlns:junos="URL">
<!- - EITHER - ->
<configuration attributes>
<!- - JUNOS XML tag elements representing configuration elements - ->
</configuration>
<!- - OR - ->
<configuration-text>
<!- - formatted ASCII configuration statements - ->
</configuration-text>
</rpc-reply>
The inherit attribute can be combined with one or more of the following other attributes in the <get-configuration/> tag or opening <get-configuration> tag:
The application can also include the inherit attribute after requesting an indicator for identifiers (as described in Requesting an Indicator for Identifiers).