Cisco Cisco Configuration Engine 3.5 Entwickleranleitung

Seite von 344
4-7
Cisco Configuration Engine Software Development Kit API Reference and Programmer Guide 3.5
OL-17661-02
Chapter 4      Namespace Mapping Service
Object Model
Continuing the previous example, the config application namespace would have events like 
cisco.mgmt.cns.config.loadcisco.mgmt.cns.config.completecisco.mgmt.cns.complete.failure, etc. The 
config application namespace would also have associations with one or more groups of devices. 
Consider the following example. A device with identifier D1 belongs to the california group and another 
device D2 belongs to the newyork group. An application using the config namespace wants to publish 
to all the devices belonging to both the groups (california and newyork). For the event to reach the 
devices, an association must exist between the config namespace and the two groups.
Event
The orig_subject attribute refers to the subject to be mapped. The sub_mapping and pub_mapping 
attributes give the list of event mapping for a subscriber and producer, respectively. The sub_default and 
pub_default attributes specify whether the namespace mapper server should use its algorithm to resolve, 
or whether it should be overridden. 
If the sub_default and pub_default attributes are set to 1, it indicates that the server algorithm should 
be used. If this is the case, the server specializes the mapping listed in sub_mapping and pub_mapping 
with the identifier of the device or group for which mapping is requested.
If the sub_default and pub_default are set to 0, it indicates that the sub_mapping and pub_mapping 
attributes returns the absolute mapping list and no further specialization is needed.
Let us consider the example of the ciso.cns.config.load event. Let us say that it is mapped to 
abcd.config.load for both a publisher and a subscriber, and the user wants the server to use its algorithm 
for mapping. In this case, the orig_subject attribute is cisco.mgmt.cns.config.load, the sub_mapping 
and pub_mapping attributes are abcd.config.load. The sub_default and pub_default attributes are set 
to 1.
Schema Description
This section describes the schema (see Appendix B for a listing of the example schema) extensions for 
the Namespace Mapper. It also specifies the actual directory schema objects that correspond to the 
classes in the Object model for the Namespace Mapper.
Device
In terms of the device, Namespace Mapper does not define the schema; however, Namespace Mapper 
does require two attributes to be in the customer's device object schema. 
One of the attributes uniquely identifies the device. This attribute corresponds to the key field of the 
GroupItem class in the object data model. In this illustration, we will call this attribute id.
The other attribute refers to the group objects that the device belongs to. This corresponds to the groups 
attribute of the Device class in the object model. In this illustration, we will call this attribute groups.
The actual attribute names that the user defines are read in from a properties file, that can be edited 
through the host setup program. The Device Id and Group Attribute inputs of the host setup program 
correspond to id and groups respectively.
Group
In past releases, the class cnsesGroup was defined as the Group class of the object model. It is derived 
from the groupofnames class, and does not support hierarchical grouping.