Sun N1 Service Provisioning System 5.2 プラグイン開発ガイド

単純コンポーネントの例

このプラグイン例では、components ディレクトリに container_util.xml ファイルがあります。このファイルでは、container_util コンポーネントを定義しています。このコンポーネントでは、Solaris のコンテナをインストール、起動、および管理する複数のユーティリティーを定義しています。このあとに示す例では、次の要素を指定して単純コンポーネントを作成しています。

<?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>