What's New in the Sun N1 Service Provisioning System 5.2 Update 2 Release

Declaring Search Criteria for a 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.


Note –

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 

         

HostType

HT 

       

HostSet

HS 

       

HostSearch

HR 

       

ComponentType

CT 

         

Plan

   

Folder

 

   

Component

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:

name

The name of the entity or object to be searched for.

desc

The description of the entity or object to be searched for. This corresponds to the description property of the entity searched for.

vis

Visibility of the entity or object to be searched for.

ver

The version of the entity or object to be searched for.

ct

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.

lab

The label of the entity or object to be searched for.

Search Criteria Validation

Search criteria are validated internally using the following character limits.


Example 5–1 Creating a Bundle Template

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.