HP-UX Directory Server Administrator Guide HP-UX Directory Server Version 8.1 (5900-3098, May 2013)

For example, a CoS template entry that provides a value for the postalCode attribute follows:
dn:cn=exampleUS,ou=data,dc=example,dc=com
objectclass: top
objectclass: extensibleObject
objectclass: cosTemplate
postalCode: 44438
It is possible to create CoS templates that compete with each other to provide an attribute value.
For example, there can be a multivalued cosSpecifier attribute in the CoS definition entry.
Specifying the template priority on each template entry determines which template provides the
attribute value. Set the template priority using the cosPriority attribute. This attribute represents
the global priority of a particular template. A priority of zero is the highest priority.
For example, a CoS template entry for generating a department number appears as follows:
dn: cn=data,dc=example,dc=com
objectclass: top
objectclass: extensibleObject
objectclass: cosTemplate
departmentNumber: 71776
cosPriority: 0
This template entry contains the value for the departmentNumber attribute. It has a priority of
zero, meaning this template takes precedence over any other conflicting templates that define a
different departmentNumber value.
Templates that contain no cosPriority attribute are considered the lowest priority. Where two
or more templates are considered to supply an attribute value and they have the same (or no)
priority, a value is chosen arbitrarily. The behavior for negative cosPriority values is not defined
in Directory Server; do not enter negative values. Also, the cosPriority attribute is not supported
by indirect CoS.
The following sections provide examples of template entries along with examples of each type of
CoS definition entry.
“Example of a pointer CoS” (page 207)
“Example of an indirect CoS” (page 208)
“Example of a classic CoS” (page 208)
5.2.3.3 Example of a pointer CoS
Example Corporation's administrator is creating a pointer CoS that shares a common postal code
with all entries in the dc=example,dc=com tree.
1. Add a new pointer CoS definition entry to the dc=example,dc=com suffix using
ldapmodify:
ldapmodify -a -D "cn=directory manager" -w secret -p 389 -h server.example.com
The ldapmodify utility binds to the server and prepares it to add information to the
configuration file.
2. Next, add the pointer CoS definition to the dc=example,dc=com root suffix.
dn: cn=pointerCoS,dc=example,dc=com
objectclass: top
objectclass: cosSuperDefinition
objectclass: cosPointerDefinition
cosTemplateDn: cn=exampleUS,ou=data,dc=example,dc=com
cosAttribute: postalCode
3. Create the template entry.
dn: cn=exampleUS,ou=data,dc=example,dc=com
objectclass: top
objectclass: extensibleObject
5.2 Assigning class of service 207