Changes between Initial Version and Version 1 of bridge-ndl-to-controls

Show
Ignore:
Timestamp:
04/20/11 22:19:35 (8 years ago)
Author:
ibaldin (IP: 108.65.61.102)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • bridge-ndl-to-controls

    v1 v1  
     1= Bridging NDL resource descriptions to controls = 
     2 
     3== Overview ==  
     4 
     5Many 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.  
     6 
     7For example the SimpleVMControl required attributes to be specified (in the config file for the site authority): 
     8{{{ 
     9<attributes> 
     10    <attribute> 
     11        <key>resource.memory</key>                                                         
     12        <label>Memory</label> 
     13        <value>128</value> 
     14        <unit>MB</unit> 
     15        <type>integer</type> 
     16    </attribute> 
     17     <attribute> 
     18        <key>resource.cpu</key> 
     19        <label>CPU</label> 
     20        <value>1/2 of 2GHz Intel Xeon</value> 
     21        <type>String</type> 
     22    </attribute> 
     23</attributes> 
     24}}} 
     25 
     26Similarly, VlanControl policy requires properties: 
     27{{{ 
     28    <property name="vlan.tag.start" value="2" /> 
     29    <property name="vlan.tag.end" value="1002" /> 
     30}}} 
     31 
     32It is desirable to be able to bridge NDL-OWL resource descriptions to these controls in an automated fashion to reduce duplication of information.  
     33 
     34As 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: 
     35{{{ 
     36        public Properties getPoolProperties(); 
     37        public List <ResourcePoolAttributeDescriptor> getPoolAttributes(); 
     38}}} 
     39 
     40The class can implement whatever appropriate NDL-OWL query functions are needed to extract the necessary attributes and properties expected by the control.  
     41 
     42The 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.