Frequently Asked Questions


1.

What is the minimum that a correctly written openPegasus provider needs to do?

when invoked, it needs either (1) to call handler.processing() and handler.complete() or (2) to throw an exception (in which case neither handler.processing() nor handler.complete() are necessary). there is no requirement for it to call handler.deliver() unless it has something to deliver back to the client.

2.

Your examples make use of openPegasus methods such as constructors for CIMObjectPath objects. Where can I find a list of the available classes and methods ?

there is no really good documentation for the openpegasus project. this has been accepted by the developers, and as industry acceptance of openpegasus grows, it will change. in the interim there are two main sources to search for information: the class and method list generated by doxygen is available from the openpegasus web site and the example and test programs which come with the openpegasus source. there are numerous test programs used after each build to check the integrity of the resulting wbem server and these contain many examples of both valid and invalid method calls. the header (.h) files for many of the common openpegasus classes (string, cimparamvalue, cimobjectpath, etc.) are also heavily commented and contain example code.

3.

Why do you place the brackets in your C++ programs in that strange way?

because placing brackets like this: if (x == 6) { y = 9; z = 27; } is both clearer for the reader and more logical than the repellent form if (x == 6) { y = 9; z = 27; } a conditional statement in c++ can be followed by a single statement which, traditionally, is indented. if you want more than a single statement, then these can be made into a single group by the use of brackets. to be consistent, this group, including its brackets, should be indented. anyway, this is not a book about c++ style-just accept that the positions of the brackets in the examples are not accidental. the lack of religious debate on bracket positioning is one of the reasons why i like the python language.

Answers

1.

When invoked, it needs either (1) to call handler.processing() and handler.complete() or (2) to throw an exception (in which case neither handler.processing() nor handler.complete() are necessary). There is no requirement for it to call handler.deliver() unless it has something to deliver back to the client.

2.

There is no really good documentation for the openPegasus project. This has been accepted by the developers, and as industry acceptance of openPegasus grows, it will change. In the interim there are two main sources to search for information: the class and method list generated by Doxygen is available from the openPegasus Web site and the example and test programs which come with the openPegasus source. There are numerous test programs used after each build to check the integrity of the resulting WBEM server and these contain many examples of both valid and invalid method calls.

The header (.h) files for many of the common openPegasus classes (String, CIMParamValue, CIMObjectPath, etc.) are also heavily commented and contain example code.

3.

Because placing brackets like this:

 if (x == 6)     {     y = 9;     z = 27;     } 

is both clearer for the reader and more logical than the repellent form

 if (x == 6)     {     y = 9;     z = 27;     } 

A conditional statement in C++ can be followed by a single statement which, traditionally, is indented. If you want more than a single statement, then these can be made into a single group by the use of brackets. To be consistent, this group , including its brackets, should be indented.

Anyway, this is not a book about C++ style ”just accept that the positions of the brackets in the examples are not accidental. The lack of religious debate on bracket positioning is one of the reasons why I like the Python language.




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