Operator-Side Client Implementation


Strictly speaking, this interface has nothing to do with WBEM/CIM and is therefore not appropriate for this book. In the same way that you can get a true musician out of bed in the morning by playing almost a whole scale on a piano (he or she has to get out to complete it; otherwise it is unbearable), so I feel that to have covered almost the whole chain illustrated on page 247, and not having reached the operator would be cruel to my readers.

I said earlier that the semantic knowledge (business knowledge) can reside in the mind of the operator, in the operator interface code or in the WBEM client. I dealt briefly with the first of these, resulting in a generic WBEM client and will consider the other two here.

Some operator interfaces are complex, particularly those which display graphical user interfaces and, to be tractable, they need to be at least partially table driven; otherwise they will collapse under the weight of too many ad hoc rules. Other operator interfaces may be very simple. A command-line interface (CLI), for example, may contain code to check the syntax of what the operator types but is generally unconcerned with the semantics of what is typed.

Some of the possible operator interface/WBEM client combinations are shown in Figure 13.3 with arrows to show where semantic intelligence could reside. Putting this intelligence other than in the interface itself is sometimes called creating a "thin client," and not surprisingly, an interface with this intelligence is called a "thick client" (this is the usage of "thick" to mean wide rather than stupid). Note that "client" in this context does not mean a WBEM client ”indeed, if the client is thin, then the WBEM client is likely to be thick and vice versa.

click to expand
Figure 13.3: WBEM Clients

A browser, by its nature, is a thin client because it only has the ability to take HTML and render it onto a screen.

Of the operator interface/WBEM client permutations illustrated in Figure 13.3, the one associated with the programmatic interface (i.e., a higher-level management system) is likely to be the simplest, since the higher-level system is likely to have the semantic intelligence available to it. In some cases, it is likely that the higher-level management system will be its own WBEM client (as illustrated in Figure 13.3).

Browser user interfaces (BUIs) are becoming increasingly popular, particularly among small devices, such as IP routers intended for the home. To use a WBEM client with such an interface, the technique is to install a Web server (e.g., Apache) and code the WBEM client as a CGI program. If you are unfamiliar with CGI programs then see its entry in Appendix G, the Glossary.

Providing the semantic intelligence is difficult if you are trying to produce a purely generic WBEM client which will be able to manage my toaster today and an IP router tomorrow. Some help is forthcoming from the choice of WBEM/CIM because intrinsic commands exist, not only to access instances from the WBEM server, but also to access classes and the structure of the data. This still does not give quite enough information to allow the WBEM client to be completely generic; although it can at least determine that a property NumberOfUsers exists, it still cannot automatically determine that it must translate an operator request for the current number of users to the call getInstance() on the CIM_OperatingSystem class and the extraction of the NumberOfUsers property.

It would, however, be possible to define a new qualifier, say ACNE_COMMAND , and to add this to the NumberOfUsers property:

 [ACNE_COMMAND("Show Number Users"), Description (   "Number of user sessions for which the OperatingSystem "   "is currently storing state information."),   Gauge,   MappingStrings {"MIF.DMTFHost System001.4",      "MIB.IETFHOST-RESOURCES-MIB.hrSystemNumUsers"} ]   uint32 NumberOfUsers; 

This would allow the WBEM client to match the operator command "Show Number Users" with this property as it scanned the schema.

On the positive side, this type of technique would allow a completely generic client to be built and, for a small system, it might (just) be practical. Realistically, it would very quickly become unwieldy, particularly if extended to include commands which needed to access combinations of properties and classes.

This technique can, however, be extended either by embedding a semantic language into mof specifications by using specially formatted comments which are ignored by the WBEM server but which could be interpreted by the WBEM client, or by embedding the mof into a wider language and extracting it separately as shown in Figure 13.4.

click to expand
Figure 13.4: Embedding mof into a larger language

Before you go to the extreme of defining new languages and writing new compilers, you should ask yourself how generic your WBEM client and operator interface need to be. If your aim is to produce a particular management interface to a particular device (rather than a generic management interface to any device), then it might be acceptable to hard code the more stable parts of the models into the code.

The CIM_OperatingSystem class has existed in the System common model for many releases and is likely to remain there for many releases to come. Would it be possible to code into your WBEM client program the knowledge that, when the operator asks for the number of users, then it should check that an instance of CIM_OperatingSystem exists, obtain it and extract the NumberOfUsers property? In many instances this hard coding is acceptable, particularly if it is done in such a way that it can be easily updated.

This technique is less risky than it might at first appear. The CIM_NetworkPort class, for example, has certain properties and associations. If your company has introduced a new type of interface port, its class is likely to have been created as a child of CIM_NetworkPort and all of the functions that you have already functioning with other children of CIM_NetworkPort are likely to work for your new port type. To some extent, the core and common models put model designers into a straitjacket and this makes the external management much easier.




A Practical Approach to WBEM[s]CIM Management
A Practical Approach to WBEM[s]CIM Management
ISBN: 849323061
EAN: N/A
Year: 2006
Pages: 152

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net