Novell Cool Solutions: Cool Tool
Add and remove attribute and class definitions into/from schema.
|Updated:||13 Nov 2005|
Please read the note from our friends in legal before using this file.
This version can do the schema modifications through an ini-file or directly like ConsoleOne.
- Find all objects using a selected Class or Attribute
- Find all classes that use a class as its superclass
- Find all classes that use an attribute in its definition
- Export Class-list, Attribute list or a single attribute/class
The INI-file definition:
Copy of the original documentation
This program can create or remove schema definitions into/from the NDS. The program uses a simple ini-file from the definitions. I developed this tools in the time it was hard to create schema changes, LDAP wasn't available (LDIF) and ConsoleOne didn't exist. I use this program for managing two NDS-based programs with about 80 attributes and 20 Classes. I think it's easier to use this program during development than LDIF, for a roll out you probably need to create the proper LDIF files.
What to do:
Add/Change schema definitions:
Create an INI-file like sample file.
Run class.exe, click add and select the correct ini-file.
Remove schema definitions.
Create a new ini-file or edit file.
If you want to remove the schema extensions, run class.exe click remove, select the current ini-file.
Structure of the INI-file.
[ASN1] definition of the asn1-number and the prefix.
[ATTRIBUTE] 0 to 999 attributes to add/remove.
[attributename] for every attribute you need to add a section.
[CLASS] 0 to 99 class definitions to add/remove.
[classname] for every class you need to add a section.
The section [Remark ...] are there so you don't have to lookup the information yourself. I use the information for copy and paste the correct strings (flags, type ...)
There are two parameter in this section:
company is the ASN1 code for you company the sample here is the code you can obtain at Novell. See: http://developer.novell.com/support/schreg2c.htm
If you just want to test, change xxxx into 100 or so.
Prefix is the prefix you registered at Novell. For test you can use sample.
The program will extend the asn1 code given with .4.n.v , where n and v are the N and V parameters in attribute section. For classes the program will extend the asn1 with .6.n.v (n and v for the class section).
You can add 0 to 999 attributes to this section. The program tries all n1 up to n999, so you don't have to renumber is you delete a definition form the file.
The attribute name is the name you want to add. # is a special character, the program will substitute the prefix for it. In the given example #Fullname will be sampleFullname, if your prefix changes you only have to change the prefix in [ASN1] section.
For every attribute you want to create, you need to create a new section.
Example attribute n3=#Title
The parameters N,V,S must be given!
N Attribute asn1 number
V version number of attribute
S Type definition
F1..F5 Max 5 flags can be given. Don't forget to set DS_STRING_ATTR the appropriate attribute types. The flags can be given in any order.
L Lower bound value if DS_SIZED_ATTR flag is given
U Upperbound value if DS_SIZED_ATTR flag is given
In the given example an ASN1 of 2.16.840.1.1137220.127.116.11.3.1 is created.
Warning: the name you type in the section [Attribute] are case sensitive and if you use a '#' character, you need to use this character is section name!.
You can add 0 to 99 classes to this section. The program tries all n1 up to n99, so you don't have to renumber is you delete a definition form the file.
The class name is the name you want to add. # is a special character, the program will substitute the prefix for it. In the given example #Root will be sampleRoot, if your prefix changes you only have to change the prefix in [ASN1] section.
For every class you want to create/modify, you need to create a new section.
In most cases I create objects with a very simple class that only contains the CN-attribute and add an Auxiliary class. I find this is the most flexible way for developing applications. When you need to change the schema, you can create a new Aux-class and add that to all appropriate objects, do some reorganization of the data and than you can delete the old Aux-class. If you put all attributes that should stay in the new class and optionally add some extra attributes, all "multiple" defined attributes will still be there after the delete of the old Aux-class. After you have deleted all old Aux-class extensions of the objects, you can remove the old Aux-class from the schema and optionally delete unused attributes.
Example class definition.
The parameters N,V must be given!
N Attribute asn1 number
V version number of the class
C1..C5 containment classes (max 5)
S1..S5 Superclass definitions. For all none Auxiliary class Up to 5 superclasses can be given. I don't think its wise to do so.
F1..F5 Max 5 flags can be given. The flags can be given in any order.
N1..N9 max 9 naming attributes can be given, make sure the attributes are also in the Mx parameters. Only string attributes can be used as a naming attribute. You can "inherit" naming attributes from superclasses, you don't have to redeclare them.
M1..M99 Mandatory attributes (max 99)
O1..O99 Optional attributes.
If you want to modify a existing class, put in the classname, and add the extra optional attributes.
Please do no change you base schema classes, the attributes you add here can never be deleted from the schema. Use an Aux-class if possible.
If a class already exists in the schema before you run this program, only the optional attributes of the class are updated. (NDS limitation).
Please check synchronization status before you change you schema.
Use this program if you know what you do, schema problems can be hard to recover from
After you add schema definitions, wait for complete synchronization before removing the definitions.
You can't delete schema definitions if there are unknown objects in you tree.
Aux-classes can only be created in NDS 8 or above.
Attribute and Class name are case-sensitive.
This program can't create recursive containment classes ( a limitation of the NDAP implementation).
e.g. Organization Object can contain a Locality object and a Locality object can contain a Organization Object. If you need this, you have to use LDIF. (may be you can use java with LDAP). There is an example on the Novell site.
If you rerun the program with the same input, the program gives a waring on all attributes, and does no checking for the definitions of the attribute in the input file and the definition in the schema. For classes it checks the class-definitions. In case of a new class, it creates that class (if possible), for an existing class it checks the optional attribute list to see if there need to be an update.
You can not change the ASN1 and version number of an attribute or class.
<info left out>
<info left out<
[Remarks Attributes] // this section isn't needed!
S= Type Syntax, zie lijst
Fx Flags x=1..9 zie tabel hieronder
L= lower bound , optioneel
U= Upper bound , optioneel
N= attr.nr of ASN1
V= version nr of attribute
;Achternaam is het hoofddeel van het email adres
;Opmerking is plaats waar de JPG bestanden van de foto's worden gezocht.
;Altname is de tekst die in Wie is Wie gebruikt wordt op de plaats van indienst.
[Remarks Class definition]
N = number of ASN1
V = version nr of class (ASN1)
Sx = Superclasses, x = 1..5
Cx = Containment classes, x = 1..5
Nx = Naming attributes, x=1..9
Mx = Mandatory attributes, x=1..99 (include also all Nx !!!)
Ox = Optionele attributes, x=0..99 (optional, no need!)
Fx = Class Object flags, x=1..5 1 one of more flags
There is no check for valid combinations!
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com