Hp Matrix Operating Environment Software Bedienungsanleitung Seite 200

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 209
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 199
You can modify or delete existing rules, or add new custom rules. Rules are written in Java and
the Drools syntax.
Available hooks for customizing:
SubnetPolicyCheck.applyFitting
AttributeBasedSubnetPolicyCheck.applyFitting
SpecifiedSubnetPolicyCheck.applyFitting
AutomaticIpAddressPolicyCheck.applyFitting
StaticIpAddressPolicyCheck.applyFitting
DhcpIpAddressPolicyCheck.applyFitting
PhysicalServerPolicyCheck.applyFitting
PhysicalBootDiskPolicyCheck.applyFitting
NPIVDataDiskPolicyCheck.applyFitting
VirtualServerPolicyCheck.applyFitting
EsxDiskPolicyCheck.applyFitting
HypervDiskPolicyCheck.applyFitting
DasDiskPolicyCheck.applyFitting
SoftwarePolicyCheck.applyFitting
Writing a new rule file
Open a new drl file in a text editor, add the different sections of a rule file (as shown in “Rule
file” (page 198)), and add the new rule logic.
Package—The name of the package and is always com.hp.hpio.controller.policy.
Import—Declares the use of any other Java classes required to write the rule business logic.
Rules:
Define multiple rules in a single rule (.drl) file.
Each rule contains the business logic to be executed.
The INIT rule is a sample structure you can duplicate and use as a starting point to define
custom rules.
Tools such as Eclipse (http://downloads.jboss.com/drools/updatesite3.3/) can be used to write
rule files by including the Drools Eclipse plug-in to the create rule project and including the required
infrastructure orchestration libraries to the project. Using Eclipse helps with syntax highlighting and
auto code completion.
For more information, see the following documentation:
JBoss Rules User Guide at http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/
html_single/index.html
JBoss Rules at http://downloads.jboss.com/drools/docs/4.0.7.19894.GA/apidocs/index.html
Example: Custom rule
rule "CustomRule1"
when
$pVO : PolicyExecutionVO( );
$resLst : List();
/* --------------- CUSTOM LOGIC ------------------ */
// Get service entity and resource objects.
$logicalSubnet : LogicalSubnet();
$subnet : Subnet() from $resLst;
// call new user defined function with required arguments
// function has to return true in case of success or false
200 Customizable allocation process
Seitenansicht 199
1 2 ... 195 196 197 198 199 200 201 202 203 204 205 ... 208 209

Kommentare zu diesen Handbüchern

Keine Kommentare