Using the NetWare 5 NDS Administrator Utility as a Development Tool
Articles and Tips: article
Senior Research Engineer
01 Oct 1998
Illustrates ways you can use NDS Manager to help you develop applications that use NDS. The NetWare 5 version of NDS Manager includes features for examining and documenting the NDS database schema and schema extensions, extending the NDS schema by adding new classes and attributes, and deleting unneeded classes and attributes from the schema.
The NDS Manager utility was introduced with NetWare 4.11 to enable system administrators to manage Novell Directory Services (NDS) functions such as:
Partitioning and replication of directory partitions
NDS database repair
NDS version update
Database synchronization diagnostics
Documenting database architecture
NetWare 5 includes new version of NDS Manager that adds features for:
Examining and documenting the NDS database schema
Examining and documenting NDS schema extensions made by applications installed on the network
Extending the NDS schema by adding new classes and attributes
Deleting unneeded classes and attributes from the schema
NDS Manager's new schema documentation and management features have many practical applications for software developers. This DevNote will illustrate some ways you can use NDS Manager to help you develop applications that use NDS.
NDS Version and Partitioning
Most of the NDS Manager functions developers typically use are part of the program's Schema Manager module, but there are other functions that will be of interest to developers who use NDS's partition and replica management APIs. Even if you do not use these APIs, you may want to play with these program functions to better understand how NDS partitioning and replication works. Figure 1 shows NDS Manager's Object menu.
Figure 1: NDS Manager's Object menu.
Items in this menu enable you to:
Get the NDS version on a selected server
View the partitions on a selected server
View the replicas of a selected partition
Check the synchronization status of a partition
There are also features for creating, deleting, moving, and joining partition replicas, and changing replica types. If you want to stay on good terms with your network administrators, do not use these features on your organization's production network.
Most developers are interested in the NDS APIs for creating objects and attributes, and reading and setting attribute values. You can perform these operations with the NDS Manager's Schema Manager module.
To run the Schema Manager, first select "Set Context" from the View menu to select the NDS tree and set the NDS context you want to inspect. Then select "Schema Manager" from the Object menu. The Schema Manager's main screen is shown in Figure 2.
Figure 2: Schema Manager's main screen
The Schema Manager displays lists of classes and attributes that are defined in the schema of the current NDS tree. You can restrict this view to classes and attributes that have been extended from the NetWare 4.11 and 5.0 base schemas by selecting "Show Only Extensions" from the View menu. Other items on the Schema Manager's main menu enable you to create and delete new classes and attributes. Note that if you extend one of the base classes by adding an attribute (adding a "Shirt Size" attribute to the "User" class, for example), you will never be able to delete that attribute from the class definition.
Double-clicking on an attribute name brings up the Attribute Information dialogue, shown in Figure 3. This contains the attribute's syntax (the type of data that the attribute can contain), attribute flags, and a list of classes using the attribute.
Figure 3: Schema Manager's Attribute Information dialogue.
Double-clicking a class name in Schema Manager's main screen opens that class in the Class Manager (see Figure 4). The Class Manager displays the class's attributes (mandatory, optional, and naming), flags, and lists the container classes that can contain the selected class.
Figure 4: Viewing a class's attributes and flags using Class Manager.
You can also use the Class Manager to add optional attributes to the class, and to view the class's inheritance hierarchy (see Figure 5).
Figure 5: Class inheritance hierachy for the Bindery Queue class.
Classes inherit attributes from classes higher on the class hierarchy. As mentioned previously, if you add an attribute to one of the base classes in the schema, you can never go back again (well, you can, but you have to use DSRepair to remove schema extensions and revert to the base schema). The attribute cannot be deleted from the class, nor from the schema. For this reason, many developers prefer to create their own classes that inherit from one of the base classes, and add the desired attributes to the child class. For example, if you wanted to add a "Shirt Size" attribute to the User class, you would instead create a class that inherits from the User class (suppose we call it "Person"), and add the Shirt Size attribute to the Person class. If you later decide that you don't need the Shirt Size attribute, you can delete it and the Person class.
Another feature of Schema Manager that can be useful is its ability to generate reports on an NDS tree's schema. Menu items enable you to generate reports listing:
Names of all classes, attributes, and attribute syntaxes in the schema.
All extensions to the base schema, with new or modified classes, new or modified attributes, and the classes using the attributes.
Differences between the schemas in two trees.
Details of a specified class.
Figure 6 shows the dialogue box for setting options for generating a report of differences between the schemas of two NDS trees. You can specify whether you want to see a list of classes that differ between the two trees, a list of differing attributes, descriptions of attributes that differ in syntax or flags, or all of the above.
Figure 6: Comparing the schemas of two NDS trees.
The following section shows an example of a detailed report for a class called APIInfoClass. API_Info is an example program Larry Fisher and I have written several articles about over the past year.
Report of Selected Item: APIINFO:APIInfoClass Optional Attributes ----------------------------- ACL : Object ACL Audit:File Link : Distinguished Name Authority Revocation : Octet String Back Link : Back Link Bindery Property : Octet String CA Private Key : Octet String CA Public Key : Octet String Certificate Revocation : Octet String Certificate Validity Interval : Interval Cross Certificate Pair : Octet String Equivalent To Me : Distinguished Name Last Referenced Time : Timestamp Obituary : Octet String Reference : Distinguished Name Revision : Counter Manadatory Attributes ----------------------------------- APIINFO:APIInfo Operator : Distinguished Name APIINFO:APIInfo Server : Distinguished Name CN : Case Ignore String Object Class : Class Name Naming Attributes ---------------------------- CN : Case Ignore String Containment -------------------- Organization Organizational Unit Inheritance ------------------ Top Class Flags ------------------- Effective
Using NDS Manager: Developer Applications
You've probably already thought of some ways you can use NDS Manager in your development; I'll give a few scenarios that may suggest other applications.
Learning About NDS
NDS Manager is a perfect tool for exploring NDS trees and learning how they're put together. You can inspect the database itself (classes, attributes, and extensions to the base schema) and how the database maps to the physical network (partitions, replicas, and synchronization).
You can use NDS Manager to prototype the NDS classes and attribute extensions that will be used by an application, even before you begin developing the application. You will be able to be more detailed in application specifications earlier in the development cycle.
This is perhaps the most useful application of NDS Manager for developers. You can use it to verify that the NDS code you are writing actually works that the NDS schema is being extended as you intended, that data is being read from or written to NDS attributes correctly.
NDS Manager also enables you to easily create test data. You do not have to write code to insert objects and attributes into the NDS tree for your application to operate on.
Distributing Development Tasks
Finally, NDS Manager makes it easier to distribute development tasks among a group of programmers. While one person (or group) develops the code that installs and manages the application (that is, the code that does the NDS schema extensions used by the program), another can use NDS Manager to create NDS objects they need to develop and test the application code independently of the installation and management modules.
* Originally published in Novell AppNotes
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.