Version 1 (modified by ibaldin, 8 years ago)

--

Bridging NDL resource descriptions to controls

Overview

Many existing ORCA controls use table-driven resource descriptions (resource, type, quantity) tuples. Examples of such controls are orca.policy.core.SimpleVMControl used for XX.vm resources and orca.policy.core.VlanContro? used for XX.vlan resources. Controls are specified as part of resource pool specification in the actors configuration file. Originally ORCA required duplicate specification of resources in both NDL and attributes and properties in the actors configuration file.

For example the SimpleVMControl required attributes to be specified (in the config file for the site authority):

<attributes>
    <attribute>
        <key>resource.memory</key>                                                        
        <label>Memory</label>
        <value>128</value>
        <unit>MB</unit>
        <type>integer</type>
    </attribute>
     <attribute>
        <key>resource.cpu</key>
        <label>CPU</label>
        <value>1/2 of 2GHz Intel Xeon</value>
        <type>String</type>
    </attribute>
</attributes>

Similarly, VlanControl? policy requires properties:

    <property name="vlan.tag.start" value="2" />
    <property name="vlan.tag.end" value="1002" />

It is desirable to be able to bridge NDL-OWL resource descriptions to these controls in an automated fashion to reduce duplication of information.

As of Camano 3.0 ORCA implements this bridging with a set of classes in orca.network.policyhelpers package. Each policy helper subclassed from GenericNDLPoolPropertyExtractor and implements one or both of the following methods:

	public Properties getPoolProperties();
	public List <ResourcePoolAttributeDescriptor> getPoolAttributes();

The class can implement whatever appropriate NDL-OWL query functions are needed to extract the necessary attributes and properties expected by the control.

The final step is adding a new class name into the static map (from Control names to property extractor classes) maintained in orca.boot.inventory.NdlResourcePoolFactory?.java. At boot time the NDL-OWL file describing the resources of the appropriate authority will be parsed and properties and attributes will be generated and attached to the resource pool.