HP Insight Orchestration 6.3 User Guide

pre-defined entry points (or hooks), enabled state, and the corresponding rule files. A sample entry
in the policy.xml file is shown in the following figure.
The name PhysicalServerPolicyCheck.applyFitting in the figure indicates the
entry point or hook for the physical server fitting process.
The enabled flag, enables or disables the rule-based fitting for this hook.
The <policy-rule-file> provides the list of rule files to apply during the fitting process.
When the customizable allocation process initiates, Insight Orchestration reads the policy.xml
file and uses this information to locate the fitting process to use by referencing the corresponding
hook status. If the hook is enabled, the hook uses the rule-based fitting process, otherwise it continues
to use the default fitting process.
You must restart the Insight Orchestration Windows service to reflect any changes made to the
policy file.
Rule file
A rule file is typically a text file with a .drl extension. In a .drl file, you can have multiple rules,
queries, and functions, as well as resource declarations assigned and used by the rules and queries.
You can also separate your rules into multiple rule files to help manage large numbers of rules.
The overall structure of a rule file is:
package package-name
imports
globals
functions
queries
rules
The order in which the elements are declared is not important, except for the package name. If
you declare a package name, it must be the first element in the rule file.
Example: Rule to verify server memory criteria
package com.hp.hpio.controller.policy;
import java.util.List;
import java.lang.Integer;
import com.hp._2007.ess.sw.model.infrastructureutilityschema.LogicalServer;
import com.hp._2007.ess.sw.model.infrastructureutilityschema.ComputeServer;
import com.hp.hpio.controller.wrapper.LogicalServerWrapper;
import com.hp.hpio.common.messages.HPIOBundleKey;
import com.hp.hpio.common.messages.HPIOMessage;
dialect "java" // Since we are using Java syntax with drools
/*
* INIT should be the first rule in a drl file which inserts service
* entity, resource list and result map into working memory by reading
* from PolicyExecutionVO passed to rule engine.
*
*/
/* DO NOT MODIFY */
62 Insight Orchestration provisioning and allocation