To request that the JUNOScript server indicate the configuration group from which configuration elements are inherited, a client application combines the groups="groups" attribute with the 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="(defaults | inherit)" groups="groups"/>
<!- - OR - ->
<get-configuration inherit="(defaults | inherit)" groups="groups">
<!- - 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 groups="groups" attribute is combined with 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
When the groups="groups" attribute is combined with 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
The inherit and groups attributes can be combined with one or more of the following other attributes in the <get-configuration/> tag or opening <get-configuration> tag:
If the output is tagged with JUNOS XML tag elements (the format="xml" attribute is included or the format attribute is omitted), the JUNOScript server includes the junos:group="source-group" attribute in the opening tags of configuration elements that are inherited from configuration groups and encloses its response in <configuration> and <rpc-reply> tag elements. For information about the attributes in the opening <configuration> tag, see Requesting Information from the Committed or Candidate Configuration.
<rpc-reply xmlns:junos="URL">
<configuration attributes>
<!- - For each inherited element - ->
<!- - opening-tags-for-parents-of-the-element - ->
<inherited-element junos:group="source-group">
<inherited-child-of-inherited-element junos:group="source-group">
<!- - inherited-children-of-child junos:group="source-group" - ->
</inherited-child-of-inherited-element>
</inherited-element>
<!- - closing-tags-for-parents-of-the-element - ->
</configuration>
</rpc-reply>
If the output is formatted ASCII text (the format="text" attribute is included), the JUNOScript server encloses its response in <configuration-text> and <rpc-reply> tag elements, and inserts three commented lines immediately above each inherited element, as in the following:
<rpc-reply xmlns:junos="URL">
<configuration-text>
*/ For each inherited element */
/* parent levels for the element */
##
## 'inherited-element' was inherited from group 'source-group'
##
inherited-element {
##
## 'inherited-child' was inherited from group 'source-group'
##
inherited-child {
... child statements of inherited-child ...
}
}
/* closing braces for parent levels for the element */
</configuration-text>
</rpc-reply>
The application can also include the inherit and groups attributes after requesting an indicator for identifiers (as described in Requesting an Indicator for Identifiers).