The present invention may be better understood, and its numerous objects, features and advantages made apparent to those skilled in the art by referencing the accompanying drawings. The use of the same reference number throughout the several figures designates a like or similar element.
A system and method is disclosed for providing Common Information Model (CIM) clients access to classes and metadata that do not reside in the same CIM namespace. In different embodiments of the invention, an association class is defined to the CIM Object Manager (CIMOM) with references to two associated classes. Each association instance maps an instance of a first referenced class to an instance of a second referenced class. These association class instances are referenced as a shadow association class and are served by a shadow provider. A separate class definition file is created to support the shadow associations, which mirrors the original class definition but identifies a shadow provider to service the shadow associations. Association classes that span namespaces are identified and added to the shadow class definition file, and a mapping file is created at the same time which maps the shadow namespace/class to the actual, or base, namespace/class. Requests made to the CIMOM for a shadow association triggers the registered shadow provider, which finds the requested shadow association in the map and submits a request to the base association class provider, which then returns the requested results.
For purposes of this disclosure, an information handling system may include any instrumentality or aggregate of instrumentalities operable to compute, classify, process, transmit, receive, retrieve, originate, switch, store, display, manifest, detect, record, reproduce, handle, or utilize any form of information, intelligence, or data for business, scientific, control, or other purposes. For example, an information handling system may be a personal computer, a network storage device, or any other suitable device and may vary in size, shape, performance, functionality, and price. The information handling system may include random access memory (RAM), one or more processing resources such as a central processing unit (CPU) or hardware or software control logic, ROM, and/or other types of nonvolatile memory. Additional components of the information handling system may include one or more disk drives, one or more network ports for communicating with external devices as well as various input and output (I/O) devices, such as a keyboard, a mouse, and a video display. The information handling system may also include one or more buses operable to transmit communications between the various hardware components.
In different embodiments of the invention, an association class comprising a first referenced class and a second referenced classis defined to CIMOM 206. Each association instance maps an instance of a class described by the first referenced class to an instance of a second referenced class. When the shadow association class 202 is enumerated, the instance provider registered for the association class 208 is triggered. The triggered provider contains the knowledge to build a list of association instances. There may be one or more association class instances containing predetermined associated classes that exist outside the association class namespace.
In an embodiment of the invention, the resulting list of association classes is searchable to find associated instances for predetermined, associated classes. For example, a request could be made to get all instances of a second referenced class associated with a predetermined first refererenced class. When associated instances are requested, the CIMOM searches its class definition database for any association classes that contain a first referenced class, a second referenced class, or both, dependent upon the terms of the search query. For each association class found, an enumeration of the class is performed. Within the enumeration, any instance that contains the first or second referenced class that matches the requested instance is identified. A get procedure is performed on that instance and added to the list of associated instances.
In current CIM implementations, associations that contain references to more than one namespace must exist in each of the namespaces they reference. In these implementations, the CIMOM can recognize and process the association in each namespace. In an embodiment of the invention, this duplicate association class is referenced as a shadow association class definition 204 and is served by a special data provider, called a shadow provider 216. A separate association class definition file 202 is created to support the shadow associations. This class definition mirrors the original class definition but identifies shadow provider 216 to service the shadow associations. When defining association classes in this file, any association class that spans namespaces is identified and added to the shadow association class definition file 204. At the same time, a mapping file 214 is created that maps the shadow association namespace/class definition 204 to the actual, or base, namespace/class 208.
When a request is made to the CIMOM 206 for a shadow association, the CIMOM 206 triggers 212 the registered shadow provider 216, which then initializes if it has not already done so. Initialization consists of reading the class map file 214 and building an internal map of the shadow association class association 204 and the base association 208. The shadow provider 216 finds the requested shadow association in the map file 214 and then establishes a connection to the namespace of the base association class 208 and makes the request (e.g., enumerate or get) of the base association class 208. As part of the request, the response handler for the original CIMOM request is used to trigger the base association class provider 208, which then performs its processing and returns the results 210 to the asynchronous handler.
Once the shadow association class entry is found in Step 308, a connection is established to namespace of the base association class. If the connection to the namespace of the base association is not successful, then an error message is returned to the client in Step 320. Otherwise a request (e.g., enumerate or get) is made of the base association class provider in Step 314. If no results are returned in Step 316, then an error message is returned to the client in Step 320. Otherwise, the results are returned to the client in Step 318.
If it is determined in step 412 that the enumerated instance of the association class does not reference another namespace, then it is determined in step 420 whether all classes in the namespace have been enumerated. If it is then determined in step 420 that not all classes in the predetermined namespace have been enumerated, then processing continues beginning with step 406. If it is determined in step 412 that the enumerated instance of the association class references another namespace, then it is determined in step 414 whether the enumerated instance of the association class is derived. If it is determined in step 414 that the enumerated instance of the association class is not derived, then it is added to a class list for the referenced namespace in step 418. If it is then determined in step 420 that not all classes in the predetermined namespace have been enumerated, then processing continues beginning with step 406. If it is determined in step 414 that the enumerated instance of the association class is derived, then its ancestors are added, with the exception of duplicate names, to a class list for the referenced namespace in step 416. The enumerated instance of the association class is then added to a class list for the referenced namespace in step 418. If it is then determined in step 420 that not all classes in the predetermined namespace have been enumerated, then processing continues beginning with step 406.
If it is determined in step 420 that all classes in the predetermined namespace have been enumerated, then the namespace lists are traversed and class association instances in each namespace class list are written in step 422 to the MOF output file specified in step 404. The predetermined namespace is then written to the MOF output file in step 424, and in turn, class qualifiers are determined from class definitions and written to the MOF output file in step 426. Class definitions, with their related properties and property qualifiers, are then written to the MOF output file in step 428. It will be apparent to those of skill in the art that since the enumerated association classes are the only concrete classes, they are therefore the only classes specified by the shadow provider described in greater detail hereinabove. The MOF output file is then compiled by the CIMOM in step 430, thereby allowing the new class definitions to be known by the CIMOM, resulting in cross-namespace association traversal being optional. Once the MOF output file is compiled, the CIM namespace proxy association system is exited in step 432. Skilled practitioners in the art will recognize that many other embodiments and variations of the present invention are possible. In addition, each of the referenced components in this embodiment of the invention may be comprised of a plurality of components, each interacting with the other in a distributed environment. Furthermore, other embodiments of the invention may expand on the referenced embodiment to extend the scale and reach of the system's implementation.