This version can do the schema modifications through an ini-file or directly like ConsoleOne. Other features: - 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. Sections: [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 …) Section [ASN1] There are two parameter in this section: company=2.16.840.1.113719.2.xxxx prefix=sample 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). section [ATTRIBUTE] nx=attribute name 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 [#Title] N=3 V=1 S=SYN_CI_STRING F1=DS_STRING_ATTR F3=DS_SIZED_ATTR F4=DS_SINGLE_VALUED_ATTR L=0 U=10 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.113719.2.100.4.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!. section [CLASS] nx=classname 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. TIP: 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. [#WwwO] N=2 V=2 S1=Top C1=#WwwRoot C2=domain N1=CN M1=CN F1=DS_EFFECTIVE_CLASS F2=DS_CONTAINER_CLASS 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). WARNINGS. 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. [ASN1] company=2.16.840.1.113719.2.xxxx prefix=sample [ATTRIBUTE] n1=#Fullname n2=#Voorletter n3=#Title <info left out> [#Fullname] N=1 V=1 S=SYN_CI_STRING F1=DS_SINGLE_VALUE_ATTR F2=DS_STRING_ATTR [#Voorletter] N=2 V=1 S=SYN_CI_STRING F1=DS_STRING_ATTR F3=DS_SIZED_ATTR F4=DS_SINGLE_VALUED_ATTR L=1 U=10 [#Title] N=3 V=1 S=SYN_CI_STRING F1=DS_STRING_ATTR F3=DS_SIZED_ATTR F4=DS_SINGLE_VALUED_ATTR L=0 U=10 <info left out< [Remarks Attibutes] // this section isn't needed! S= Type Syntax, zie lijst SYN_UNKNOWN SYN_DIST_NAME SYN_CE_STRING SYN_CI_STRING SYN_PR_STRING SYN_NU_STRING SYN_CI_LIST SYN_BOOLEAN SYN_INTEGER SYN_OCTET_STRING SYN_TEL_NUMBER SYN_FAX_NUMBER SYN_NET_ADDRESS SYN_OCTET_LIST SYN_EMAIL_ADDRESS SYN_PATH SYN_REPLICA_POINTER SYN_OBJECT_ACL SYN_PO_ADDRESS SYN_TIMESTAMP SYN_CLASS_NAME SYN_STREAM SYN_COUNTER SYN_BACK_LINK SYN_TIME SYN_TYPED_NAME SYN_HOLD SYN_INTERVAL
Fx Flags x=1..9 zie tabel hieronder DS_SINGLE_VALUED_ATTR DS_SIZED_ATTR DS_NONREMOVABLE_ATTR DS_READ_ONLY_ATTR DS_HIDDEN_ATTR DS_STRING_ATTR DS_SYNC_IMMEDIATE DS_PUBLIC_READ DS_SERVER_READ DS_WRITE_MANAGED DS_PER_REPLICA DS_SCHEDULE_SYNC_NEVER DS_OPERATIONAL L= lower bound , optioneel U= Upper bound , optioneel N= attr.nr of ASN1 V= version nr of attribute
[CLASS] n1=#WwwRoot n2=#WwwO n13=#WWWOAux
[#WwwRoot] N=1 V=1 S1=Top C1=Organization C2=Organizational Unit C3=Locality C4=Country C5=Tree Root C6=domain N1=CN M1=CN F1=DS_EFFECTIVE_CLASS F2=DS_CONTAINER_CLASS [#WwwO] N=2 V=2 S1=Top C1=#WwwRoot C2=domain N1=CN M1=CN F1=DS_EFFECTIVE_CLASS F2=DS_CONTAINER_CLASS [#WwwOAux] N=23 V=1 O1=Full Name O8=#Achternaam O9=#telgroep O10=#Opmerking ;Achternaam is het hoofddeel van het email adres ;Opmerking is plaats waar de JPG bestanden van de foto's worden gezocht. O11=#GW O12=#GWAPI O13=#Alias O14=#Dienst2 O15=#GWAliasType O16=#Flag1 O17=Description O18=#nivo O19=#PermanPath 020=#Omschrijving O21=#Kamers O22=#Grip ;Altname is de tekst die in Wie is Wie gebruikt wordt op de plaats van indienst. O23=#Altname F1=DS_AMBIGUOUS_NAMING F2=DS_AMBIGUOUS_CONTAINMENT F3=DS_AUXILIARY_CLASS
[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 DS_CONTAINER_CLASS DS_EFFECTIVE_CLASS DS_NONREMOVABLE_CLASS DS_AMBIGUOUS_NAMING DS_AMBIGUOUS_CONTAINMENT DS_AUXILIARY_CLASS DS_OPERATIONAL_CLASS There is no check for valid combinations! |