The sample plug-in contains the container_util.xml file in the components directory. This file defines the container_util component, which defines several utilities for installing, booting, and managing Solaris containers. The following example creates a simple component with the following elements.
The path, name, description, and platform attributes to the <component> element provide specific information about the component type.
The <extends> element indicates that the container_util component extends the features available in the system#directory component type.
The <varlist> element defines several variables that enable the user to customize components based on this component type.
The <resourceReflList> element references the container_util resource.
The <installList> element deploys the container_util resource, and creates a snapshot of the target host after the resource is deployed.
<?xml version="1.0" encoding="UTF-8"?> <component platform='system#Solaris 10' xmlns='http://www.sun.com/schema/SPS' name='container_util' version='5.2' description='Solaris Container Utilities' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' softwareVendor='Sun Microsystems' path='/com/sun/solaris' xsi:schemaLocation='http://www.sun.com/schema/SPS component.xsd'> <extends> <type name='system#directory'></type> </extends> <varList> <var name='installPath' default=':[target:sys.raDataDir]:[/]systemcomps:[/]com.sun.solaris'></var> <var name='installPermissions' default='555'></var> <var name='installDiffDeploy' default='FALSE'></var> </varList> <resourceRef> <resource name='/com/sun/solaris/container_util' version='2.0'></resource> </resourceRef> <installList> <installSteps returns='false' name='default'> <deployResource></deployResource> <createSnapshot blockName='default'></createSnapshot> </installSteps> </installList> </component>