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.
You can set these options at the following levels:
  • 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:
  • "true": emit a policy event when an operation successfully passes any policy assertion.
  • "false": do not emit a policy event when an operation successfully passes any policy assertion.
This attribute is optional; the default value is "true".
emit-failures The value of the emit-failures attribute can be either of the following values:
  • "true": emit a policy event when an operation fails any policy assertion.
  • "false": do not emit a policy event when an operation fails any policy assertion.
This attribute is optional; the default value is "true".
emit-warnings The value of the emit-warnings attribute can be either of the following values:
  • "true": emit a policy event when an operation passes any policy assertion with a warning.
  • "false": do not emit a policy event when an operation passes any policy assertion with a warning.
This attribute is optional; the default value is "true".
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.
This attribute is optional; the default value is "true".
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.
This attribute is optional; the default value is "true".
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.
This attribute is optional; the default value is "true".
The assertion element is optional. You can specify as many assertion elements as you want.

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>