Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
354 views

How can I change an objectclass definition to make a mandatory attributeoptional ?

I am using my own objectclasses. I want to change the definition of
one of them so that an attribute that is mandatory becomes optional.

I have tried modifying cn=schema with an LDAP client. Certain
modifications are accepted (adding new attributes, for example)
but my mandatory attribute remains mandatory. I get no error
message.

My directory is Novell eDirectory 8.7.3

Thanks for any help

François Beretti
Labels (1)
0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: How can I change an objectclass definition to make a mandatoryattribute optional ?

This may work:

Atomic Operation
On these operations it is necessary that the operation be performed
within the same transaction. Modification of this type must be atomic or
they will fail with an error of constraint violation.

Further as schema entries are typically done on attributetypes or
objectClasses which are essentially muti-valued attributes, it the
"delete" operation must reference the value being modified EXACTLY what
exist in the schema.

As an example:
Add Attribute to a ObjectClass
Here is an example of a modification to a class that adds an attribute
to the class:

dn: cn=schema
changetype: modify
delete: objectclasses
objectclasses: ( 2.16.840.1.113719.1.131.6.1.23 NAME 'myNewClass'
SUP top MUST ( myNewAttrOne $ myNewAttrTwo ) MAY
(myANewAttrThree $ myNewAttrFour $ myNewAttrFive ) )
-
add: objectclasses
objectclasses: ( 2.16.840.1.113719.1.131.6.1.23 NAME 'myNewClass'
SUP top MUST ( myNewAttrOne $ myNewAttrTwo ) MAY (
myNewAttrThree $ myNewAttrFour $ myNewAttrFive $
myNewAttrSix ) )


Limitations
There are some limitations with making modifications to existing schema
entries. These are based on referential integrity and follow common sense.

Any schema modification that could possibly invalidate any data is not
allowed. For example, in the first example above, the upper bound was
changed from 8 to 40, thus increasing the range of possible values. The
bound could not be modified to a value below 8, or it could invalidate
data values.

Similarly, an attribute could be changed from a single-valued attribute
to a multivalued attribute, but not the reverse as there may be data
with multiple values. You could change a class and make an object a
container, but you cannot change a container object into a leaf object
as the container may contain other objects.

-jim

François Beretti wrote:
> I am using my own objectclasses. I want to change the definition of
> one of them so that an attribute that is mandatory becomes optional.
>
> I have tried modifying cn=schema with an LDAP client. Certain
> modifications are accepted (adding new attributes, for example)
> but my mandatory attribute remains mandatory. I get no error
> message.
>
> My directory is Novell eDirectory 8.7.3
>
> Thanks for any help
>
> François Beretti

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.