Document toolboxDocument toolbox

Rule Editors

If you wish to create custom rules, you can use different methods of editing to create them. You can use graphical blocks of rule logic to perform mixing-and-matching of rule components or define rules through a full XML code editor backed by a dedicated XML schema. All rules are based on defining the device configuration strings, or entire sections of device configurations, that the rule will match against to perform policy operations.

Four rule editors are provided in the Rules tab:

  • Simple Rule Editor enables you to define a configuration file-based rule by specifying certain configuration file lines that MUST be present, and by specifying other lines that MAY NOT be present. Several options define how the lines are processed. Normally, each line entered in this editor is considered to be a regular expression that is matched against the configuration file. If you select one of the BLOCK options, the entire contents of the text box are considered a single regular expression. For more information, see Using the Simple Rule Editor.

  • CPD Editor enables you to specify rules in the legacy NetMRI CPD format. For more information, see Using the CPD Editor. This editor is provided for compatibility with older releases; Infoblox recommends using other editor types. For better performance and more understandable logic, use the ConfigBlockCheck element in the Raw XML editor in preference to the CPD editor. For more information, see Using Configuration Block Checks.

  • Rule Logic Builder enables you to define individual logical tests, then combine them with AND, OR, parentheses, and IF-THEN-ELSE logic. For more information, see Using the Rule Logic Builder.

  • Raw XML Editor allows modification of a rule's XML representation. When the user saves a new rule in the Raw XML Editor, the XML schema for the policy engine validates the rule and highlights any problems in the rule when the user attempts to save their work. The XML Editor is the most powerful rule creation tool but also the most technically demanding. For more information, see Using the Raw XML Editor.

All four editors are available only for creating new policy rules or editing rules you previously created.

Once you save a new rule, and it was not created in the Raw XML Editor, you can change the rule's editor to the Raw XML Editor. If you create a rule from, for example, the Rule Logic Builder, will see the XML generated by the previous rule editor when you open it in the Raw XML editor. The reverse is not true: If you create a new rule in the Raw XML Editor, and decide to open it in another editor type, the results will not be the same and changes will be lost, because XML code is likely to differ from the output of the other editor types.

You can gain a better understanding of how to formulate rules by examining the example rules included with your appliance.