HP-UX CMGR A.02.01 Administrator's and Developer's Guide
26
The xi:include element has the following attribute:
Attribute Description
href
Required.
The url of a local file identifying additional XML data to be included in the CMGR
template. For example:
<xi:include href="file:/etc/opt/example.xml"/>
2.4 Common Attributes
The CMGR template includes command attributes and handler specific attributes. You can also create
your own attributes.
The cmgr command supports the following attributes:
Attribute Description
compartment
The name of the compartment for the add, delete, and replace operation, or a
comma separated list of compartment names for the
list
and
status
operation.
id
Element identity, does not have to be unique.
if
Specifies a condition that must be true for cmgr to process the element. Can be any
valid Perl condition statement.
if_op
Limits the cmgr processing of this element to cases with a matching cmgr operation
argument. Valid values are the complete form of any cmgr operation argument.
Multiple operations may be specified when seperated with the
|
sign.
NOTE: The if and if_op attributes are very useful with the data element to specify operations
based processing for the Configuration Elements.
2.5 Example: Building a Template
Example 2.1 demonstrates the capabilities of CMGR by providing a simplified version of dynamic
host firewall rule management. With this example template, an administrator or application that
detects undesirable traffic on a TCP port can instruct cmgr to generate an IPFilter rule to block all
traffic from the offending source IP address for the specified port, and to log these actions with
syslog. By associating each blocking request with an identifier, individual rules can be replaced or
deleted with cmgr.
CAUTION: To avoid effecting system-wide IPFilter configuration,
Example 2.1 operates on an
alternate IPFilter configuration file (/tmp/example_ipf.conf). HP recommends that you do not use
this template on a production system.
Figure 2.1 shows the sequence of actions that occur in
Example 2.1. The sequence of actions are
labeled from 1 to 4 and are referred to in the example comments.