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

  1 karl  1.8 //%2006////////////////////////////////////////////////////////////////////////
  2           //
  3           // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development
  4           // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems.
  5           // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.;
  6           // IBM Corp.; EMC Corporation, The Open Group.
  7           // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.;
  8           // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group.
  9           // Copyright (c) 2005 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 10           // EMC Corporation; VERITAS Software Corporation; The Open Group.
 11           // Copyright (c) 2006 Hewlett-Packard Development Company, L.P.; IBM Corp.;
 12           // EMC Corporation; Symantec Corporation; The Open Group.
 13           //
 14           // Permission is hereby granted, free of charge, to any person obtaining a copy
 15           // of this software and associated documentation files (the "Software"), to
 16           // deal in the Software without restriction, including without limitation the
 17           // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
 18           // sell copies of the Software, and to permit persons to whom the Software is
 19           // furnished to do so, subject to the following conditions:
 20           // 
 21           // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN
 22 karl  1.8 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED
 23           // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
 24           // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
 25           // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
 26           // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
 27           // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
 28           // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 29           //
 30           //==============================================================================
 31 konrad.r 1.7 Common Management Programming Interface (CMPI) Providers in a nutshell
 32 schuur   1.1 ============================
 33              
 34 konrad.r 1.7 Aug 1st, 2005
 35 schuur   1.1 
 36 konrad.r 1.7 Pegasus 2.5 *NEWS*
 37 konrad.r 1.3 ------------------
 38              
 39 konrad.r 1.7 The CMPI macro header files (cmpimacs.h) shipped is OpenPegasus specific. This 
 40              will change once OpenGroup releases a specification with the macro definitions.
 41              
 42              The CMPI Function Table (cmpift.h) file and CMPI Data Types (cmpidt.h) file are
 43               composed from the CMPI v1.0 specification + Technical Corrigenda and are
 44              binary compatible with the "historical implementations" and the 1.0 specification
 45              augmented with the Technical Corrigenda.
 46 konrad.r 1.3 
 47              
 48              Build CMPI from sources
 49              -----------------------
 50              
 51 schuur   1.1 The Common Manageability Programming Interface (CMPI) has been integrated into
 52              Pegasus as a pluggable provider manager.
 53              
 54 konrad.r 1.7 CMPI is by default enabled on Linux. For other platforms it must be enabled 
 55              during Pegasus build.
 56              
 57 schuur   1.1 For CMPI enablement, set the following environment variables prior to make:
 58              
 59 konrad.r 1.2    PEGASUS_ENABLE_CMPI_PROVIDER_MANAGER=1
 60 schuur   1.1 
 61 konrad.r 1.3 
 62              Using CMPI
 63              ----------
 64 schuur   1.1 If you plan to write your own CMPI providers you are kindly referred to the
 65              WBEMSource homepage where the draft specification document for CMPI resides.
 66              You can find at http://www.wbemsource.org/doc.tpl?CALLER=index.tpl&gdid=3712 .
 67              If you are looking for samples you should have a look at the SBLIM project.
 68              The packages prefixed by the string sblim-cmpi contain CMPI providers for
 69              various classes. See http://www-124.ibm.com/developerworks/projects/sblim .
 70              
 71 konrad.r 1.7 Using CMPI with threads
 72              -----------------------
 73              
 74              CMPI provides API functions for low-level thread, mutex and conditional constructs.
 75              Hence you can compile your provider without needing to link to pthread or other 
 76              threading library. 
 77              
 78              However, the developer is responsible for memory management of these constructs and
 79              as well of exiting the threads before the cleanup function is exited. If this is not 
 80              done, the thread will be forcefully terminated. This can have the nasty consequence of
 81              hanging CIMServer, or bringing down the CIMServer, or just the Out-of-Process Provider 
 82              Agent if you run OpenPegasus with 'run-as-requester' configuration flag turned on.
 83              Please refer to the Admin Guide or the readme files for more details about this flag.
 84 konrad.r 1.3 
 85 konrad.r 1.6 Using CQL with CMPI
 86              -------------------
 87              
 88               To use CQL support for indications and exec query you will have to use
 89               the Pegasus/Provider/CMPI/cmpi_cql.h header file with one new function.
 90               You also  you need to define PEGASUS_USE_EXPERIMENTAL in your 
 91               code to take advantage of these CQL utility functions. The reason is that 
 92               the CMPI standard 1.0 is unclear on one thing:
 93               
 94                 - CMNewSelectExp. One of arguments passed is a 'projection' array. The
 95                   spec does not explain exactly what in such array. Implementation of
 96                   CMPI that also implemented WQL put a string representation of the 
 97                   properties, as "SystemName", "Hostname", etc. But that is not neccesarily
 98                   the case with CQL, where you can have chained identifiers such as
 99                   "CIM_OperatingSystem::SystemName". In other words, the CMPI standard
100                   needs to clarify this and to make the existing providers backward 
101                   supported, this utility function - CMPI_CQL_NewSelectExp is provided
102                   until the CMPI standard comes up with a conclusion on this.
103              
104                When the CMPI provides a resolution on these issues, this utility
105                interface will be gone and unsupported.
106 konrad.r 1.6 
107                Questions and Answers:
108              Q1: Is the CMPI Specification really ambiguous or does it 
109              just not support CQL? If it's ambiguous should it be fixed 
110              before it goes final?
111              
112              A1:. Page 96 of the CMPI review spec states (line 2899-2901): The *projection output argument is 
113              a pointer to a CMPIArray structure of CMPIString entries containing projection specification. 
114              It shall be set to NULL if no projection is defined.. To clarify any ambigiuity, an e-mail to the
115               CMPI review group was sent, which would add the following: The projection specification is query 
116              language specific. Hence the entries format of the projection output array CMPIString might be 
117              different depending on the query language. Be sure to check the lang argument for the query language your 
118              provider will support. . To guard the provider from DMTF's CQL possible ways it can be represented in 
119              a string format, and since the CQL is experimental, the CMNewSelectExp will NOT support CQL. 
120              The CMPI_CQL_NewSelect will support both CQL and WQL.
121              
122              
123              AQ:What happens if an existing Provider is passed a CQL 
124              statement and issues a newSelectExp call?  Does it return 
125              an error?
126              
127 konrad.r 1.6 A2: The error code CMPI_RC_ERR_QUERY_LANGUAGE_NOT_SUPPORTED would be set.
128              
129              
130              Q3: Both CMNewSelectExp and CMPI_CQL_NewSelectExp return a 
131              CMPISelectExp. Is there anyway to determine whether the 
132              CMPISelectExp represents a CQL or WQL expression?
133              
134              A3:Not from the scope of the CMPISelectExp structure. Please note that the routine
135               that would exercise the CMPISelectExp has a char *lang passed in as argument. 
136              This char *lang* can be used to easily determine what query language is used.
137              
138              
139              
140 konrad.r 1.3 Registering CMPI providers with Pegasus
141              ---------------------------------------
142              
143 schuur   1.1 Once you have a CMPI provider library you want to register it with Pegasus.
144              How? Well it's almost the same as for C++ providers. The only difference is
145              that the Provider.Interface property must be set to "CMPI".
146              
147              Here's an excerpt from the SBLIM Linux Computer System provider registration
148              
149              // ===================================================================
150              // 	Linux_ComputerSystem
151              // ===================================================================
152              
153              
154              instance of PG_ProviderModule
155              {
156                 Name = "OSBase_ComputerSystemProviderModule";
157                 //The library name on disk
158                 Location = "cmpiOSBase_ComputerSystemProvider";
159                 Vendor = "SBLIM";
160                 Version = "1.2.2";
161                 InterfaceType = "CMPI";
162                 InterfaceVersion = "0.86.0";
163              };
164 schuur   1.1 
165              instance of PG_Provider
166              {
167                 //The provider module as defined in PG_ProviderModule
168                 ProviderModuleName = "OSBase_ComputerSystemProviderModule";
169                 // The provider name as referenced in the code
170                 Name = "OSBase_ComputerSystemProvider";
171              };
172              
173              instance of PG_ProviderCapabilities
174              {
175                 //The provider module as defined in PG_ProviderModule
176                 ProviderModuleName = "OSBase_ComputerSystemProviderModule";
177                 //The provider name as defined in PG_Provider
178                 ProviderName = "OSBase_ComputerSystemProvider";
179                 CapabilityID = "1";
180                 //Name of the CIM class as defined in the mof
181                 ClassName = "Linux_ComputerSystem";
182                 Namespaces = {"root/cimv2"};
183                 ProviderType = { 2,5 }; // Instance, Method
184                 SupportedProperties = NULL; // All properties
185 schuur   1.1    SupportedMethods = NULL; // All methods
186              };
187              

No CVS admin address has been configured
Powered by
ViewCVS 0.9.2