[Date Prev][Date Next] [Chronological] [Thread] [Top]

RE: [EXTERNAL] Incosistent config after schema modification



--On Wednesday, January 10, 2018 6:16 PM +0000 Jon C Kidder <jckidder@aep.com> wrote:

To replace individual values of a multi-valued attribute you must
explicitly delete the old value and then add the new one in the same
transaction.  You cannot use a replace operation to replace individual
values of a multi-valued attribute.  The replace operation removes all
pre-existing values.  After loading your ldif your custom schema will
only contain the 3 attributes included in your ldif.   All of your other
custom attributes will be gone.
At this point you will need to create and load a new ldif that will add
all of the missing attribute definitions.  When I modify a custom schema
I use the replace operation but my ldif contains all of the object class
and attribute type definitions related to that schema.  This way the
schema can be maintained as a versioned artifact in my version control
system.

As a side note, you can delete specific values by using their weight, as well. For example:

dn: <whatever>
changetype: modify
delete: olcAttributeTypes
olcAttributeTypes: {7}

Would delete the 8th attribute (since the weights are zero based)

You can also use the weight to insert a value, like:

dn: <whatever>
changetype: modify
add: olcAttributeTypes
olcAttributeTypes: {7}( cppmAttrs:8 NAME 'cppmActivationTime' DESC 'Activati on time' SYNTAX 1.3.6.1.4.1.1466.115.121.1.15{20} SINGLE-VALUE )

would insert cppmAttrs as the 8th value, and anything from what was the 8th value and up would be renumbered accordingly.

--Quanah


--

Quanah Gibson-Mount
Product Architect
Symas Corporation
Packaged, certified, and supported LDAP solutions powered by OpenLDAP:
<http://www.symas.com>