The contents of a bundle jar are described in an XML descriptor file, located in the top level directory of the bundle jar file. The rest of the jar file is composed of XML representations of the entities that were the result of bundle template's search criteria.
The XML descriptor file is enclosed in the <bundle> element. The <bundle> element is a new element for this release, and is not described in the XML Schema Guide.
You can manually create a bundle jar, or modify it after it has been automatically created by the system. This is on the condition that the jar contents are always consistent with the bundle descriptor file.
The <bundle> element has the following attributes.
Table 5–2 Bundle Element Attributes|
Bundle Element Attribute Name |
Type |
Required |
Description |
|---|---|---|---|
|
xmlns |
String |
yes |
Required value: the first component of the schemaLocation attribute is http://www.sun.com/schema/SPS |
|
xmlns:xsi |
String |
yes |
Required value: http://www.w3.org/2001/XMLSchema-instance |
|
xsi:schemaLocation |
String |
no |
Recommended value: http://www.sun.com/schema/SPS bundle.xsd |
|
name |
String |
yes |
The name of the bundle |
|
description |
String |
no |
The description of the bundle. Default is no description |
|
exportedAt |
String |
yes |
The date, time, time zone information on when the bundle was exported. |
|
source |
String |
yes |
IP address/Port number of the master server from which the bundle was exported. |
|
userName |
String |
yes |
Name of the user who exported the bundle. |
|
schemaVersion |
schemaVersion |
yes |
The version of the plugin XML schema being used. |
The <bundle> element has the following child element.
memberList: List of member objects to create as part of the bundle. These member objects can include 1 or more objects of:
folder
hostType
hostSet
hostSearch
component
plan
The <memberList> element has the following child elements:
<folder>
<hostType>
<hostSet>
<hostSearch>
<component>
<plan>
The <folder> element is a child of the <memberList>element. It is used to declare a folder to be referenced by the bundle. The owner of these folders is the group you choose when importing.
The <folder> element has two attributes:
name – The name of the folder to be referenced by the bundle jar.
description – The optional description of the folder. Default is none.
The <hostType> element is a child of the <memberList>element. It is used to declare a hostType to be referenced by the bundle.
The <hostType> element has two attributes:
name – The name of the hostType to be referenced by the bundle jar.
description – The optional description of the hostType. Default is no description.
The <hostType> element contains an optional <varList> child element. The <varList> element specifies a list of variables to be added to the <hostType> element and later used by hosts in configuration.
The <varlist> element contains one or more <var> child elements. The <var> element provides <hostType> element variable declaration through two required attributes:
The <hostSet> element is a child of the <memberList> element and is used to declare a host set to be referenced by the bundle. The <hostSet> element cannot contain hosts, since bundles cannot define hosts.
The <hostSet> element contains two optional child elements:
<hostSetRef>
<hostSearchRef>
The <hostSet> element has two attributes:
The <hostSetRef> element is a child of the <hostSet> element. It specifies a sub-host set. This host set must have been previously defined either in this bundle or in the master server on which the bundle is being imported.
The <hostSetRef> element has one attribute, name. This attribute provides the name of the host set reference.
The <hostSearchRef> element is a child of the <hostSet> element. It specifies a sub-host search. This host search must have been previously defined either in this bundle or in the master server on which the bundle is being imported.
The <hostSearchRef> element has one attribute, name. This attribute provides the name of the host search reference.
The bundle <hostSearch> element is a child of the <memberList> element and is used to declare a host search to be referenced by the bundle.
The <hostSearch> element contains at least one of the following child elements:
<criteriaList>
<appTypeCriteria>
<physicalCriteria>
Although the <criteriaList>, <appTypeCriteria>, and <physicalCriteria> elements are each optional, one of the three must be provided.
The <hostSearch> element has two attributes:
The <criteriaList> element is a child of the <hostSearch> element. It specifies a list of criteria to be added to the <hostSearch> element. The <criteriaList> element must be specified if <appTypeCriteria> and <physicalCriteria> are not specified.
The <criteriaList> element contains one or more <criteria> elements. The <criteria> element specifies a search criteria, including name, match type, and pattern.
The <criteria> element has three attributes:
The <appTypeCriteria> element is a child of the <hostSearch> element. It specifies a list of application type criteria to be added to the <hostSearch> element. The arguments of the <appTypeCriteria> element are expressed as attributes, and order is not important. If all values are false or the element is empty or unspecified, the search disregards this criteria when performing the search. The <appTypeCriteria> element must be specified if <criteriaList> and <physicalCriteria> are not.
The <appTypeCriteria> element has three optional attributes:
ms – If true, match MasterServer application type in host search. The default is false.
ld – If true, match LocalDistributor application type in host search. The default is false.
ra – If true, match RemoteAgent application type in host search. The default is false.
The <physicalCriteria> element is a child of the <hostSearch> element. It specifies a list of physical type criteria to be added to the <hostSearch> element. The arguments of the <physicalCriteria> element are expressed as attributes, and order is not important. If all values are false or the element is empty or unspecified, the search disregards this criteria when performing the search. The <physicalCriteria> element must be specified if <criteriaList> and <appTypeCriteria> are not.
The <physicalCriteria> element has two optional attributes:
physical – If true, match physical host types in host search. The default is false.
virtual – If true, match virtual host types in host search. The default is false.
The <component> element is a child of the <memberList> element and is used to declare a component in the bundle jar. All objects referenced by this component must have been previously defined either in this bundle or on the master server on which the bundle is being imported.
The <component> element contains three optional child elements:
<systemService>
<componentType>
<resource>
The <component> element has two attributes:
jarPath – The location of the component XML file, relative to the root of the bundle jar (leading / or . characters are not permitted). The format of the component XML is specified by the Plan and Component Language specification. See Chapter 3, Component Schema, in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide for more information.
majorVersion – An optional attribute that determines whether to check in the component as a new major version. The default is false.
The <systemService> element is a child of the <component> element and is used to declare a system service backed by the containing component. This element may not be used with the <componentType> element. When the <systemService> element is used in a <component> element, a component is loaded and a <systemServiceRef> that references that component is created.
The <systemService> element has two attributes:
The <componentType> element is a child of the <component> element and is used to declare a component type backed by the containing component. The <componentType> element may not be used with the <systemService> element. When the <componentType> element used in a <component> element, a component is loaded and a component type that is backed by that component is created.
The <componentType> element has five attributes:
name – The name of the component type.
A name has a maximum of 64 characters. The name must start with a letter or underscore, followed by any number of letters, digits, or special characters, such as underscore (_), period (.), plus (+), minus (-), and space ( ). Unicode letters and digits are permitted.
description – An optional description of the component type.
group – The group name of the component type.
order – A number that identifies where to put this component type.
indentLevel – A number between 0 and 10 that identifies the level to which to indent this component type in a hierarchy of component types.
The <resource> element is a child of the <component> element. It specifies a resource file name and location in the jar. A resource is always checked in as a either a file-typed or a directory-typed resource. The component that contains the <resource> element must be a simple component whose <resourceRef> element refers to the resource created by the <resource> element. No component variables are automatically added to the component that contains the <resource> element, regardless of the value of the config attribute.
The <resource> element has three attributes:
jarPath – The location of the resource file, relative to the root of the bundle jar. Leading / or . characters are not permitted. For directory-type resources, this path is assumed to be a directory, and is expected to end with a /. Everything in this directory defines the contents of this resource.
majorVersion – An optional attribute that determines whether to check in the resource as a new major version. The default is false.
name – An optional attribute that is the name of the resource. If not specified, the name will default to the absolute jarPath, which is converted to absolute if specified as relative.
config – An optional attribute that specifies whether this resource is a configuration template.The default is false.
type – An optional attribute that specifies whether the resource is a file or a directory. Use FILE for a file resource. Use DIRECTORY for a directory resource. If omitted, the default is FILE.
checkInMode – An optional attribute that specifies whether a directory-type resource should be replaced or appended. Use REPLACE if the check in of this resource should replace an existing version. Use ADD_TO if the check in should add to the resource. The default is REPLACE. This attribute only applies to a resource that has a type of DIRECTORY.
descriptorPath – An optional attribute that specifies the path to a resource descriptor file, relative to the root of the bundle jar. Leading / or . characters are not permitted. The format of the resource descriptor file follows the Resource Descriptor schema, as described in Chapter 5, Resource Descriptor Schema, in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide.
If no resource descriptor file is specified, permissions information is used from the default file system settings of the master server. In this case, owner and group are not stored. This is also the case for settings that are omitted from a descriptor (either no entry or a partial entry for a file within the resource).
The <plan> element is a child of the <memberList> element and is used to declare a plan in the bundle jar. All objects referenced by this plan must have been previously defined either in this bundle or on the master server on which the bundle is being imported.
The <plan> element has two attributes:
jarPath – The location of the plan XML, relative to the root of the bundle jar. Leading / or . characters are not permitted. The format of the plan XML is specified by the Plan and Component Language specification. See Chapter 4, Plan Schema, in Sun N1 Service Provisioning System 5.2 XML Schema Reference Guide for more information.
majorVersion – An optional attribute that determines whether to check in the plan as a new major version. The default is false.