(file) Return to readme.cmpi CVS log (file) (dir) Up to [Pegasus] / pegasus

  1 schuur 1.1 CMPI Providers in a nutshell
  2            ============================
  3            
  4            Viktor Mihajlovski <mihajlov@de.ibm.com>
  5            Nov 14th 2003
  6            
  7 konrad.r 1.3 Pegasus 2.4 *NEWS*
  8              ------------------
  9              
 10 konrad.r 1.5 The CMPI header files are being standardized and will be (possibly by the 
 11              time you read this) frozen.  However, since the OpenPegasus 2.4 release is 
 12              anticipated prior to the anticipated freezing of the CMPI standard, 
 13              the OpenPegasus 2.4 release will not provide the CMPI header files as 
 14              part of the OpenPegasus 2.4 SDK. 
 15 konrad.r 1.3 
 16 konrad.r 1.5 They can be found within CVS and the source tarball. Visit
 17              http://cvs.opengroup.org/cgi-bin/viewcvs.cgi/pegasus/src/Pegasus/Provider/CMPI/ to view the CMPI header files.
 18 konrad.r 1.3 
 19              Build CMPI from sources
 20              -----------------------
 21              
 22 schuur   1.1 The Common Manageability Programming Interface (CMPI) has been integrated into
 23              Pegasus as a pluggable provider manager.
 24              
 25              CMPI must be enabled during Pegasus build.
 26              For CMPI enablement, set the following environment variables prior to make:
 27              
 28 konrad.r 1.2    PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=1
 29 schuur   1.1 
 30 konrad.r 1.3 
 31              Using CMPI
 32              ----------
 33 schuur   1.1 If you plan to write your own CMPI providers you are kindly referred to the
 34              WBEMSource homepage where the draft specification document for CMPI resides.
 35              You can find at http://www.wbemsource.org/doc.tpl?CALLER=index.tpl&gdid=3712 .
 36              If you are looking for samples you should have a look at the SBLIM project.
 37              The packages prefixed by the string sblim-cmpi contain CMPI providers for
 38              various classes. See http://www-124.ibm.com/developerworks/projects/sblim .
 39              
 40 konrad.r 1.3 
 41 konrad.r 1.6 Using CQL with CMPI
 42              -------------------
 43              
 44               To use CQL support for indications and exec query you will have to use
 45               the Pegasus/Provider/CMPI/cmpi_cql.h header file with one new function.
 46               You also  you need to define PEGASUS_USE_EXPERIMENTAL in your 
 47               code to take advantage of these CQL utility functions. The reason is that 
 48               the CMPI standard 1.0 is unclear on one thing:
 49               
 50                 - CMNewSelectExp. One of arguments passed is a 'projection' array. The
 51                   spec does not explain exactly what in such array. Implementation of
 52                   CMPI that also implemented WQL put a string representation of the 
 53                   properties, as "SystemName", "Hostname", etc. But that is not neccesarily
 54                   the case with CQL, where you can have chained identifiers such as
 55                   "CIM_OperatingSystem::SystemName". In other words, the CMPI standard
 56                   needs to clarify this and to make the existing providers backward 
 57                   supported, this utility function - CMPI_CQL_NewSelectExp is provided
 58                   until the CMPI standard comes up with a conclusion on this.
 59              
 60                When the CMPI provides a resolution on these issues, this utility
 61                interface will be gone and unsupported.
 62 konrad.r 1.6 
 63                Questions and Answers:
 64              Q1: Is the CMPI Specification really ambiguous or does it 
 65              just not support CQL? If it's ambiguous should it be fixed 
 66              before it goes final?
 67              
 68              A1:. Page 96 of the CMPI review spec states (line 2899-2901): The *projection output argument is 
 69              a pointer to a CMPIArray structure of CMPIString entries containing projection specification. 
 70              It shall be set to NULL if no projection is defined.. To clarify any ambigiuity, an e-mail to the
 71               CMPI review group was sent, which would add the following: The projection specification is query 
 72              language specific. Hence the entries format of the projection output array CMPIString might be 
 73              different depending on the query language. Be sure to check the lang argument for the query language your 
 74              provider will support. . To guard the provider from DMTF's CQL possible ways it can be represented in 
 75              a string format, and since the CQL is experimental, the CMNewSelectExp will NOT support CQL. 
 76              The CMPI_CQL_NewSelect will support both CQL and WQL.
 77              
 78              
 79              AQ:What happens if an existing Provider is passed a CQL 
 80              statement and issues a newSelectExp call?  Does it return 
 81              an error?
 82              
 83 konrad.r 1.6 A2: The error code CMPI_RC_ERR_QUERY_LANGUAGE_NOT_SUPPORTED would be set.
 84              
 85              
 86              Q3: Both CMNewSelectExp and CMPI_CQL_NewSelectExp return a 
 87              CMPISelectExp. Is there anyway to determine whether the 
 88              CMPISelectExp represents a CQL or WQL expression?
 89              
 90              A3:Not from the scope of the CMPISelectExp structure. Please note that the routine
 91               that would exercise the CMPISelectExp has a char *lang passed in as argument. 
 92              This char *lang* can be used to easily determine what query language is used.
 93              
 94              
 95              
 96 konrad.r 1.3 Registering CMPI providers with Pegasus
 97              ---------------------------------------
 98              
 99 schuur   1.1 Once you have a CMPI provider library you want to register it with Pegasus.
100              How? Well it's almost the same as for C++ providers. The only difference is
101              that the Provider.Interface property must be set to "CMPI".
102              
103              Here's an excerpt from the SBLIM Linux Computer System provider registration
104              
105              // ===================================================================
106              // 	Linux_ComputerSystem
107              // ===================================================================
108              
109              
110              instance of PG_ProviderModule
111              {
112                 Name = "OSBase_ComputerSystemProviderModule";
113                 //The library name on disk
114                 Location = "cmpiOSBase_ComputerSystemProvider";
115                 Vendor = "SBLIM";
116                 Version = "1.2.2";
117                 InterfaceType = "CMPI";
118                 InterfaceVersion = "0.86.0";
119              };
120 schuur   1.1 
121              instance of PG_Provider
122              {
123                 //The provider module as defined in PG_ProviderModule
124                 ProviderModuleName = "OSBase_ComputerSystemProviderModule";
125                 // The provider name as referenced in the code
126                 Name = "OSBase_ComputerSystemProvider";
127              };
128              
129              instance of PG_ProviderCapabilities
130              {
131                 //The provider module as defined in PG_ProviderModule
132                 ProviderModuleName = "OSBase_ComputerSystemProviderModule";
133                 //The provider name as defined in PG_Provider
134                 ProviderName = "OSBase_ComputerSystemProvider";
135                 CapabilityID = "1";
136                 //Name of the CIM class as defined in the mof
137                 ClassName = "Linux_ComputerSystem";
138                 Namespaces = {"root/cimv2"};
139                 ProviderType = { 2,5 }; // Instance, Method
140                 SupportedProperties = NULL; // All properties
141 schuur   1.1    SupportedMethods = NULL; // All methods
142              };
143              

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2