assertions
You use the assertions element in the policy analytics event emitter configuration file to specify which types of policy assertion event you want to emit.
You can choose whether or not you want to emit each of
the following policy assertion event:
- An operation successfully passes a policy assertion.
- An operation fails a policy assertion.
- An operation passes a policy assertion with a warning.
- Globally, so that they apply to all policy assertions.
- For specific policy assertions. Settings at this level override the global settings.
The assertions element has the following attributes, which
you use to specify the global settings:
| Attribute | Description |
|---|---|
| emit-passes | The value of the emit-passes attribute can be
either of the following values:
|
| emit-failures | The value of the emit-failures attribute can
be either of the following values:
|
| emit-warnings | The value of the emit-warnings attribute can
be either of the following values:
|
The assertions element contains the following element,
which you use to supply the settings for specific policy assertions:
- assertion
- The assertion element has the following attributes:
Attribute Description name The name of the policy assertion whose event log settings you want to specify. emit-pass The value of the emit-pass attribute can be either of the following values: - "true": emit a policy event when an operation successfully passes this policy assertion.
- "false": do not emit a policy event when an operation successfully passes this policy assertion.
emit-fail The value of the emit-fail attribute can be either of the following values: - "true": emit a policy event when an operation fails this policy assertion.
- "false": do not emit a policy event when an operation fails this policy assertion.
emit-warning The value of the emit-warning attribute can be either of the following values: - "true": emit a policy event when an operation passes this policy assertion with a warning.
- "false": do not emit a policy event when an operation passes this policy assertion with a warning.
Example
This example specifies global policy assertion event emitter settings, and overrides them for two specific policy assertions, CheckPropertyRange and CheckRelationshipCardinality.<assertions emit-passes="true" emit-failures="true" emit-warning="false">
<assertion name="CheckPropertyRange" emit-fail="true" emit-pass="false" emit-warning="true"/>
<assertion name="CheckRelationshipCardinality" emit-pass="false"
emit-fail="true" emit-warning="false"/>
</assertions>