Create a bundle template using the bdb.b.add command. Use the following arguments with the bdb.b.add command:
The name of the bundle template
A description of the bundle template
Search criteria for entities to be included in the bundle template.
The result of the bdb.b.add command is the generation of a unique bundle ID.
For full usage of this command, see Appendix A, Appendix — New Commands.
The bundle ID can be a cumbersome ID to enter at the command-line. Consider substituting the ID for a shorter term using the NM command as described in Using NM: to Perform ID Substitution in Sun N1 Service Provisioning System 5.2 Command-Line Interface Reference Manual.
A bundle template cannot contain another bundle template.
When you create the bundle template, specify search criteria for plans, components or other objects in the correct order of their dependencies.
To specify search criteria for the bundle template, use the bdb.b.add command.
The order in which you declare search criteria using the bdb.b.add command is important. Matched objects are exported into the bundle jar in the order of the search criteria that they match. The search criteria must be in the correct order of the matched object's dependencies.
The ordering of systemService and componentType search criteria is not significant. The component to which they refer must be included in the same bundle template.
Search criteria can be specified as set out in the following table.
Table 5–1 Search Criteria and How They Can Be Specified|
Search criteria |
Declared using the bdb.b.add -criteria command as |
Name |
Description |
Visibility |
Version |
Folder path |
Type |
Label |
|---|---|---|---|---|---|---|---|---|
|
SystemService |
SS |
X |
X | |||||
|
HostType |
HT |
X |
X |
X | ||||
|
HostSet |
HS |
X |
X |
X | ||||
|
HostSearch |
HR |
X |
X |
X | ||||
|
ComponentType |
CT |
X |
X | |||||
|
Plan |
P |
X |
X |
X |
X |
X | ||
|
Folder |
F |
X |
X |
X |
X | |||
|
Component |
C |
X |
X |
X |
X |
X |
X |
X |
For example, it is possible to specify the name and description search criteria for system services.
If you specify a search criterion for an entity and the entity does not exist, the creation of the bundle template is successful but the export to a bundle jar does not succeed.
Bundle templates can have zero or more search criteria.
Criteria are declared as attribute=value pairs, separated by a comma. Multiple similar criteria are separated by a semicolon. Pattern strings that contain a comma, semicolon or an equals character in them can be included by the use of '\' (backslash) as an escape character. Backslash itself could be specified as '\\' in the pattern. Attributes are declared as follows:
The name of the entity or object to be searched for.
The description of the entity or object to be searched for. This corresponds to the description property of the entity searched for.
Visibility of the entity or object to be searched for.
The version of the entity or object to be searched for.
extendsType. Refers to the componentType the sought component is extending. This helps search components that extend a particular Component Type. This attribute is only applicable to the component search.
The label of the entity or object to be searched for.
Search criteria are validated internally using the following character limits.
Name: 512 characters
Description: 1024 characters
Folder path: 512 characters
Type: 129 characters
Label: 32 characters
Visibility: this can be either hidden or, by default, visible.
This example shows a bundle template being created with the bdb.b.add command. Note that the search criteria are separated by semicolons, and attribute value pairs are separated by = as described in Declaring Search Criteria for a Bundle Template.
bdb.b.add -name b1 -desc d1 -criteria "C:name=comp*;P:name=myPlan;F:name=myFolder;" |
The result of the command is that the bundle template is created and the associated bundle ID is returned.
129158239041-1163688372443-00830-2096382958 |
For full usage of this command, see Appendix A, Appendix — New Commands.