diff options
Diffstat (limited to 'modules/CIAO/docs/schema/ServerResourceUsage.txt')
-rw-r--r-- | modules/CIAO/docs/schema/ServerResourceUsage.txt | 119 |
1 files changed, 119 insertions, 0 deletions
diff --git a/modules/CIAO/docs/schema/ServerResourceUsage.txt b/modules/CIAO/docs/schema/ServerResourceUsage.txt new file mode 100644 index 00000000000..d8fc47ca7b3 --- /dev/null +++ b/modules/CIAO/docs/schema/ServerResourceUsage.txt @@ -0,0 +1,119 @@ + How to use CIAOServerResources.xsd + +Assuming we store two CIAO:ServerResources documents in two XML files +called "RTLinuxServerConfig.csr" and "RTwIN32ServerConfig.csr" +respectively. Two things need to happen in order to use the +PolicySet's defined in these files. First, we need to tell the DnC +tools what are all the CIAOServerResources files a DeploymentPlan +needs. This can easily be done by enumerating all these file in the +<infoProperty> element under the <DeploymentPlan>. For example, the +following XML document snippet shows a DeploymentPlan will reference +to two aforementioned CIAO:ServerResources files. The property name +"CIAOServerResourceRef" is a CIAO-specific extension that signifies +this need. The values of these properties simply specify the +filenames. + + + <infoProperty> + <name>CIAOServerResourceRef</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>RTLinuxServerConfig.csr</string> + </value> + </value> + + <name>CIAOServerResourceRef</name> + <value> + <type> + <kind>tk_string</kind> + </type> + <value> + <string>RTWin32ServerConfig.csr</string> + </value> + </value> + </infoProperty> + +Second, we can now use the policy sets defined in these files by +associating a policy set with the entity the policy set will be +applied on. Currently, only associations with component instances are +supported. A component instance in deployment plan can specify the +policy set it wishes to be instantiated with. A PolicySet is +referenced by its name and the CIAO:ServerResources name. + + <deploymentplan> + .... + <instance ...> + + <deployedResource> + <resourceUsage>InstanceUsesResource</resourceUsage> + <requirementName>CIAO:PolicySet</requirementName> + <resourceName>here_we_insert_the_name_defined_in_CIAO:ServerResources</resourcename> + <property> +// +// name could be CIAO:InstancePolicy or CIAO:ReceptaclePolicy. +// Here we show an example of an CIAO::InstancePolicy. +// + <name>CIAO:InstancePolicy</name> + <value> + <type>tk_string</type> + <value> + <string>here_we_insert_the_PolicySet_name_defined_in_the_ServerResources</string> + </value> + </value> + </property> + </deployedResource> + +// Now we show an example of a CIAO:ReceptaclePolicy. +// + <deployedResource> + <resourceUsage>InstanceUsesResource</resourceUsage> + <requirementName>CIAO:PolicySet</requirementName> + <resourceName>here_we_insert_the_name_defined_in_CIAO:ServerResources</resourcename> +// +// First we specify that we are going to define a receptacle policy. +// + <property> +// +// Note the name of the policy. +// + <name>CIAO:ReceptaclePolicy</name> + <value> + <type>tk_string</type> + <value> + <string>here_we_insert_the_PolicySet_name_defined_in_the_ServerResources</string> + </value> + </value> + </property> +// +// Now we specify the receptacle (using the receptacle name) that is going to +// be associated with this policy. +// + <property> + <name>receptacle name from the .ccd file</name> + <value> + <type>tk_string</type> + <value> + <string>here_we_insert_the_PolicySet_name_defined_in_the_ServerResources</string> + </value> + </value> + </property> + </deployedResource> + + </instance> + </instance> + </deploymentplan> + +If only the name of the CIAO:ServerResources is specified, we are +using it as a collocation constraint. In this case, the +<deployedResource> will contain no <property> sub-element. Component +instances with different <resourceName> values will be deployed to the +same target node with different ServerResources names. DAnCE should +create two differnet NodeApplication on the same node. + +Likewise, specifying different CIAO:PolicySet IDs will force component +instances to be deployed into different containers (if they have the +same target node and ServerResource ID.) + |