You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <kk...@us...> - 2008-11-06 14:41:59
|
Revision: 1153 http://omc.svn.sourceforge.net/omc/?rev=1153&view=rev Author: kkaempf Date: 2008-11-06 14:41:43 +0000 (Thu, 06 Nov 2008) Log Message: ----------- improve naming Added Paths: ----------- cmpi-bindings/trunk/doc/INTERNALS Removed Paths: ------------- cmpi-bindings/trunk/doc/HOWTO Deleted: cmpi-bindings/trunk/doc/HOWTO =================================================================== --- cmpi-bindings/trunk/doc/HOWTO 2008-11-06 14:40:54 UTC (rev 1152) +++ cmpi-bindings/trunk/doc/HOWTO 2008-11-06 14:41:43 UTC (rev 1153) @@ -1,44 +0,0 @@ -CMPI providers with SWIG ------------------------- - -Problem statement ------------------ - -SWIG (www.swig.org) is a bindings generator used to create language -bindings (i.e. Perl, Ruby, Python) for C or C++ libraries. -This makes library functions accessible from a foreign language. - -Using SWIG to create CMPI providers reverts the flow of control. This -is usally from the foreign language to the C or C++ library. The SWIG -bindings 'call into' the library. - -Writing CMPI providers in a foreign language reverts the calling -process. The CIMOM call into functions implemented in the foreign -language. - - -Solution --------- - -The problem is solved by creating a shim layer, providing a CMPI API -towards the CIMOM and transfering calls to this API through the SWIG -bindings into the scripting language interpreter. - -This shim links with and initializes the target language interpreter. -When loaded by the CIMOM, an init function is called. This in turn -initializes the target interpreter and calls it to load the SWIG -binding code. - -It then calls an initialization function (a singleton class) which -provides hooks to fill the function pointer table defined by CMPI. - - -Target language considerations ------------------------------- - -Implementing a provider needs information defined in the .mof file of -the CIM class to be instrumented. Thus the target language -implementation is best driven by a MOF parser. The concept to be -used here is similar to SWIG, which uses a C/C++ parser to -automatically generate bindings. - Copied: cmpi-bindings/trunk/doc/INTERNALS (from rev 1148, cmpi-bindings/trunk/doc/HOWTO) =================================================================== --- cmpi-bindings/trunk/doc/INTERNALS (rev 0) +++ cmpi-bindings/trunk/doc/INTERNALS 2008-11-06 14:41:43 UTC (rev 1153) @@ -0,0 +1,44 @@ +CMPI providers with SWIG +------------------------ + +Problem statement +----------------- + +SWIG (www.swig.org) is a bindings generator used to create language +bindings (i.e. Perl, Ruby, Python) for C or C++ libraries. +This makes library functions accessible from a foreign language. + +Using SWIG to create CMPI providers reverts the flow of control. This +is usally from the foreign language to the C or C++ library. The SWIG +bindings 'call into' the library. + +Writing CMPI providers in a foreign language reverts the calling +process. The CIMOM call into functions implemented in the foreign +language. + + +Solution +-------- + +The problem is solved by creating a shim layer, providing a CMPI API +towards the CIMOM and transfering calls to this API through the SWIG +bindings into the scripting language interpreter. + +This shim links with and initializes the target language interpreter. +When loaded by the CIMOM, an init function is called. This in turn +initializes the target interpreter and calls it to load the SWIG +binding code. + +It then calls an initialization function (a singleton class) which +provides hooks to fill the function pointer table defined by CMPI. + + +Target language considerations +------------------------------ + +Implementing a provider needs information defined in the .mof file of +the CIM class to be instrumented. Thus the target language +implementation is best driven by a MOF parser. The concept to be +used here is similar to SWIG, which uses a C/C++ parser to +automatically generate bindings. + Property changes on: cmpi-bindings/trunk/doc/INTERNALS ___________________________________________________________________ Added: svn:mergeinfo + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-06 14:41:04
|
Revision: 1152 http://omc.svn.sourceforge.net/omc/?rev=1152&view=rev Author: kkaempf Date: 2008-11-06 14:40:54 +0000 (Thu, 06 Nov 2008) Log Message: ----------- remove obsolete file Removed Paths: ------------- cmpi-bindings/trunk/doc/INSTALL Deleted: cmpi-bindings/trunk/doc/INSTALL =================================================================== --- cmpi-bindings/trunk/doc/INSTALL 2008-11-06 14:35:36 UTC (rev 1151) +++ cmpi-bindings/trunk/doc/INSTALL 2008-11-06 14:40:54 UTC (rev 1152) @@ -1,20 +0,0 @@ -Prerequisites - -- cmpi header files - (The ones from sfcb are broken, you can use those below include/cmpi) -- a CIMOM (sfcb does nicely) -- SWIG 1.3.x (I used 1.3.35) -- Cmake (I used 2.4) -- Ruby ( ruby, ruby-devel) -- wbemcli (or any other way to access the CIMOM) - -Now do: - cd cmpi-bindings - mkdir build - cd build - cmake .. - make - sudo make install - sudo sfcbrepos -f - sfcbd - \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-06 14:35:38
|
Revision: 1151 http://omc.svn.sourceforge.net/omc/?rev=1151&view=rev Author: kkaempf Date: 2008-11-06 14:35:36 +0000 (Thu, 06 Nov 2008) Log Message: ----------- document some cmake flags Modified Paths: -------------- cmpi-bindings/trunk/README Modified: cmpi-bindings/trunk/README =================================================================== --- cmpi-bindings/trunk/README 2008-11-06 14:35:17 UTC (rev 1150) +++ cmpi-bindings/trunk/README 2008-11-06 14:35:36 UTC (rev 1151) @@ -56,7 +56,7 @@ Requirements ------------ - cmake + cmake 2.4 or later python interface requires: python-devel, pywbem-0.7.0 perl interface requires: ? ruby interface requires: ruby-1.8 ruby-devel-1.8 @@ -69,6 +69,12 @@ 'make' 'sudo make install' + You can pass various parameters to cmake to control the build, e.g. + cmake -DCMAKE_INSTALL_PREFIX=/usr/local + -DCMAKE_C_FLAGS_RELEASE:STRING="-Wall -O2 -g" + -DCMAKE_CXX_FLAGS_RELEASE:STRING="-Wall -O2 -g" + -DCMAKE_BUILD_TYPE=Release + Test ---- For each language, there is a test/<language> directory. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-06 14:35:31
|
Revision: 1150 http://omc.svn.sourceforge.net/omc/?rev=1150&view=rev Author: kkaempf Date: 2008-11-06 14:35:17 +0000 (Thu, 06 Nov 2008) Log Message: ----------- keep gcc quite Modified Paths: -------------- cmpi-bindings/trunk/swig/perl/CMakeLists.txt Modified: cmpi-bindings/trunk/swig/perl/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/swig/perl/CMakeLists.txt 2008-11-06 14:31:27 UTC (rev 1149) +++ cmpi-bindings/trunk/swig/perl/CMakeLists.txt 2008-11-06 14:35:17 UTC (rev 1150) @@ -40,6 +40,7 @@ ADD_DEFINITIONS(-DCMPI_PLATFORM_LINUX_GENERIC_GNU -DCMPI_VERSION=200) ADD_DEFINITIONS(-DTARGET_PERL) +ADD_DEFINITIONS(-Wno-nonnull) ADD_DEFINITIONS( ${PERL_CCFLAGS} -Wno-unused -Wno-error -Wno-nonnull) LINK_DIRECTORIES( ${PERL_CORE_DIR} ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-06 14:31:36
|
Revision: 1149 http://omc.svn.sourceforge.net/omc/?rev=1149&view=rev Author: kkaempf Date: 2008-11-06 14:31:27 +0000 (Thu, 06 Nov 2008) Log Message: ----------- remove obsolete README Removed Paths: ------------- cmpi-bindings/trunk/doc/README Deleted: cmpi-bindings/trunk/doc/README =================================================================== --- cmpi-bindings/trunk/doc/README 2008-11-05 23:31:12 UTC (rev 1148) +++ cmpi-bindings/trunk/doc/README 2008-11-06 14:31:27 UTC (rev 1149) @@ -1,8 +0,0 @@ -Support for Python is only rough. The Python interpreter and the -Provider implementation get correctly loaded. But I do not know yet -how to call a Python function from C. - -- (build and) install sfcbd -- (build and) install sblim-wbemcli -- build and install . -- run 'wbemcli ei http://localhost/root/cimv2:Cmpi_Swig' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-11-05 23:31:17
|
Revision: 1148 http://omc.svn.sourceforge.net/omc/?rev=1148&view=rev Author: bartw Date: 2008-11-05 23:31:12 +0000 (Wed, 05 Nov 2008) Log Message: ----------- better handling of cmpi_pywbem_bindings import Modified Paths: -------------- cmpi-bindings/trunk/src/target_python.c Modified: cmpi-bindings/trunk/src/target_python.c =================================================================== --- cmpi-bindings/trunk/src/target_python.c 2008-11-05 19:45:32 UTC (rev 1147) +++ cmpi-bindings/trunk/src/target_python.c 2008-11-05 23:31:12 UTC (rev 1148) @@ -118,7 +118,6 @@ * Global Python initializer * * load the Python interpreter - * import 'cmpi_pywbem_bindings' -> _TARGET_MODULE * init threads */ @@ -143,27 +142,6 @@ cmpiMainPyThreadState = PyGILState_GetThisThreadState(); PyEval_ReleaseThread(cmpiMainPyThreadState); - TARGET_THREAD_BEGIN_BLOCK; - - /* - * import 'cmpi_pywbem_bindings' - */ - - _TARGET_MODULE = PyImport_ImportModule("cmpi_pywbem_bindings"); - if (_TARGET_MODULE == NULL) - { - TARGET_THREAD_END_BLOCK; - _SBLIM_TRACE(1,("<%d/0x%x> Python: import cmpi_pywbem_bindings failed", getpid(), pthread_self())); - CMPIString* trace = get_exc_trace(broker); - _SBLIM_TRACE(1,("<%d/0x%x> %s", getpid(), pthread_self(), - CMGetCharsPtr(trace, NULL))); - _CMPI_SETFAIL(trace); - abort(); - return -1; - } - _SBLIM_TRACE(1,("<%d/0x%x> Python: _TARGET_MODULE at %p", getpid(), pthread_self(), _TARGET_MODULE)); - - TARGET_THREAD_END_BLOCK; _SBLIM_TRACE(1,("<%d/0x%x> PyGlobalInitialize() succeeded", getpid(), pthread_self())); return 0; } @@ -296,6 +274,7 @@ /* + * import 'cmpi_pywbem_bindings' * local (per MI) Python initializer * keeps track of reference count */ @@ -314,9 +293,9 @@ } /* import 'cmpi_pywbem_bindings' */ rc = PyGlobalInitialize(hdl->broker, st); - pthread_mutex_unlock(&_CMPI_INIT_MUTEX); if (rc != 0) { + pthread_mutex_unlock(&_CMPI_INIT_MUTEX); return rc; } @@ -324,6 +303,29 @@ TARGET_THREAD_BEGIN_BLOCK; + /* + * import 'cmpi_pywbem_bindings' + */ + + if (_TARGET_MODULE == NULL) + { + _TARGET_MODULE = PyImport_ImportModule("cmpi_pywbem_bindings"); + if (_TARGET_MODULE == NULL) + { + _SBLIM_TRACE(1,("<%d/0x%x> Python: import cmpi_pywbem_bindings failed", getpid(), pthread_self())); + CMPIString* trace = get_exc_trace(hdl->broker); + PyErr_Clear(); + TARGET_THREAD_END_BLOCK; + _SBLIM_TRACE(1,("<%d/0x%x> %s", getpid(), pthread_self(), + CMGetCharsPtr(trace, NULL))); + _CMPI_SETFAIL(trace); + pthread_mutex_unlock(&_CMPI_INIT_MUTEX); + return -1; + } + } + pthread_mutex_unlock(&_CMPI_INIT_MUTEX); + _SBLIM_TRACE(1,("<%d/0x%x> Python: _TARGET_MODULE at %p", getpid(), pthread_self(), _TARGET_MODULE)); + /* cmpi_pywbem_bindings::get_cmpi_proxy_provider */ PyObject *provclass = PyObject_GetAttrString(_TARGET_MODULE, "get_cmpi_proxy_provider"); @@ -379,10 +381,10 @@ pthread_mutex_unlock(&_CMPI_INIT_MUTEX); return; } - + TARGET_THREAD_BEGIN_BLOCK; - Py_DecRef(_TARGET_MODULE); - TARGET_THREAD_END_BLOCK; + Py_DecRef(_TARGET_MODULE); + TARGET_THREAD_END_BLOCK; PyEval_AcquireLock(); PyThreadState_Swap(cmpiMainPyThreadState); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-11-05 19:45:35
|
Revision: 1147 http://omc.svn.sourceforge.net/omc/?rev=1147&view=rev Author: bartw Date: 2008-11-05 19:45:32 +0000 (Wed, 05 Nov 2008) Log Message: ----------- formatting changes Modified Paths: -------------- cmpi-bindings/trunk/README Modified: cmpi-bindings/trunk/README =================================================================== --- cmpi-bindings/trunk/README 2008-11-05 18:31:35 UTC (rev 1146) +++ cmpi-bindings/trunk/README 2008-11-05 19:45:32 UTC (rev 1147) @@ -1,7 +1,8 @@ Swig based CMPI bindings ------------------------ -This implements a CMPI-compliant provider interface for various languages via SWIG. +This implements a CMPI-compliant provider interface for various languages +via SWIG. Currently supported languages @@ -13,16 +14,19 @@ Implementation -------------- -cmpi-bindings is implemented as a single CMPI-compliant provider (per supported language) -that serves as a "multiplexer" to the instrumented language-specific providers. +cmpi-bindings is implemented as a single CMPI-compliant provider (per +supported language) that serves as a "multiplexer" to the instrumented +language-specific providers. -Using a python provider for class Py_Foo as an example, cmpi-bindings project provides a -cmpi-compliant provider (libpyCmpiProvider.so) that will be registered with the cimom as -the provider that handles Py_Foo requests. When libpyCmpiProvider gets the request, it -will then forward it on to the python module that instruments the Py_Foo class. +Using a python provider for class Py_Foo as an example, cmpi-bindings +project provides a cmpi-compliant provider (libpyCmpiProvider.so) that +will be registered with the cimom as the provider that handles Py_Foo +requests. When libpyCmpiProvider gets the request, it will then forward +it on to the python module that instruments the Py_Foo class. -cmpi-bindings also provides supported-language-interfaces for the Provider Environment -and BrokerCIMOMHandle, so that providers can make "up-calls" into the cimom. +cmpi-bindings also provides supported-language-interfaces for the Provider +Environment and BrokerCIMOMHandle, so that providers can make "up-calls" +into the cimom. For the stack discussion below, use the following 'type' abbreviations: @@ -30,7 +34,8 @@ Python: py Perl: pl -The cmpi-bindings provider interfaces under CMPI consist of the following stack: +The cmpi-bindings provider interfaces under CMPI consist of the following +stack: CIMOM -> @@ -46,8 +51,8 @@ Build / Installation -------------------- -The build scripts will only build the modules for which you have appropriate devel packages. -It will skip any others. +The build scripts will only build the modules for which you have appropriate +devel packages. It will skip any others. Requirements ------------ @@ -58,7 +63,8 @@ Build ----- - From root of tarball's source tree, create a directory 'build' and move (cd) into that directory + From root of tarball's source tree, create a directory 'build' and move + (cd) into that directory 'cmake ..' 'make' 'sudo make install' @@ -66,8 +72,9 @@ Test ---- For each language, there is a test/<language> directory. - Within that directory, there should be test providers, scripts that use the test providers, and - scripts to register the mofs and providers with cimoms. + Within that directory, there should be test providers, scripts that use + the test providers, and scripts to register the mofs and providers with + cimoms. Language-specific documentation @@ -80,6 +87,3 @@ -TODO ----- -See separate TODO file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-11-05 18:31:38
|
Revision: 1146 http://omc.svn.sourceforge.net/omc/?rev=1146&view=rev Author: npaxton Date: 2008-11-05 18:31:35 +0000 (Wed, 05 Nov 2008) Log Message: ----------- add rc1 to version number Modified Paths: -------------- cmpi-bindings/trunk/VERSION.cmake Modified: cmpi-bindings/trunk/VERSION.cmake =================================================================== --- cmpi-bindings/trunk/VERSION.cmake 2008-11-05 18:31:03 UTC (rev 1145) +++ cmpi-bindings/trunk/VERSION.cmake 2008-11-05 18:31:35 UTC (rev 1146) @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "4") -SET(VERSION_PATCH "0") +SET(VERSION_PATCH "0rc1") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-11-05 18:31:12
|
Revision: 1145 http://omc.svn.sourceforge.net/omc/?rev=1145&view=rev Author: npaxton Date: 2008-11-05 18:31:03 +0000 (Wed, 05 Nov 2008) Log Message: ----------- Update in prep for 0.4.0rc1 release Modified Paths: -------------- cmpi-bindings/trunk/README cmpi-bindings/trunk/TODO Modified: cmpi-bindings/trunk/README =================================================================== --- cmpi-bindings/trunk/README 2008-11-04 21:02:34 UTC (rev 1144) +++ cmpi-bindings/trunk/README 2008-11-05 18:31:03 UTC (rev 1145) @@ -1,50 +1,85 @@ -Swig bases CMPI bindings +Swig based CMPI bindings ------------------------ -This implements a CMPI Instance provider via SWIG. +This implements a CMPI-compliant provider interface for various languages via SWIG. - Currently supported languages -- Ruby (complete) -- Python (almost there) +- Ruby +- Python +- Perl (beginning support) -Support for Python is only rough. The Python interpreter and the -Provider implementation get correctly loaded. But I do not know yet -how to call a Python function from C. -The prototype implements a dummy class 'Cmpi_Swig' which looks like -this: +Implementation +-------------- +cmpi-bindings is implemented as a single CMPI-compliant provider (per supported language) +that serves as a "multiplexer" to the instrumented language-specific providers. -class Cmpi_Swig : CIM_ManagedElement -{ - [Description ("A friendly greeting") ] - string hello; -}; - +Using a python provider for class Py_Foo as an example, cmpi-bindings project provides a +cmpi-compliant provider (libpyCmpiProvider.so) that will be registered with the cimom as +the provider that handles Py_Foo requests. When libpyCmpiProvider gets the request, it +will then forward it on to the python module that instruments the Py_Foo class. -FILES ------ +cmpi-bindings also provides supported-language-interfaces for the Provider Environment +and BrokerCIMOMHandle, so that providers can make "up-calls" into the cimom. -mof/Swig_Generic.mof - The class definition -mof/Swig_Generic.reg - The (sfcb based) provider registration data -src/cmpi_instance.c - A CMPI instance provider C stub to be included into - the SWIG generated C code. - It currently implements EnumInstances (for Ruby and Python) and - EnumInstanceNames (Ruby only) - Supporting more instance methods should be straightforward. +For the stack discussion below, use the following 'type' abbreviations: + Ruby: rb + Python: py + Perl: pl -include/cmpi - cmpi header files - +The cmpi-bindings provider interfaces under CMPI consist of the following stack: +CIMOM + -> +lib<type>CmpiProvider.so + -> +cmpi_<type>wbem_bindings.<type> + -> +<python: pywbem/cim_provider2.py> + -> +language-specific provider module + + +Build / Installation +-------------------- +The build scripts will only build the modules for which you have appropriate devel packages. +It will skip any others. + + Requirements + ------------ + cmake + python interface requires: python-devel, pywbem-0.7.0 + perl interface requires: ? + ruby interface requires: ruby-1.8 ruby-devel-1.8 + + Build + ----- + From root of tarball's source tree, create a directory 'build' and move (cd) into that directory + 'cmake ..' + 'make' + 'sudo make install' + + Test + ---- + For each language, there is a test/<language> directory. + Within that directory, there should be test providers, scripts that use the test providers, and + scripts to register the mofs and providers with cimoms. + + +Language-specific documentation +------------------------------- + + Python + ----- + Visit http://pywbem.wiki.sourceforge.net/Provider+Home for QuickStart Guide, + Tutorials, sample providers, etc. + + + TODO ---- - -Convert it to a 'Generic' CMPI provider. \ No newline at end of file +See separate TODO file Modified: cmpi-bindings/trunk/TODO =================================================================== --- cmpi-bindings/trunk/TODO 2008-11-04 21:02:34 UTC (rev 1144) +++ cmpi-bindings/trunk/TODO 2008-11-05 18:31:03 UTC (rev 1145) @@ -1,23 +1 @@ -Keep track of which objects are created with new*() methods from the -brokerEncFT, and which are created with clone(). We have to release the -later, not the former. - -Items marked as "TODO" in the code. - -Finish wrapping broker FTs, such as upcalls. - -Handling CMPIStatus: -Instead of returning CMPIStatus, check it in C code, and throw and -exception if it isn't CMPI_RC_OK. Functions that return CMPIStatus -would then be void instead. We'll check CMPIStatus* output parameters -as well, and do the same. We need to create an exception class with a -code and error string in swig. -[Not possible to pass status+message in a generic way. How about a -toplevel function which raised the execption ?] - -Wrap CMPIEnumeration and CMPIArray in typemaps. - -Indication providers - -Update docs on pywbem wiki, starting with quickstart guide. - +* Wrap CMPIEnumeration and CMPIArray in typemaps. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <np...@us...> - 2008-11-04 21:02:44
|
Revision: 1144 http://omc.svn.sourceforge.net/omc/?rev=1144&view=rev Author: npaxton Date: 2008-11-04 21:02:34 +0000 (Tue, 04 Nov 2008) Log Message: ----------- updated changes file Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.changes Modified: cmpi-bindings/trunk/package/cmpi-bindings.changes =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.changes 2008-11-04 00:22:20 UTC (rev 1143) +++ cmpi-bindings/trunk/package/cmpi-bindings.changes 2008-11-04 21:02:34 UTC (rev 1144) @@ -1,4 +1,11 @@ ------------------------------------------------------------------- +Thu Oct 23 13:53:28 MDT 2008 - np...@no... + +- Update to latest code, prep for release for python bindings +- Indication support in python +- Bump version to 0.4.0 + +------------------------------------------------------------------- Thu Oct 16 14:04:32 CEST 2008 - kk...@su... - Complete Ruby bindings. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2008-11-04 00:22:24
|
Revision: 1143 http://omc.svn.sourceforge.net/omc/?rev=1143&view=rev Author: jcarey Date: 2008-11-04 00:22:20 +0000 (Tue, 04 Nov 2008) Log Message: ----------- Changed to log vm-install command line to syslog at vm creation time Modified Paths: -------------- contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c =================================================================== --- contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2008-10-30 13:43:55 UTC (rev 1142) +++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2008-11-04 00:22:20 UTC (rev 1143) @@ -934,11 +934,17 @@ cmpiutilStrArray_destroy(vm_settings); /* Execute vm-install with the constructed command line */ - DEBUGOUT("Executing:\n"); - for(i = 0; pstra->strs[i]; i++) { - DEBUGOUT("%s ", pstra->strs[i]); + if (is_debug()) { + cmpiutilStrBuf* cmdBuf = cmpiutilStrBuf_create(); + cmpiutilStrBuf_set(cmdBuf, "VM Builder Executing: ", 0); + for(i = 0; pstra->strs[i]; i++) { + cmpiutilStrBuf_cat(cmdBuf, pstra->strs[i], 0); + cmpiutilStrBuf_cat(cmdBuf, " ", 0); + } + DEBUGOUT("%s\n", cmdBuf->bfr); + CMLogMessage(_broker, 1, "VMBuilder Provider", cmdBuf->bfr, NULL); + cmpiutilStrBuf_destroy(cmdBuf); } - DEBUGOUT("\n"); output = NULL; DEBUGOUT("Calling vm-install...\n"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-10-30 13:43:59
|
Revision: 1142 http://omc.svn.sourceforge.net/omc/?rev=1142&view=rev Author: kkaempf Date: 2008-10-30 13:43:55 +0000 (Thu, 30 Oct 2008) Log Message: ----------- fix 'py_sitedir' for Fedora Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-29 22:30:22 UTC (rev 1141) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-30 13:43:55 UTC (rev 1142) @@ -82,7 +82,7 @@ #define some macros missing on fedora %if 0%{?fedora_version} -%{!?py_sitedir: %define py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib()")} +%{!?py_sitedir: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?py_requires: %define py_requires Requires: python} %endif %{py_requires} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-10-29 22:30:25
|
Revision: 1141 http://omc.svn.sourceforge.net/omc/?rev=1141&view=rev Author: mike-brasher Date: 2008-10-29 22:30:22 +0000 (Wed, 29 Oct 2008) Log Message: ----------- New Modified Paths: -------------- cmpi-bindings/trunk/test/cmpi/README Modified: cmpi-bindings/trunk/test/cmpi/README =================================================================== --- cmpi-bindings/trunk/test/cmpi/README 2008-10-29 22:29:37 UTC (rev 1140) +++ cmpi-bindings/trunk/test/cmpi/README 2008-10-29 22:30:22 UTC (rev 1141) @@ -1,5 +1,5 @@ -This provider was written to reproduce a bug in SFCBD. By setting a string -property (Thing.message) to type string[], we crash sfcb. To reproduce: +This provider reproduces an SFCBD bug. By setting a string property +(Thing.message) to type string[], we crash sfcb. To reproduce: 1. Build provider (make) 2. Install and register with sfcbd (make install) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-10-29 22:29:40
|
Revision: 1140 http://omc.svn.sourceforge.net/omc/?rev=1140&view=rev Author: mike-brasher Date: 2008-10-29 22:29:37 +0000 (Wed, 29 Oct 2008) Log Message: ----------- Removed accidentally committed file Removed Paths: ------------- cmpi-bindings/trunk/test/cmpi/libThingProvider.so Deleted: cmpi-bindings/trunk/test/cmpi/libThingProvider.so =================================================================== (Binary files differ) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-10-29 22:28:38
|
Revision: 1139 http://omc.svn.sourceforge.net/omc/?rev=1139&view=rev Author: mike-brasher Date: 2008-10-29 22:28:30 +0000 (Wed, 29 Oct 2008) Log Message: ----------- New example to reproduce bug Added Paths: ----------- cmpi-bindings/trunk/test/cmpi/ cmpi-bindings/trunk/test/cmpi/Makefile cmpi-bindings/trunk/test/cmpi/README cmpi-bindings/trunk/test/cmpi/Thing.mof cmpi-bindings/trunk/test/cmpi/Thing.reg cmpi-bindings/trunk/test/cmpi/ThingProvider.c cmpi-bindings/trunk/test/cmpi/libThingProvider.so Added: cmpi-bindings/trunk/test/cmpi/Makefile =================================================================== --- cmpi-bindings/trunk/test/cmpi/Makefile (rev 0) +++ cmpi-bindings/trunk/test/cmpi/Makefile 2008-10-29 22:28:30 UTC (rev 1139) @@ -0,0 +1,29 @@ +TARGET = libThingProvider.so + +SOURCES = ThingProvider.c + +OBJECTS = $(SOURCES:.c=.o) + +INCLUDES += -I/usr/include/cmpi + +#LIBRARIES += -lkonkret + +FLAGS = -g -Wall -O2 -fPIC + +all: + echo $(OBJECTS) + gcc $(FLAGS) -c $(INCLUDES) ThingProvider.c + gcc $(FLAGS) -shared -o $(TARGET) $(INCLUDES) $(OBJECTS) $(LIBRARIES) + +clean: + rm -rf $(TARGET) + +install: + su -c "make install-su" + +install-su: + cp $(TARGET) /usr/lib64 + cp Thing.mof /var/lib/sfcb/stage/mofs/root/cimv2 + cp Thing.mof /var/lib/sfcb/stage/mofs/root/interop + cp Thing.reg /var/lib/sfcb/stage/regs + sfcbrepos -f Added: cmpi-bindings/trunk/test/cmpi/README =================================================================== --- cmpi-bindings/trunk/test/cmpi/README (rev 0) +++ cmpi-bindings/trunk/test/cmpi/README 2008-10-29 22:28:30 UTC (rev 1139) @@ -0,0 +1,7 @@ +This provider was written to reproduce a bug in SFCBD. By setting a string +property (Thing.message) to type string[], we crash sfcb. To reproduce: + + 1. Build provider (make) + 2. Install and register with sfcbd (make install) + 3. Do a enumerate-instances on Test_Thing from client. + Added: cmpi-bindings/trunk/test/cmpi/Thing.mof =================================================================== --- cmpi-bindings/trunk/test/cmpi/Thing.mof (rev 0) +++ cmpi-bindings/trunk/test/cmpi/Thing.mof 2008-10-29 22:28:30 UTC (rev 1139) @@ -0,0 +1,11 @@ +[ Description("Instance provider test reproduce crash in SFCBD")] +class Test_Thing +{ + [Key] string id; + uint32 count; + boolean flag; + string message; + uint32 counts[]; + boolean flags[]; + string messages[]; +}; Added: cmpi-bindings/trunk/test/cmpi/Thing.reg =================================================================== --- cmpi-bindings/trunk/test/cmpi/Thing.reg (rev 0) +++ cmpi-bindings/trunk/test/cmpi/Thing.reg 2008-10-29 22:28:30 UTC (rev 1139) @@ -0,0 +1,5 @@ +[Test_Thing] + provider: ThingProvider + location: ThingProvider + type: instance + namespace: root/cimv2 Added: cmpi-bindings/trunk/test/cmpi/ThingProvider.c =================================================================== --- cmpi-bindings/trunk/test/cmpi/ThingProvider.c (rev 0) +++ cmpi-bindings/trunk/test/cmpi/ThingProvider.c 2008-10-29 22:28:30 UTC (rev 1139) @@ -0,0 +1,157 @@ +#include <cmpi/cmpidt.h> +#include <cmpi/cmpimacs.h> + +static const CMPIBroker* _broker = NULL; + +static void ThingInitialize() +{ +} + +static CMPIStatus ThingCleanup( + CMPIInstanceMI* mi, + const CMPIContext* cc, + CMPIBoolean term) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIStatus ThingEnumInstanceNames( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + CMReturn(CMPI_RC_OK); +} + +static CMPIArray* _make_string_array() +{ + CMPIStatus st; + CMPIValue value; + CMPIArray* arr; + + arr = CMNewArray(_broker, 3, CMPI_string, &st); + + if (!arr || st.rc) + return arr; + + value.string = CMNewString(_broker, "RED", NULL); + CMSetArrayElementAt(arr, 0, &value, CMPI_string); + + value.string = CMNewString(_broker, "GREEN", NULL); + CMSetArrayElementAt(arr, 1, &value, CMPI_string); + + value.string = CMNewString(_broker, "BLUE", NULL); + CMSetArrayElementAt(arr, 2, &value, CMPI_string); + + return arr; +} + +static CMPIStatus ThingEnumInstances( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char** properties) +{ + CMPIInstance* inst; + CMPIObjectPath* tcop; + CMPIStatus st; + CMPIValue value; + + /* Create object path */ + + tcop = CMNewObjectPath(_broker, "root/cimv2", "Test_Thing", &st); + + if (!tcop || st.rc) + CMReturn(CMPI_RC_ERR_FAILED); + + st = CMAddKey(tcop, "id", (const CMPIValue*)"RED", CMPI_chars); + + if (st.rc) + CMReturn(CMPI_RC_ERR_FAILED); + + /* Create instance */ + + inst = CMNewInstance(_broker, tcop, &st); + + if (!inst || st.rc) + CMReturn(CMPI_RC_ERR_FAILED); + + st = CMSetProperty(inst, "id", (const CMPIValue*)"RED", CMPI_chars); + + if (st.rc) + CMReturn(CMPI_RC_ERR_FAILED); + + value.array = _make_string_array(); + + /* ATTN: by setting a string property to a string[], we cause a SIGSEGV + * in SFCBD. + */ + + st = CMSetProperty(inst, "message", &value, CMPI_ARRAY|CMPI_string); + + if (st.rc) + CMReturn(CMPI_RC_ERR_FAILED); + + CMReturnInstance(cr, inst); + + CMReturn(CMPI_RC_OK); +} + +CMPIStatus ThingGetInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* result, + const CMPIObjectPath* cop, + const char** properties) +{ + CMReturn(CMPI_RC_ERR_NOT_FOUND); +} + +static CMPIStatus ThingCreateInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus ThingModifyInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const CMPIInstance* ci, + const char** properties) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus ThingDeleteInstance( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +static CMPIStatus ThingExecQuery( + CMPIInstanceMI* mi, + const CMPIContext* cc, + const CMPIResult* cr, + const CMPIObjectPath* cop, + const char* lang, + const char* query) +{ + CMReturn(CMPI_RC_ERR_NOT_SUPPORTED); +} + +CMInstanceMIStub( + Thing, + ThingProvider, + _broker, + ThingInitialize()) Added: cmpi-bindings/trunk/test/cmpi/libThingProvider.so =================================================================== (Binary files differ) Property changes on: cmpi-bindings/trunk/test/cmpi/libThingProvider.so ___________________________________________________________________ Added: svn:executable + * Added: svn:mime-type + application/octet-stream This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-10-29 09:40:28
|
Revision: 1138 http://omc.svn.sourceforge.net/omc/?rev=1138&view=rev Author: kkaempf Date: 2008-10-29 09:40:22 +0000 (Wed, 29 Oct 2008) Log Message: ----------- add a FIXME reminder to follow rev 1137 of cmpi_pywbem_bindings.py Revision Links: -------------- http://omc.svn.sourceforge.net/omc/?rev=1137&view=rev Modified Paths: -------------- cmpi-bindings/trunk/swig/ruby/cmpi_rbwbem_bindings.rb Modified: cmpi-bindings/trunk/swig/ruby/cmpi_rbwbem_bindings.rb =================================================================== --- cmpi-bindings/trunk/swig/ruby/cmpi_rbwbem_bindings.rb 2008-10-28 23:36:59 UTC (rev 1137) +++ cmpi-bindings/trunk/swig/ruby/cmpi_rbwbem_bindings.rb 2008-10-29 09:40:22 UTC (rev 1138) @@ -14,6 +14,7 @@ # pass 'broker' to its constructor # def self.create_provider classname, broker + # FIXME: might allow other pathes besides RBCIMPATH $:.unshift RBCIMPATH # add to load path # CamelCase -> under_score This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-10-28 23:37:04
|
Revision: 1137 http://omc.svn.sourceforge.net/omc/?rev=1137&view=rev Author: bartw Date: 2008-10-28 23:36:59 +0000 (Tue, 28 Oct 2008) Log Message: ----------- allow provider modules specified by full path Modified Paths: -------------- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py =================================================================== --- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-28 09:54:58 UTC (rev 1136) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-28 23:36:59 UTC (rev 1137) @@ -423,8 +423,12 @@ self.miname = miname self.broker = broker env = ProviderEnvironment(self, None) - self.proxy = ProviderProxy(env, - '/usr/lib/pycim/'+miname+'.py') + provmod = miname + if provmod[0] != '/': + provmod = '/usr/lib/pycim/' + provmod + if not provmod.endswith('.py'): + provmod+= '.py' + self.proxy = ProviderProxy(env, provmod) #print '*** broker.name()', broker.name() #print '*** broker.capabilities()', broker.capabilities() #print '*** broker.version()', broker.version() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-10-28 09:59:19
|
Revision: 1136 http://omc.svn.sourceforge.net/omc/?rev=1136&view=rev Author: kkaempf Date: 2008-10-28 09:54:58 +0000 (Tue, 28 Oct 2008) Log Message: ----------- code cleanup, make target API consistent: - rename call_provider to TargetCall Modified Paths: -------------- cmpi-bindings/trunk/src/cmpi_provider.c cmpi-bindings/trunk/src/target_perl.c cmpi-bindings/trunk/src/target_python.c cmpi-bindings/trunk/src/target_ruby.c Modified: cmpi-bindings/trunk/src/cmpi_provider.c =================================================================== --- cmpi-bindings/trunk/src/cmpi_provider.c 2008-10-26 03:23:08 UTC (rev 1135) +++ cmpi-bindings/trunk/src/cmpi_provider.c 2008-10-28 09:54:58 UTC (rev 1136) @@ -330,7 +330,7 @@ _result = SWIG_NewPointerObj((void*) result, SWIGTYPE_p__CMPIResult, 0); _reference = SWIG_NewPointerObj((void*) reference, SWIGTYPE_p__CMPIObjectPath, 0); - call_provider((ProviderMIHandle*)self->hdl, &status, "enum_instance_names", 3, + TargetCall((ProviderMIHandle*)self->hdl, &status, "enum_instance_names", 3, _context, _result, _reference); @@ -371,7 +371,7 @@ _reference = SWIG_NewPointerObj((void*) reference, SWIGTYPE_p__CMPIObjectPath, 0); _properties = proplist2target(properties); - call_provider((ProviderMIHandle*)self->hdl, &status, "enum_instances", 4, + TargetCall((ProviderMIHandle*)self->hdl, &status, "enum_instances", 4, _context, _result, _reference, @@ -412,7 +412,7 @@ _reference = SWIG_NewPointerObj((void*) reference, SWIGTYPE_p__CMPIObjectPath, 0); _properties = proplist2target(properties); - call_provider((ProviderMIHandle*)self->hdl, &status, "get_instance", 4, + TargetCall((ProviderMIHandle*)self->hdl, &status, "get_instance", 4, _context, _result, _reference, @@ -456,7 +456,7 @@ _reference = SWIG_NewPointerObj((void*) reference, SWIGTYPE_p__CMPIObjectPath, 0); _newinst = SWIG_NewPointerObj((void*) newinstance, SWIGTYPE_p__CMPIInstance, 0); - call_provider((ProviderMIHandle*)self->hdl, &status, "create_instance", 4, + TargetCall((ProviderMIHandle*)self->hdl, &status, "create_instance", 4, _context, _result, _reference, @@ -505,7 +505,7 @@ _newinst = SWIG_NewPointerObj((void*) newinstance, SWIGTYPE_p__CMPIInstance, 0); plist = proplist2target(properties); - call_provider((ProviderMIHandle*)self->hdl, &status, "set_instance", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "set_instance", 5, _context, _result, _reference, @@ -543,7 +543,7 @@ _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); _reference = SWIG_NewPointerObj((void*) reference, SWIGTYPE_p__CMPIObjectPath, 0); - call_provider((ProviderMIHandle*)self->hdl, &status, "delete_instance", 3, + TargetCall((ProviderMIHandle*)self->hdl, &status, "delete_instance", 3, _context, _result, _reference); @@ -585,7 +585,7 @@ _query = string2target(query); _lang = string2target(language); - call_provider((ProviderMIHandle*)self->hdl, &status, "exec_query", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "exec_query", 5, _context, _result, _reference, @@ -658,7 +658,7 @@ _resultRole = string2target(resultRole); } - call_provider((ProviderMIHandle*)self->hdl, &status, "associator_names", 7, + TargetCall((ProviderMIHandle*)self->hdl, &status, "associator_names", 7, _ctx, _rslt, _objName, @@ -728,7 +728,7 @@ _resultRole = string2target(resultRole); } - call_provider((ProviderMIHandle*)self->hdl, &status, "associators", 8, + TargetCall((ProviderMIHandle*)self->hdl, &status, "associators", 8, _ctx, _rslt, _objName, @@ -783,7 +783,7 @@ _resultClass = string2target(resultClass); } - call_provider((ProviderMIHandle*)self->hdl, &status, "reference_names", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "reference_names", 5, _ctx, _rslt, _objName, @@ -839,7 +839,7 @@ } _props = proplist2target(properties); - call_provider((ProviderMIHandle*)self->hdl, &status, "references", 6, + TargetCall((ProviderMIHandle*)self->hdl, &status, "references", 6, _ctx, _rslt, _objName, @@ -885,7 +885,7 @@ _out = SWIG_NewPointerObj((void*) out, SWIGTYPE_p__CMPIArgs, 0); _method = string2target(method); - call_provider((ProviderMIHandle*)self->hdl, &status, "invoke_method", 6, + TargetCall((ProviderMIHandle*)self->hdl, &status, "invoke_method", 6, _ctx, _rslt, _objName, @@ -929,7 +929,7 @@ _className = string2target(className); _owner = string2target(owner); - call_provider((ProviderMIHandle*)self->hdl, &status, "authorize_filter", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "authorize_filter", 5, _ctx, _filter, _className, @@ -971,7 +971,7 @@ _firstActivation = Target_Bool(firstActivation); _className = string2target(className); - call_provider((ProviderMIHandle*)self->hdl, &status, "activate_filter", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "activate_filter", 5, _ctx, _filter, _className, @@ -1013,7 +1013,7 @@ _lastActivation = Target_Bool(lastActivation); _className = string2target(className); - call_provider((ProviderMIHandle*)self->hdl, &status, "deactivate_filter", 5, + TargetCall((ProviderMIHandle*)self->hdl, &status, "deactivate_filter", 5, _ctx, _filter, _className, @@ -1057,7 +1057,7 @@ _classPath = SWIG_NewPointerObj((void*) classPath, SWIGTYPE_p__CMPIObjectPath, 0); _className = string2target(className); - call_provider((ProviderMIHandle*)self->hdl, &status, "must_poll", 4, + TargetCall((ProviderMIHandle*)self->hdl, &status, "must_poll", 4, _ctx, //_rslt, _filter, @@ -1088,7 +1088,7 @@ TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); - call_provider((ProviderMIHandle*)self->hdl, &status, "enable_indications", 1, _ctx); + TargetCall((ProviderMIHandle*)self->hdl, &status, "enable_indications", 1, _ctx); TARGET_THREAD_END_BLOCK; _SBLIM_TRACE(1,("enableIndications() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); @@ -1115,7 +1115,7 @@ TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); - call_provider((ProviderMIHandle*)self->hdl, &status, "disable_indications", 1, _ctx); + TargetCall((ProviderMIHandle*)self->hdl, &status, "disable_indications", 1, _ctx); TARGET_THREAD_END_BLOCK; _SBLIM_TRACE(1,("disableIndications() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); Modified: cmpi-bindings/trunk/src/target_perl.c =================================================================== --- cmpi-bindings/trunk/src/target_perl.c 2008-10-26 03:23:08 UTC (rev 1135) +++ cmpi-bindings/trunk/src/target_perl.c 2008-10-28 09:54:58 UTC (rev 1136) @@ -95,12 +95,12 @@ /* - * call_provider + * TargetCall * */ static int -call_provider(ProviderMIHandle* hdl, CMPIStatus* st, +TargetCall(ProviderMIHandle* hdl, CMPIStatus* st, const char* opname, int nargs, ...) { int i; Modified: cmpi-bindings/trunk/src/target_python.c =================================================================== --- cmpi-bindings/trunk/src/target_python.c 2008-10-26 03:23:08 UTC (rev 1135) +++ cmpi-bindings/trunk/src/target_python.c 2008-10-28 09:54:58 UTC (rev 1136) @@ -172,13 +172,13 @@ /*---------------------------------------------------------------*/ /* - * call_provider + * TargetCall * * ** must be called while holding the threads lock ** */ static int -call_provider(ProviderMIHandle* hdl, CMPIStatus* st, +TargetCall(ProviderMIHandle* hdl, CMPIStatus* st, const char* opname, int nargs, ...) { int rc = 1; Modified: cmpi-bindings/trunk/src/target_ruby.c =================================================================== --- cmpi-bindings/trunk/src/target_ruby.c 2008-10-26 03:23:08 UTC (rev 1135) +++ cmpi-bindings/trunk/src/target_ruby.c 2008-10-28 09:54:58 UTC (rev 1136) @@ -184,12 +184,12 @@ /* - * call_provider + * TargetCall * Call function 'opname' with nargs arguments within managed interface hdl->instance */ static int -call_provider(ProviderMIHandle* hdl, CMPIStatus* st, +TargetCall(ProviderMIHandle* hdl, CMPIStatus* st, const char* opname, int nargs, ...) { int i; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-10-26 03:23:13
|
Revision: 1135 http://omc.svn.sourceforge.net/omc/?rev=1135&view=rev Author: bartw Date: 2008-10-26 03:23:08 +0000 (Sun, 26 Oct 2008) Log Message: ----------- make install now properly creates the .pyc files Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-26 03:17:22 UTC (rev 1134) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-26 03:23:08 UTC (rev 1135) @@ -52,7 +52,6 @@ %install cd build make install DESTDIR=$RPM_BUILD_ROOT -%{__rm} -f $RPM_BUILD_ROOT%{py_sitedir}/cmpi_pywbem_bindings.pyc $RPM_BUILD_ROOT%{py_sitedir}/cmpi.pyc %clean %{__rm} -rf %{buildroot} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-10-26 03:17:28
|
Revision: 1134 http://omc.svn.sourceforge.net/omc/?rev=1134&view=rev Author: bartw Date: 2008-10-26 03:17:22 +0000 (Sun, 26 Oct 2008) Log Message: ----------- bump version Modified Paths: -------------- cmpi-bindings/trunk/VERSION.cmake Modified: cmpi-bindings/trunk/VERSION.cmake =================================================================== --- cmpi-bindings/trunk/VERSION.cmake 2008-10-26 03:16:54 UTC (rev 1133) +++ cmpi-bindings/trunk/VERSION.cmake 2008-10-26 03:17:22 UTC (rev 1134) @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") -SET(VERSION_MINOR "3") +SET(VERSION_MINOR "4") SET(VERSION_PATCH "0") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-10-26 03:16:55
|
Revision: 1133 http://omc.svn.sourceforge.net/omc/?rev=1133&view=rev Author: bartw Date: 2008-10-26 03:16:54 +0000 (Sun, 26 Oct 2008) Log Message: ----------- make install now properly creates the .pyc files Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-25 15:56:14 UTC (rev 1132) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-26 03:16:54 UTC (rev 1133) @@ -91,17 +91,13 @@ %description -n cmpi-bindings-pywbem - -%post -n cmpi-bindings-pywbem -python%{py_ver} -m py_compile %{py_sitedir}/cmpi_pywbem_bindings.py %{py_sitedir}/cmpi.py - -%preun -n cmpi-bindings-pywbem -%{__rm} -f %{py_sitedir}/cmpi_pywbem_bindings.pyc %{py_sitedir}/cmpi.pyc - %files -n cmpi-bindings-pywbem %defattr(-,root,root,-) %{_libdir}/cmpi/libpyCmpiProvider.so %{py_sitedir}/cmpi_pywbem_bindings.py +%{py_sitedir}/cmpi_pywbem_bindings.pyc %{py_sitedir}/cmpi.py +%{py_sitedir}/cmpi.pyc %package -n cmpi-bindings-perl Requires: perl = %{perl_version} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-10-25 15:56:19
|
Revision: 1132 http://omc.svn.sourceforge.net/omc/?rev=1132&view=rev Author: kkaempf Date: 2008-10-25 15:56:14 +0000 (Sat, 25 Oct 2008) Log Message: ----------- better python deps for Fedora Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-24 21:00:58 UTC (rev 1131) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-25 15:56:14 UTC (rev 1132) @@ -80,11 +80,13 @@ Group: Development/Languages/Python # for the debug package. we dont use debug_package_requires here as it would enforce to install both packages. Provides: %{name} = %{version}-%{release} + +#define some macros missing on fedora %if 0%{?fedora_version} -Requires: python -%else +%{!?py_sitedir: %define py_sitedir %(%{__python} -c "from distutils.sysconfig import get_python_lib()")} +%{!?py_requires: %define py_requires Requires: python} +%endif %{py_requires} -%endif %description -n cmpi-bindings-pywbem - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-10-24 21:01:00
|
Revision: 1131 http://omc.svn.sourceforge.net/omc/?rev=1131&view=rev Author: bartw Date: 2008-10-24 21:00:58 +0000 (Fri, 24 Oct 2008) Log Message: ----------- add default values to optional parameters Modified Paths: -------------- pyprofiles/powerManagement/trunk/OMC_PowerManagementService.py Modified: pyprofiles/powerManagement/trunk/OMC_PowerManagementService.py =================================================================== --- pyprofiles/powerManagement/trunk/OMC_PowerManagementService.py 2008-10-24 19:29:58 UTC (rev 1130) +++ pyprofiles/powerManagement/trunk/OMC_PowerManagementService.py 2008-10-24 21:00:58 UTC (rev 1131) @@ -141,7 +141,7 @@ def cim_method_requeststatechange(self, env, object_name, param_requestedstate, - param_timeoutperiod): + param_timeoutperiod=None): """Implements OMC_PowerManagementService.RequestStateChange() Requests that the state of the element be changed to the value @@ -270,9 +270,9 @@ return (rval, out_params) def cim_method_setpowerstate(self, env, object_name, - param_managedelement, - param_powerstate, - param_time): + param_managedelement=None, + param_powerstate=None, + param_time=None): """Implements OMC_PowerManagementService.SetPowerState() The CIM_PowerManagementService.RequestPowerStateChange method @@ -343,8 +343,8 @@ return (rval, out_params) def cim_method_changeaffectedelementsassignedsequence(self, env, object_name, - param_managedelements, - param_assignedsequence): + param_managedelements=None, + param_assignedsequence=None): """Implements OMC_PowerManagementService.ChangeAffectedElementsAssignedSequence() This method is called to change relative sequence in which order This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mik...@us...> - 2008-10-24 19:30:01
|
Revision: 1130 http://omc.svn.sourceforge.net/omc/?rev=1130&view=rev Author: mike-brasher Date: 2008-10-24 19:29:58 +0000 (Fri, 24 Oct 2008) Log Message: ----------- New test provider Modified Paths: -------------- cmpi-bindings/trunk/test/python/install.sh Added Paths: ----------- cmpi-bindings/trunk/test/python/TestExcept.mof cmpi-bindings/trunk/test/python/TestExcept.peg.reg cmpi-bindings/trunk/test/python/TestExcept.py cmpi-bindings/trunk/test/python/TestExcept.sfcb.reg Added: cmpi-bindings/trunk/test/python/TestExcept.mof =================================================================== --- cmpi-bindings/trunk/test/python/TestExcept.mof (rev 0) +++ cmpi-bindings/trunk/test/python/TestExcept.mof 2008-10-24 19:29:58 UTC (rev 1130) @@ -0,0 +1,11 @@ +[ Description("Instance provider used to test exceptions by causing them")] +class Test_Except +{ + [Key] string id; + uint32 count; + boolean flag; + string message; + uint32 counts[]; + boolean flags[]; + string messages[]; +}; Added: cmpi-bindings/trunk/test/python/TestExcept.peg.reg =================================================================== --- cmpi-bindings/trunk/test/python/TestExcept.peg.reg (rev 0) +++ cmpi-bindings/trunk/test/python/TestExcept.peg.reg 2008-10-24 19:29:58 UTC (rev 1130) @@ -0,0 +1,25 @@ +// Pegasus Provider registration for Test_Except +instance of PG_ProviderModule +{ + Name = "pyCmpiProvider_Test_Except"; + InterfaceType = "CMPI"; + InterfaceVersion = "2.0.0"; + Location = "pyCmpiProvider"; + UserContext = 2; // Requestor + Vendor = "TODO"; // TODO + Version = "1.0"; +}; +instance of PG_Provider +{ + Name = "Test_Except"; + ProviderModuleName = "pyCmpiProvider_Test_Except"; +}; +instance of PG_ProviderCapabilities +{ + CapabilityID = "Test_Except"; + ProviderModuleName = "pyCmpiProvider_Test_Except"; + ProviderName = "Test_Except"; + ClassName = "Test_Except"; + Namespaces = {"root/cimv2"}; + ProviderType = {2}; // Instance +}; Added: cmpi-bindings/trunk/test/python/TestExcept.py =================================================================== --- cmpi-bindings/trunk/test/python/TestExcept.py (rev 0) +++ cmpi-bindings/trunk/test/python/TestExcept.py 2008-10-24 19:29:58 UTC (rev 1130) @@ -0,0 +1,183 @@ +"""Python Provider for Test_Except + +Instruments the CIM class Test_Except + +""" + +import pywbem +from pywbem.cim_provider2 import CIMProvider2 + +class Test_Except(CIMProvider2): + """Instrument the CIM class Test_Except + + Instance provider used to test exceptions by causing them + + """ + + def __init__ (self, env): + logger = env.get_logger() + logger.log_debug('Initializing provider %s from %s' \ + % (self.__class__.__name__, __file__)) + + def get_instance(self, env, model): + """Return an instance. + + Keyword arguments: + env -- Provider Environment (pycimmb.ProviderEnvironment) + model -- A template of the pywbem.CIMInstance to be returned. The + key properties are set on this instance to correspond to the + instanceName that was requested. The properties of the model + are already filtered according to the PropertyList from the + request. Only properties present in the model need to be + given values. If you prefer, you can set all of the + values, and the instance will be filtered for you. + + Possible Errors: + CIM_ERR_ACCESS_DENIED + CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized + or otherwise incorrect parameters) + CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM + Instance does not exist in the specified namespace) + CIM_ERR_FAILED (some other unspecified error occurred) + + """ + + logger = env.get_logger() + logger.log_debug('Entering %s.get_instance()' \ + % self.__class__.__name__) + + + # TODO fetch system resource matching the following keys: + # model['id'] + + #model['count'] = pywbem.Uint32() # TODO + #model['counts'] = [pywbem.Uint32(),] # TODO + #model['flag'] = bool() # TODO + #model['flags'] = [bool(),] # TODO + #model['message'] = '' # TODO + #model['messages'] = ['',] # TODO + return model + + def enum_instances(self, env, model, keys_only): + """Enumerate instances. + + The WBEM operations EnumerateInstances and EnumerateInstanceNames + are both mapped to this method. + This method is a python generator + + Keyword arguments: + env -- Provider Environment (pycimmb.ProviderEnvironment) + model -- A template of the pywbem.CIMInstances to be generated. + The properties of the model are already filtered according to + the PropertyList from the request. Only properties present in + the model need to be given values. If you prefer, you can + always set all of the values, and the instance will be filtered + for you. + keys_only -- A boolean. True if only the key properties should be + set on the generated instances. + + Possible Errors: + CIM_ERR_FAILED (some other unspecified error occurred) + + """ + + logger = env.get_logger() + logger.log_debug('Entering %s.enum_instances()' \ + % self.__class__.__name__) + + # Prime model.path with knowledge of the keys, so key values on + # the CIMInstanceName (model.path) will automatically be set when + # we set property values on the model. + model.path.update({'id': None}) + + model['id'] = 'RED' + + # ATTN: this next line trashes memory in sfcb (invalid write). + #model['id'] = pywbem.Uint32(99) + + # ATTN: this next line trashes memory and client hangs forever. + #model['id'] = ['RED', 'GREEN', 'BLUE' ] + + model['count'] = pywbem.Uint32(99) + model['flag'] = bool(0) + model['message'] = 'hello world' + # ATTN: this next line trashes memory and client hangs forever. + #model['message'] = ['RED', 'GREEN', 'BLUE' ] + model['counts'] = [pywbem.Uint32(10), pywbem.Uint32(20)] + model['flags'] = [bool(1), bool(2), bool(3)] + model['messages'] = ['RED', 'GREEN', 'BLUE' ] + + # ATTN: sfcb accepts this and sends it to the client. + #model['illegal property name'] = 'oops' + yield model + + def set_instance(self, env, instance, modify_existing): + """Return a newly created or modified instance. + + Keyword arguments: + env -- Provider Environment (pycimmb.ProviderEnvironment) + instance -- The new pywbem.CIMInstance. If modifying an existing + instance, the properties on this instance have been filtered by + the PropertyList from the request. + modify_existing -- True if ModifyInstance, False if CreateInstance + + Return the new instance. The keys must be set on the new instance. + + Possible Errors: + CIM_ERR_ACCESS_DENIED + CIM_ERR_NOT_SUPPORTED + CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized + or otherwise incorrect parameters) + CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only + valid if modify_existing is False, indicating that the operation + was CreateInstance) + CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid + if modify_existing is True, indicating that the operation + was ModifyInstance) + CIM_ERR_FAILED (some other unspecified error occurred) + + """ + + logger = env.get_logger() + logger.log_debug('Entering %s.set_instance()' \ + % self.__class__.__name__) + # TODO create or modify the instance + raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement + return instance + + def delete_instance(self, env, instance_name): + """Delete an instance. + + Keyword arguments: + env -- Provider Environment (pycimmb.ProviderEnvironment) + instance_name -- A pywbem.CIMInstanceName specifying the instance + to delete. + + Possible Errors: + CIM_ERR_ACCESS_DENIED + CIM_ERR_NOT_SUPPORTED + CIM_ERR_INVALID_NAMESPACE + CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized + or otherwise incorrect parameters) + CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified + namespace) + CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM + Instance does not exist in the specified namespace) + CIM_ERR_FAILED (some other unspecified error occurred) + + """ + + logger = env.get_logger() + logger.log_debug('Entering %s.delete_instance()' \ + % self.__class__.__name__) + + # TODO delete the resource + raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED) # Remove to implement + +## end of class Test_ExceptProvider + +## get_providers() for associating CIM Class Name to python provider class name + +def get_providers(env): + test_except_prov = Test_Except(env) + return {'Test_Except': test_except_prov} Added: cmpi-bindings/trunk/test/python/TestExcept.sfcb.reg =================================================================== --- cmpi-bindings/trunk/test/python/TestExcept.sfcb.reg (rev 0) +++ cmpi-bindings/trunk/test/python/TestExcept.sfcb.reg 2008-10-24 19:29:58 UTC (rev 1130) @@ -0,0 +1,5 @@ +[Test_Except] + provider: TestExcept + location: pyCmpiProvider + type: instance + namespace: root/cimv2 Modified: cmpi-bindings/trunk/test/python/install.sh =================================================================== --- cmpi-bindings/trunk/test/python/install.sh 2008-10-24 10:21:03 UTC (rev 1129) +++ cmpi-bindings/trunk/test/python/install.sh 2008-10-24 19:29:58 UTC (rev 1130) @@ -43,6 +43,7 @@ __install TestAssocProvider.py /usr/lib/pycim __install TestAtomProvider.py /usr/lib/pycim __install UpcallAtomProvider.py /usr/lib/pycim +__install TestExcept.py /usr/lib/pycim if [ "$1" = "op" ]; then cimmof TestMethodPegasus.mof @@ -53,15 +54,20 @@ cimmof -n root/PG_InterOp TestAtomProvider.peg.reg cimmof UpcallAtom.mof cimmof -n root/PG_Interop UpcallAtom.peg.reg + cimmof TestExcept.mof + cimmof -n root/PG_InterOp TestExcept.peg.reg + else __install TestMethod.mof /var/lib/sfcb/stage/mofs/root/cimv2 __install TestAssoc.mof /var/lib/sfcb/stage/mofs/root/cimv2 __install TestAtom.mof /var/lib/sfcb/stage/mofs/root/cimv2 __install UpcallAtom.mof /var/lib/sfcb/stage/mofs/root/cimv2 + __install TestExcept.mof /var/lib/sfcb/stage/mofs/root/cimv2 __install TestAssocProvider.sfcb.reg /var/lib/sfcb/stage/regs __install TestMethod.sfcb.reg /var/lib/sfcb/stage/regs __install TestAtomProvider.sfcb.reg /var/lib/sfcb/stage/regs __install UpcallAtom.sfcb.reg /var/lib/sfcb/stage/regs + __install TestExcept.sfcb.reg /var/lib/sfcb/stage/regs sfcbrepos -f fi This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-10-24 12:21:12
|
Revision: 1129 http://omc.svn.sourceforge.net/omc/?rev=1129&view=rev Author: kkaempf Date: 2008-10-24 10:21:03 +0000 (Fri, 24 Oct 2008) Log Message: ----------- fedora doesn't have py_requires Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-24 04:32:43 UTC (rev 1128) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2008-10-24 10:21:03 UTC (rev 1129) @@ -80,7 +80,11 @@ Group: Development/Languages/Python # for the debug package. we dont use debug_package_requires here as it would enforce to install both packages. Provides: %{name} = %{version}-%{release} +%if 0%{?fedora_version} +Requires: python +%else %{py_requires} +%endif %description -n cmpi-bindings-pywbem - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |