CIMPLE
From openSUSE
CIMPLE is an embeddable CIM provider engine. It is used to (1) build providers that will work with a variety of CIM servers and (2) provide a foundation for implementing CIM-based standards.
First, generate the schema code. The generated schema code will not require any modifications.
export CIMPLE_MOF_PATH=/usr/share/mof/cim-current genclass -r -M OMC_LogicalFile.mof -e OMC_LinuxDirectoryContainsFile
Next, generate the provider code and module.cpp. You will need to edit the provider .cpp file, and the module.cpp file.
export CIMPLE_MOF_PATH=/usr/share/mof/cim-current genprov -M OMC_LogicalFile.mof -m OMC_LinuxDirectoryContainsFile
The module.cpp file might look something like this. The provider from this example can be used as either a CMPI provider or an OpenWBEM C++ provider.
#include "config.h" #include "OMC_LinuxDirectoryContainsFile_Provider.h" using namespace cimple; CIMPLE_MODULE(OMC_LinuxDirectoryContainsFile_Module); CIMPLE_PROVIDER(OMC_LinuxDirectoryContainsFile_Provider); CIMPLE_CMPI_ASSOCIATION_PROVIDER(OMC_LinuxDirectoryContainsFile_Provider); #ifdef HAVE_CIMPLE_OPENWBEM_ADAPTER_H #include <cimple/OpenWBEM_Adapter.h> CIMPLE_OPENWBEM_PROVIDER(OMC_LinuxDirectoryContainsFile_Provider); #endif
CIMPLE RPMs can be found here.

