[Contents] [Prev] [Next] [Index] [Report an Error]

Examples: Specifying Output Format for Configuration Groups

The following sample configuration hierarchy defines a configuration group called interface-group. The apply-groups statement applies the statements in the group at the [edit interfaces] hierarchy level:

[edit]
groups {
interface-group {
interfaces {
so-1/1/1 {
encapsulation ppp;
}
}
}
}
apply-groups interface-group;
interfaces {
fxp0 {
unit 0 {
family inet {
address 192.168.4.207/24;
}
}
}
}

When the inherit attribute is not included in the <get-configuration/> tag, the output includes the <groups> and <apply-groups> tag elements as separate items. The <groups> tag element encloses the tag elements defined in the interface-group configuration group. The placement of the <apply-groups> tag element directly above the <interfaces> tag element indicates that the [edit interfaces] hierarchy inherits the statements defined in the interface-group configuration group.

Image t1188.gif

When the inherit attribute is included in the <get-configuration/> tag, the <interfaces> tag element encloses the tag elements defined in the interface-group configuration group. The <groups> and <apply-groups> tag elements are not displayed.

Image t1189.gif

When the groups="groups" attribute is combined with the inherit attribute in the <get-configuration/> tag, the <interfaces> tag element encloses the tag elements defined in the interface-group configuration group, which are marked with the junos:group="interface-group" attribute.

Image t1190.gif
[Contents] [Prev] [Next] [Index] [Report an Error]