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
|
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
|
|
|
|
1
(3) |
2
(5) |
3
(6) |
4
|
|
5
|
6
(6) |
7
(1) |
8
(1) |
9
(2) |
10
(7) |
11
|
|
12
|
13
(2) |
14
(6) |
15
(5) |
16
(9) |
17
(3) |
18
|
|
19
(1) |
20
(1) |
21
(6) |
22
|
23
(7) |
24
(4) |
25
(1) |
|
26
(3) |
27
|
28
(2) |
29
(4) |
30
(1) |
31
|
|
|
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.
|
|
From: <ba...@us...> - 2008-10-24 04:32:48
|
Revision: 1128
http://omc.svn.sourceforge.net/omc/?rev=1128&view=rev
Author: bartw
Date: 2008-10-24 04:32:43 +0000 (Fri, 24 Oct 2008)
Log Message:
-----------
fix install to create .pyc files with no artifacts of DESTDIR
Modified Paths:
--------------
cmpi-bindings/trunk/swig/python/CMakeLists.txt
Modified: cmpi-bindings/trunk/swig/python/CMakeLists.txt
===================================================================
--- cmpi-bindings/trunk/swig/python/CMakeLists.txt 2008-10-23 19:45:24 UTC (rev 1127)
+++ cmpi-bindings/trunk/swig/python/CMakeLists.txt 2008-10-24 04:32:43 UTC (rev 1128)
@@ -65,4 +65,11 @@
INSTALL(FILES cmpi_pywbem_bindings.py DESTINATION ${PYTHON_SITE_DIR} )
#INSTALL(FILES Py_UnixProcessProvider.py DESTINATION /usr/lib/pycim )
-INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -m py_compile \$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi.py \$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi_pywbem_bindings.py)")
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi.py', dfile='${PYTHON_SITE_DIR}/cmpi.py')\")")
+
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c \"from py_compile import compile; compile('\$ENV{DESTDIR}${PYTHON_SITE_DIR}/cmpi_pywbem_bindings.py', dfile='${PYTHON_SITE_DIR}/cmpi_pywbem_bindings.py')\")")
+
+
+
+
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2008-10-23 19:45:29
|
Revision: 1127
http://omc.svn.sourceforge.net/omc/?rev=1127&view=rev
Author: npaxton
Date: 2008-10-23 19:45:24 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
Update test README to more accurately reflect current state
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/README
Modified: cmpi-bindings/trunk/test/python/README
===================================================================
--- cmpi-bindings/trunk/test/python/README 2008-10-23 19:41:36 UTC (rev 1126)
+++ cmpi-bindings/trunk/test/python/README 2008-10-23 19:45:24 UTC (rev 1127)
@@ -22,28 +22,30 @@
- Create symlinks for cmpi-bindings
+ (If appropriate, substitute python2.5 with python2.4)
cd build/swig/python
sudo ln -s `pwd`/libpyCmpiProvider.so /usr/lib/cmpi
sudo ln -s `pwd`/cmpi.py /usr/lib/python2.5/site-packages
cd ../../..
cd swig/python
- sudo ln -s `pwd`/pycmpi_provider.py /usr/lib/python2.5/site-packages
+ sudo ln -s `pwd`/cmpi_pywbem_bindings.py /usr/lib/python2.5/site-packages
- Create symlinks for sfcb mof/reg
- sudo ./setup.sh
+ sudo ./install.sh
+ This also runs "sfcbrepos -f"
- This also runs "sfcbrepos -f"
+ if you are installing to test on Pegasus, use the '--op' option
-- Restart sfcbd
+- Restart sfcbd or tog-pegasus (cimserver)
-- now run TestMethod_Test.py, TestAtomProvider_Test.py as root.
+- now run TestMethod_Test.py, TestAtomProvider_Test.py, test_assoc.py, UpcallAtomTest.py, and TestIndications.py as root.
(they only need to run as root because they use the passwordless local unix connection).
- those two tests should all pass.
- test_assoc.py should partially pass.
+ (To run against Pegasus, run with option: '-u /var/run/tog-pegasus/cimxml.socket' to use the local unix connection)
+ They should all pass.
- ["Property Not Found in PropertyList: uint64" is an expected error]
\ No newline at end of file
+ ["Property Not Found in PropertyList: uint64" is an expected error]
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <np...@us...> - 2008-10-23 19:41:40
|
Revision: 1126
http://omc.svn.sourceforge.net/omc/?rev=1126&view=rev
Author: npaxton
Date: 2008-10-23 19:41:36 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
fix a few logging issues
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
Modified: cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
===================================================================
--- cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-23 16:08:37 UTC (rev 1125)
+++ cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-23 19:41:36 UTC (rev 1126)
@@ -344,7 +344,7 @@
"""
logger = env.get_logger()
- logger.log_debug('Entering enable_indications()' )
+ logger.log_debug('Entering enable_indications()')
#just fall through for success
@@ -485,15 +485,15 @@
#TestAssoc_User has an association through TestAssoc_MemberOfGroup
# to TestAssoc_Group
if assocs:
- log_debug("#*)$*%)# Got assocs ")
+ log_debug("#*)$*%)# Got assocs ", logger)
for assoc in assocs:
- log_debug("Got an assoc")
+ log_debug("Got an assoc", logger)
log_debug(" ", logger)
log_debug(" >>> assoc: %s"%str(assoc), logger)
log_debug(" ", logger)
name = assoc.path
log_debug(" ", logger)
- log_debug(" >>> name: "%str(name), logger)
+ log_debug(" >>> name: %s"%str(name), logger)
log_debug(" ", logger)
if assoc.classname.lower() != 'testassoc_group':
raise "Associator Error: %s" %str(assoc)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-23 16:08:42
|
Revision: 1125
http://omc.svn.sourceforge.net/omc/?rev=1125&view=rev
Author: bartw
Date: 2008-10-23 16:08:37 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
crank up the level of abuse.
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/abuse.sh
Modified: cmpi-bindings/trunk/test/python/abuse.sh
===================================================================
--- cmpi-bindings/trunk/test/python/abuse.sh 2008-10-23 15:36:36 UTC (rev 1124)
+++ cmpi-bindings/trunk/test/python/abuse.sh 2008-10-23 16:08:37 UTC (rev 1125)
@@ -10,6 +10,8 @@
python TestMethod_Test.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
+python UpcallAtomTest.py $@ &
+python TestIndications.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
@@ -17,6 +19,8 @@
python TestMethod_Test.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
+python UpcallAtomTest.py $@ &
+python TestIndications.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
@@ -24,10 +28,12 @@
python TestMethod_Test.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
+python UpcallAtomTest.py $@ &
+python TestIndications.py $@ &
-sleep 15
+#sleep 15
-python test_assoc.py $@ &
+#python test_assoc.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
@@ -35,4 +41,6 @@
python TestMethod_Test.py $@ &
python TestAtomProvider_Test.py $@ &
python TestMethod_Test.py $@ &
+python UpcallAtomTest.py $@ &
+python TestIndications.py $@ &
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-23 15:36:43
|
Revision: 1124
http://omc.svn.sourceforge.net/omc/?rev=1124&view=rev
Author: bartw
Date: 2008-10-23 15:36:36 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
tailor test depending on broker
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/TestMethod.mof
cmpi-bindings/trunk/test/python/TestMethod.py
cmpi-bindings/trunk/test/python/TestMethod_Test.py
Modified: cmpi-bindings/trunk/test/python/TestMethod.mof
===================================================================
--- cmpi-bindings/trunk/test/python/TestMethod.mof 2008-10-23 15:34:41 UTC (rev 1123)
+++ cmpi-bindings/trunk/test/python/TestMethod.mof 2008-10-23 15:36:36 UTC (rev 1124)
@@ -270,5 +270,8 @@
sint32 getObjects(
[in(false), out, required, EmbeddedInstance("Test_Method")] string insts[]
);
+
+ [ Description("Get the name of the broker"), Static ]
+ string getBrokerName();
};
Modified: cmpi-bindings/trunk/test/python/TestMethod.py
===================================================================
--- cmpi-bindings/trunk/test/python/TestMethod.py 2008-10-23 15:34:41 UTC (rev 1123)
+++ cmpi-bindings/trunk/test/python/TestMethod.py 2008-10-23 15:36:36 UTC (rev 1124)
@@ -754,6 +754,15 @@
out_params = [pywbem.CIMParameter('insts', 'instance', value=insts)]
rval = pywbem.Sint32(0)
return (rval, out_params)
+
+ def cim_method_getbrokername(self, env, object_name):
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.cim_method_getbrokername()' \
+ % self.__class__.__name__)
+
+ out_params = []
+ rval = env.get_cimom_handle().broker.name()
+ return (rval, out_params)
## end of class TestMethodProvider
Modified: cmpi-bindings/trunk/test/python/TestMethod_Test.py
===================================================================
--- cmpi-bindings/trunk/test/python/TestMethod_Test.py 2008-10-23 15:34:41 UTC (rev 1123)
+++ cmpi-bindings/trunk/test/python/TestMethod_Test.py 2008-10-23 15:36:36 UTC (rev 1124)
@@ -520,6 +520,11 @@
def test_xembeddedinst_output_params(self):
+ rv,outs = self.conn.InvokeMethod('getBrokerName', 'Test_Method')
+ if rv == 'RequestHandler':
+ print '\n*** Broker detected as SFCB. Skipping embedded out param test.'
+ print 'Re-enable when SFCB is fixed.'
+ return
iname = pywbem.CIMInstanceName('Test_Method', namespace='root/cimv2',
keybindings = {'id':'one'})
inst = pywbem.CIMInstance('Test_Method', path=None,
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-23 15:34:50
|
Revision: 1123
http://omc.svn.sourceforge.net/omc/?rev=1123&view=rev
Author: bartw
Date: 2008-10-23 15:34:41 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
tailor test depending on broker
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/UpcallAtom.mof
cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
cmpi-bindings/trunk/test/python/UpcallAtomTest.py
Modified: cmpi-bindings/trunk/test/python/UpcallAtom.mof
===================================================================
--- cmpi-bindings/trunk/test/python/UpcallAtom.mof 2008-10-23 15:32:54 UTC (rev 1122)
+++ cmpi-bindings/trunk/test/python/UpcallAtom.mof 2008-10-23 15:34:41 UTC (rev 1123)
@@ -20,6 +20,9 @@
uint16 get_indication_send_count(
// return number of indications sent since last reset
);
+
+ [ Description("Get the name of the broker"), Static ]
+ string getBrokerName();
};
Modified: cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
===================================================================
--- cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-23 15:32:54 UTC (rev 1122)
+++ cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-23 15:34:41 UTC (rev 1123)
@@ -853,7 +853,16 @@
rval = pywbem.Uint16(cur_ind_count)
return (rval, out_params)
+################################################################################
+ def cim_method_getbrokername(self, env, object_name):
+ logger = env.get_logger()
+ logger.log_debug('Entering %s.cim_method_getbrokername()' \
+ % self.__class__.__name__)
+ out_params = []
+ rval = env.get_cimom_handle().broker.name()
+ return (rval, out_params)
+
## end of class UpcallAtomProvider
Modified: cmpi-bindings/trunk/test/python/UpcallAtomTest.py
===================================================================
--- cmpi-bindings/trunk/test/python/UpcallAtomTest.py 2008-10-23 15:32:54 UTC (rev 1122)
+++ cmpi-bindings/trunk/test/python/UpcallAtomTest.py 2008-10-23 15:34:41 UTC (rev 1123)
@@ -49,6 +49,11 @@
print('')
def test_a_upcalls_all(self):
+ rv,outs = self.conn.InvokeMethod('getBrokerName', 'Test_UpcallAtom')
+ if rv == 'Pegasus':
+ print '\n*** Broker detected as Pegasus. Skipping upcall test.'
+ print 'Re-enable when Pegasus is fixed.'
+ return
rv,outs = self.conn.InvokeMethod('test_all_upcalls', 'Test_UpcallAtom')
self.assertEquals(rv, 'Success!')
self.assertFalse(outs)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-23 15:33:03
|
Revision: 1122
http://omc.svn.sourceforge.net/omc/?rev=1122&view=rev
Author: bartw
Date: 2008-10-23 15:32:54 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
added script to run all tests
Added Paths:
-----------
cmpi-bindings/trunk/test/python/runtests.sh
Added: cmpi-bindings/trunk/test/python/runtests.sh
===================================================================
--- cmpi-bindings/trunk/test/python/runtests.sh (rev 0)
+++ cmpi-bindings/trunk/test/python/runtests.sh 2008-10-23 15:32:54 UTC (rev 1122)
@@ -0,0 +1,6 @@
+#!/bin/sh
+python TestAtomProvider_Test.py $@
+python TestIndications.py $@
+python UpcallAtomTest.py $@
+python test_assoc.py $@
+python TestMethod_Test.py $@
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mik...@us...> - 2008-10-23 00:50:36
|
Revision: 1121
http://omc.svn.sourceforge.net/omc/?rev=1121&view=rev
Author: mike-brasher
Date: 2008-10-23 00:50:26 +0000 (Thu, 23 Oct 2008)
Log Message:
-----------
Proivders to reproduce upcall hang in pegasus.
Added Paths:
-----------
cmpi-bindings/trunk/test/konkret/
cmpi-bindings/trunk/test/konkret/Gadget.h
cmpi-bindings/trunk/test/konkret/GadgetProvider.c
cmpi-bindings/trunk/test/konkret/Makefile
cmpi-bindings/trunk/test/konkret/README
cmpi-bindings/trunk/test/konkret/Upcall.h
cmpi-bindings/trunk/test/konkret/UpcallProvider.c
cmpi-bindings/trunk/test/konkret/Widget.h
cmpi-bindings/trunk/test/konkret/Widget.mof
cmpi-bindings/trunk/test/konkret/Widget.reg
cmpi-bindings/trunk/test/konkret/WidgetProvider.c
cmpi-bindings/trunk/test/konkret/register.mof
Added: cmpi-bindings/trunk/test/konkret/Gadget.h
===================================================================
--- cmpi-bindings/trunk/test/konkret/Gadget.h (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Gadget.h 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,379 @@
+/*
+**==============================================================================
+**
+** CAUTION: This file generated by KonkretCMPI. Please do not edit.
+**
+**==============================================================================
+*/
+
+#ifndef _konkrete_Gadget_h
+#define _konkrete_Gadget_h
+
+#include <konkret/konkret.h>
+#include "Widget.h"
+
+/*
+**==============================================================================
+**
+** struct GadgetRef
+**
+**==============================================================================
+*/
+
+/* classname=KC_Gadget */
+typedef struct _GadgetRef
+{
+ KBase __base;
+ /* KC_Gadget features */
+ const KRef Left; /* Widget */
+ const KRef Right; /* Widget */
+}
+GadgetRef;
+
+static const unsigned char __GadgetRef_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x47,0x61,0x64,0x67,0x65,0x74,0x00,0x02,0x4e,0x04,0x4c,
+ 0x65,0x66,0x74,0x00,0x4e,0x05,0x52,0x69,0x67,0x68,0x74,0x00,
+};
+
+KINLINE void GadgetRef_Init(
+ GadgetRef* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __GadgetRef_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+ ((KRef*)&self->Left)->__sig = __Widget_sig;
+ ((KRef*)&self->Right)->__sig = __Widget_sig;
+}
+
+KINLINE CMPIStatus GadgetRef_InitFromInstance(
+ GadgetRef* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ GadgetRef_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus GadgetRef_InitFromObjectPath(
+ GadgetRef* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ GadgetRef_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void GadgetRef_Print(
+ const GadgetRef* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'r');
+}
+
+KINLINE CMPIInstance* GadgetRef_ToInstance(
+ const GadgetRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* GadgetRef_ToObjectPath(
+ const GadgetRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* GadgetRef_NameSpace(
+ GadgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void GadgetRef_SetObjectPath_Left(
+ GadgetRef* self,
+ const CMPIObjectPath* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_SetObjectPath(field, x);
+ }
+}
+
+KINLINE CMPIStatus GadgetRef_Set_Left(
+ GadgetRef* self,
+ const WidgetRef* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ return KRef_Set(field, &x->__base);
+ }
+ CMReturn(CMPI_RC_ERR_FAILED);
+}
+
+KINLINE void GadgetRef_Null_Left(
+ GadgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_Null(field);
+ }
+}
+
+KINLINE void GadgetRef_Clr_Left(
+ GadgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_Clr(field);
+ }
+}
+
+KINLINE void GadgetRef_SetObjectPath_Right(
+ GadgetRef* self,
+ const CMPIObjectPath* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_SetObjectPath(field, x);
+ }
+}
+
+KINLINE CMPIStatus GadgetRef_Set_Right(
+ GadgetRef* self,
+ const WidgetRef* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ return KRef_Set(field, &x->__base);
+ }
+ CMReturn(CMPI_RC_ERR_FAILED);
+}
+
+KINLINE void GadgetRef_Null_Right(
+ GadgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_Null(field);
+ }
+}
+
+KINLINE void GadgetRef_Clr_Right(
+ GadgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_Clr(field);
+ }
+}
+
+/*
+**==============================================================================
+**
+** struct Gadget
+**
+**==============================================================================
+*/
+
+/* classname=KC_Gadget */
+typedef struct _Gadget
+{
+ KBase __base;
+ /* KC_Gadget features */
+ const KRef Left; /* Widget */
+ const KRef Right; /* Widget */
+}
+Gadget;
+
+static const unsigned char __Gadget_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x47,0x61,0x64,0x67,0x65,0x74,0x00,0x02,0x4e,0x04,0x4c,
+ 0x65,0x66,0x74,0x00,0x4e,0x05,0x52,0x69,0x67,0x68,0x74,0x00,
+};
+
+KINLINE void Gadget_Init(
+ Gadget* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __Gadget_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+ ((KRef*)&self->Left)->__sig = __Widget_sig;
+ ((KRef*)&self->Right)->__sig = __Widget_sig;
+}
+
+KINLINE CMPIStatus Gadget_InitFromInstance(
+ Gadget* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ Gadget_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus Gadget_InitFromObjectPath(
+ Gadget* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ Gadget_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void Gadget_Print(
+ const Gadget* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'i');
+}
+
+KINLINE CMPIInstance* Gadget_ToInstance(
+ const Gadget* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* Gadget_ToObjectPath(
+ const Gadget* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* Gadget_NameSpace(
+ Gadget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void Gadget_SetObjectPath_Left(
+ Gadget* self,
+ const CMPIObjectPath* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_SetObjectPath(field, x);
+ }
+}
+
+KINLINE CMPIStatus Gadget_Set_Left(
+ Gadget* self,
+ const WidgetRef* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ return KRef_Set(field, &x->__base);
+ }
+ CMReturn(CMPI_RC_ERR_FAILED);
+}
+
+KINLINE void Gadget_Null_Left(
+ Gadget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_Null(field);
+ }
+}
+
+KINLINE void Gadget_Clr_Left(
+ Gadget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Left;
+ KRef_Clr(field);
+ }
+}
+
+KINLINE void Gadget_SetObjectPath_Right(
+ Gadget* self,
+ const CMPIObjectPath* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_SetObjectPath(field, x);
+ }
+}
+
+KINLINE CMPIStatus Gadget_Set_Right(
+ Gadget* self,
+ const WidgetRef* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ return KRef_Set(field, &x->__base);
+ }
+ CMReturn(CMPI_RC_ERR_FAILED);
+}
+
+KINLINE void Gadget_Null_Right(
+ Gadget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_Null(field);
+ }
+}
+
+KINLINE void Gadget_Clr_Right(
+ Gadget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KRef* field = (KRef*)&self->Right;
+ KRef_Clr(field);
+ }
+}
+
+/*
+**==============================================================================
+**
+** Gadget methods
+**
+**==============================================================================
+*/
+
+KINLINE CMPIStatus Gadget_DispatchMethod(
+ const CMPIBroker* cb,
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* meth,
+ const CMPIArgs* in,
+ CMPIArgs* out)
+{
+ GadgetRef self;
+
+ KReturnIf(GadgetRef_InitFromObjectPath(&self, cb, cop));
+
+
+ KReturn(ERR_METHOD_NOT_FOUND);
+}
+
+#define Gadget_ClassName "KC_Gadget"
+
+#endif /* _konkrete_Gadget_h */
Added: cmpi-bindings/trunk/test/konkret/GadgetProvider.c
===================================================================
--- cmpi-bindings/trunk/test/konkret/GadgetProvider.c (rev 0)
+++ cmpi-bindings/trunk/test/konkret/GadgetProvider.c 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,314 @@
+#include <konkret/konkret.h>
+#include "Gadget.h"
+
+static const CMPIBroker* _cb;
+
+static void GadgetInitialize()
+{
+}
+
+static CMPIStatus GadgetCleanup(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus GadgetEnumInstanceNames(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ const char* ns = KNameSpace(cop);
+ WidgetRef left;
+ WidgetRef right;
+ GadgetRef g;
+
+ /* First Gadget */
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1002");
+
+ GadgetRef_Init(&g, _cb, ns);
+ GadgetRef_Set_Left(&g, &left);
+ GadgetRef_Set_Right(&g, &right);
+ // GadgetRef_Print(&g, stdout);
+ KReturnObjectPath(cr, g);
+ }
+
+ /* Second Gadget */
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1003");
+
+ GadgetRef_Init(&g, _cb, ns);
+ GadgetRef_Set_Left(&g, &left);
+ GadgetRef_Set_Right(&g, &right);
+ // GadgetRef_Print(&g, stdout);
+ KReturnObjectPath(cr, g);
+ }
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus GadgetEnumInstances(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ const char* ns = KNameSpace(cop);
+ WidgetRef left;
+ WidgetRef right;
+ Gadget g;
+
+ /* First Gadget */
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1002");
+
+ Gadget_Init(&g, _cb, ns);
+ Gadget_Set_Left(&g, &left);
+ Gadget_Set_Right(&g, &right);
+ KReturnInstance(cr, g);
+ }
+
+ /* Second Gadget */
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1003");
+
+ Gadget_Init(&g, _cb, ns);
+ Gadget_Set_Left(&g, &left);
+ Gadget_Set_Right(&g, &right);
+ KReturnInstance(cr, g);
+ }
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus GadgetGetInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ const char* ns = KNameSpace(cop);
+ GadgetRef gr;
+ Gadget g;
+ WidgetRef left;
+ WidgetRef right;
+
+ if (GadgetRef_InitFromObjectPath(&gr, _cb, cop).rc)
+ KReturn(ERR_FAILED);
+
+ if (WidgetRef_InitFromObjectPath(&left, _cb, gr.Left.value).rc)
+ KReturn(ERR_FAILED);
+
+ if (WidgetRef_InitFromObjectPath(&right, _cb, gr.Right.value).rc)
+ KReturn(ERR_FAILED);
+
+ /* First Gadget */
+
+ if (!strcmp(left.Id.chars, "1001") && !strcmp(right.Id.chars, "1002"))
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1002");
+
+ Gadget_Init(&g, _cb, ns);
+ Gadget_Set_Left(&g, &left);
+ Gadget_Set_Right(&g, &right);
+ KReturnInstance(cr, g);
+ KReturn(OK);
+ }
+ else if (!strcmp(left.Id.chars, "1001") && !strcmp(right.Id.chars, "1003"))
+ {
+ WidgetRef_Init(&left, _cb, ns);
+ WidgetRef_Set_Id(&left, "1001");
+
+ WidgetRef_Init(&right, _cb, ns);
+ WidgetRef_Set_Id(&right, "1003");
+
+ Gadget_Init(&g, _cb, ns);
+ Gadget_Set_Left(&g, &left);
+ Gadget_Set_Right(&g, &right);
+ KReturnInstance(cr, g);
+ KReturn(OK);
+ }
+
+ KReturn(ERR_NOT_FOUND);
+}
+
+static CMPIStatus GadgetCreateInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const CMPIInstance* ci)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus GadgetModifyInstance(
+ 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 GadgetDeleteInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus GadgetExecQuery(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* lang,
+ const char* query)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus GadgetAssociationCleanup(
+ CMPIAssociationMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus GadgetAssociators(
+ CMPIAssociationMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* assocClass,
+ const char* resultClass,
+ const char* role,
+ const char* resultRole,
+ const char** properties)
+{
+ return KDefaultAssociators(
+ _cb,
+ mi,
+ cc,
+ cr,
+ cop,
+ Gadget_ClassName,
+ assocClass,
+ resultClass,
+ role,
+ resultRole,
+ properties);
+}
+
+static CMPIStatus GadgetAssociatorNames(
+ CMPIAssociationMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* assocClass,
+ const char* resultClass,
+ const char* role,
+ const char* resultRole)
+{
+ return KDefaultAssociatorNames(
+ _cb,
+ mi,
+ cc,
+ cr,
+ cop,
+ Gadget_ClassName,
+ assocClass,
+ resultClass,
+ role,
+ resultRole);
+}
+
+static CMPIStatus GadgetReferences(
+ CMPIAssociationMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* assocClass,
+ const char* role,
+ const char** properties)
+{
+ return KDefaultReferences(
+ _cb,
+ mi,
+ cc,
+ cr,
+ cop,
+ Gadget_ClassName,
+ assocClass,
+ role,
+ properties);
+}
+
+static CMPIStatus GadgetReferenceNames(
+ CMPIAssociationMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* assocClass,
+ const char* role)
+{
+ return KDefaultReferenceNames(
+ _cb,
+ mi,
+ cc,
+ cr,
+ cop,
+ Gadget_ClassName,
+ assocClass,
+ role);
+}
+
+CMInstanceMIStub(
+ Gadget,
+ KC_Gadget,
+ _cb,
+ GadgetInitialize())
+
+CMAssociationMIStub(
+ Gadget,
+ KC_Gadget,
+ _cb,
+ GadgetInitialize())
+
+KONKRET_REGISTRATION(
+ "root/cimv2",
+ "KC_Gadget",
+ "KC_Gadget",
+ "instance association");
Added: cmpi-bindings/trunk/test/konkret/Makefile
===================================================================
--- cmpi-bindings/trunk/test/konkret/Makefile (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Makefile 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,41 @@
+TARGET = libWidgetProvider.so
+
+SOURCES = WidgetProvider.c GadgetProvider.c UpcallProvider.c
+
+OBJECTS = $(SOURCES:.c=.o)
+
+INCLUDES += -I/usr/include/cmpi
+
+LIBRARIES += -lkonkret
+
+FLAGS = -g -Wall -O2 -fPIC
+
+all:
+ echo $(OBJECTS)
+ gcc $(FLAGS) -c $(INCLUDES) WidgetProvider.c
+ gcc $(FLAGS) -c $(INCLUDES) GadgetProvider.c
+ gcc $(FLAGS) -c $(INCLUDES) UpcallProvider.c
+ gcc $(FLAGS) -shared -o $(TARGET) $(INCLUDES) $(OBJECTS) $(LIBRARIES)
+
+clean:
+ rm -rf $(TARGET)
+
+gen:
+ konkret -s KC_Upcall -s KC_Widget -s KC_Gadget -m Widget.mof KC_Widget=Widget KC_Gadget=Gadget KC_Upcall=Upcall
+
+install:
+ konkretreg $(TARGET) > Widget.reg
+ su -c "make install-su"
+
+install-su:
+ cp $(TARGET) /usr/lib64
+ cp Widget.mof /var/lib/sfcb/stage/mofs/root/cimv2
+ cp Widget.mof /var/lib/sfcb/stage/mofs/root/interop
+ cp Widget.reg /var/lib/sfcb/stage/regs
+ sfcbrepos -f
+
+reg:
+ cp $(TARGET) $(PEGASUS_HOME)/lib
+ cimmof Widget.mof
+ cimmof -n root/PG_InterOp register.mof
+
Added: cmpi-bindings/trunk/test/konkret/README
===================================================================
--- cmpi-bindings/trunk/test/konkret/README (rev 0)
+++ cmpi-bindings/trunk/test/konkret/README 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,8 @@
+This directory contains test to reproduce an upcall hang in Pegasus. To
+try, install KonkretCMPI 0.8.7. Build this provider with "make". Use the
+.reg files to register with pegasus. Copy library into place. Then run the
+upcall provider as follows:
+
+ $ cimcli ei KC_Upcall
+
+This hangs in the _references() test.
Added: cmpi-bindings/trunk/test/konkret/Upcall.h
===================================================================
--- cmpi-bindings/trunk/test/konkret/Upcall.h (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Upcall.h 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,284 @@
+/*
+**==============================================================================
+**
+** CAUTION: This file generated by KonkretCMPI. Please do not edit.
+**
+**==============================================================================
+*/
+
+#ifndef _konkrete_Upcall_h
+#define _konkrete_Upcall_h
+
+#include <konkret/konkret.h>
+
+/*
+**==============================================================================
+**
+** struct UpcallRef
+**
+**==============================================================================
+*/
+
+/* classname=KC_Upcall */
+typedef struct _UpcallRef
+{
+ KBase __base;
+ /* KC_Upcall features */
+ const KString Id;
+}
+UpcallRef;
+
+static const unsigned char __UpcallRef_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x55,0x70,0x63,0x61,0x6c,0x6c,0x00,0x01,0x4c,0x02,0x49,
+ 0x64,0x00,
+};
+
+KINLINE void UpcallRef_Init(
+ UpcallRef* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __UpcallRef_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+}
+
+KINLINE CMPIStatus UpcallRef_InitFromInstance(
+ UpcallRef* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ UpcallRef_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus UpcallRef_InitFromObjectPath(
+ UpcallRef* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ UpcallRef_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void UpcallRef_Print(
+ const UpcallRef* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'r');
+}
+
+KINLINE CMPIInstance* UpcallRef_ToInstance(
+ const UpcallRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* UpcallRef_ToObjectPath(
+ const UpcallRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* UpcallRef_NameSpace(
+ UpcallRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void UpcallRef_SetString_Id(
+ UpcallRef* self,
+ CMPIString* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_SetString(field, x);
+ }
+}
+
+KINLINE void UpcallRef_Set_Id(
+ UpcallRef* self,
+ const char* s)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Set(field, self->__base.cb, s);
+ }
+}
+
+KINLINE void UpcallRef_Null_Id(
+ UpcallRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Null(field);
+ }
+}
+
+KINLINE void UpcallRef_Clr_Id(
+ UpcallRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Clr(field);
+ }
+}
+
+/*
+**==============================================================================
+**
+** struct Upcall
+**
+**==============================================================================
+*/
+
+/* classname=KC_Upcall */
+typedef struct _Upcall
+{
+ KBase __base;
+ /* KC_Upcall features */
+ const KString Id;
+}
+Upcall;
+
+static const unsigned char __Upcall_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x55,0x70,0x63,0x61,0x6c,0x6c,0x00,0x01,0x4c,0x02,0x49,
+ 0x64,0x00,
+};
+
+KINLINE void Upcall_Init(
+ Upcall* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __Upcall_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+}
+
+KINLINE CMPIStatus Upcall_InitFromInstance(
+ Upcall* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ Upcall_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus Upcall_InitFromObjectPath(
+ Upcall* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ Upcall_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void Upcall_Print(
+ const Upcall* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'i');
+}
+
+KINLINE CMPIInstance* Upcall_ToInstance(
+ const Upcall* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* Upcall_ToObjectPath(
+ const Upcall* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* Upcall_NameSpace(
+ Upcall* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void Upcall_SetString_Id(
+ Upcall* self,
+ CMPIString* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_SetString(field, x);
+ }
+}
+
+KINLINE void Upcall_Set_Id(
+ Upcall* self,
+ const char* s)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Set(field, self->__base.cb, s);
+ }
+}
+
+KINLINE void Upcall_Null_Id(
+ Upcall* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Null(field);
+ }
+}
+
+KINLINE void Upcall_Clr_Id(
+ Upcall* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Clr(field);
+ }
+}
+
+/*
+**==============================================================================
+**
+** Upcall methods
+**
+**==============================================================================
+*/
+
+KINLINE CMPIStatus Upcall_DispatchMethod(
+ const CMPIBroker* cb,
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* meth,
+ const CMPIArgs* in,
+ CMPIArgs* out)
+{
+ UpcallRef self;
+
+ KReturnIf(UpcallRef_InitFromObjectPath(&self, cb, cop));
+
+
+ KReturn(ERR_METHOD_NOT_FOUND);
+}
+
+#define Upcall_ClassName "KC_Upcall"
+
+#endif /* _konkrete_Upcall_h */
Added: cmpi-bindings/trunk/test/konkret/UpcallProvider.c
===================================================================
--- cmpi-bindings/trunk/test/konkret/UpcallProvider.c (rev 0)
+++ cmpi-bindings/trunk/test/konkret/UpcallProvider.c 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,301 @@
+#include <konkret/konkret.h>
+#include "Upcall.h"
+
+static const CMPIBroker* _cb = NULL;
+
+static void UpcallInitialize()
+{
+}
+
+static CMPIStatus UpcallCleanup(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus UpcallEnumInstanceNames(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ return KDefaultEnumerateInstanceNames(
+ _cb, mi, cc, cr, cop);
+}
+
+static CMPIStatus _associators(const CMPIContext* cc)
+{
+ CMPIObjectPath* op;
+ CMPIEnumeration* e;
+ CMPIStatus st;
+ size_t count = 0;
+
+ if (!(op = CMNewObjectPath(_cb, "root/cimv2", "KC_Widget", NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ st = CMAddKey(op, "Id", "1001", CMPI_chars);
+
+ if (st.rc)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ if (!(e = CBAssociators(_cb, cc, op, NULL, NULL, NULL, NULL, NULL, NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ while (CMHasNext(e, NULL))
+ {
+ CMPIData cd = CMGetNext(e, NULL);
+
+ if (cd.type != CMPI_instance)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ count++;
+ }
+
+ if (count == 0)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus _associatorNames(const CMPIContext* cc)
+{
+ CMPIObjectPath* op;
+ CMPIEnumeration* e;
+ CMPIStatus st;
+ size_t count = 0;
+
+ if (!(op = CMNewObjectPath(_cb, "root/cimv2", "KC_Widget", NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ st = CMAddKey(op, "Id", "1001", CMPI_chars);
+
+ if (st.rc)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ if (!(e = CBAssociatorNames(_cb, cc, op, NULL, NULL, NULL, NULL, NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ while (CMHasNext(e, NULL))
+ {
+ CMPIData cd = CMGetNext(e, NULL);
+
+ if (cd.type != CMPI_ref)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ count++;
+ }
+
+ if (count == 0)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus _references(const CMPIContext* cc)
+{
+ CMPIObjectPath* op;
+ CMPIEnumeration* e;
+ CMPIStatus st;
+ size_t count = 0;
+
+ if (!(op = CMNewObjectPath(_cb, "root/cimv2", "KC_Widget", NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ st = CMAddKey(op, "Id", "1001", CMPI_chars);
+
+ if (st.rc)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ if (!(e = CBReferences(_cb, cc, op, NULL, NULL, NULL, NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ while (CMHasNext(e, NULL))
+ {
+ CMPIData cd = CMGetNext(e, NULL);
+
+ if (cd.type != CMPI_instance)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ count++;
+ }
+
+ if (count == 0)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus _referenceNames(const CMPIContext* cc)
+{
+ CMPIObjectPath* op;
+ CMPIEnumeration* e;
+ CMPIStatus st;
+ size_t count = 0;
+
+ if (!(op = CMNewObjectPath(_cb, "root/cimv2", "KC_Widget", NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ st = CMAddKey(op, "Id", "1001", CMPI_chars);
+
+ if (st.rc)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ if (!(e = CBReferenceNames(_cb, cc, op, NULL, NULL, NULL)))
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ printf("BEFORE\n");
+
+ while (CMHasNext(e, NULL))
+ {
+ CMPIData cd = CMGetNext(e, NULL);
+
+ printf("INSIDE\n");
+
+ if (cd.type != CMPI_ref)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ count++;
+ }
+
+ printf("AFTER\n");
+
+ if (count == 0)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus UpcallEnumInstances(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ printf("UpcallEnumInstances\n");
+
+ KTRACE;
+
+ if (_associators(cc).rc != CMPI_RC_OK)
+ {
+ printf("UpcallEnumInstances: _associators() failed\n");
+ }
+
+ KTRACE;
+
+ if (_associatorNames(cc).rc != CMPI_RC_OK)
+ {
+ printf("UpcallEnumInstances: _associatorNames() failed\n");
+ }
+
+ KTRACE;
+
+ if (_references(cc).rc != CMPI_RC_OK)
+ {
+ printf("UpcallEnumInstances: _references() failed\n");
+ }
+
+ KTRACE;
+
+ if (_referenceNames(cc).rc != CMPI_RC_OK)
+ {
+ printf("UpcallEnumInstances: _referenceNames() failed\n");
+ }
+
+ KTRACE;
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus UpcallGetInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ return KDefaultGetInstance(
+ _cb, mi, cc, cr, cop, properties);
+}
+
+static CMPIStatus UpcallCreateInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const CMPIInstance* ci)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus UpcallModifyInstance(
+ 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 UpcallDeleteInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus UpcallExecQuery(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* lang,
+ const char* query)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+CMInstanceMIStub(
+ Upcall,
+ KC_Upcall,
+ _cb,
+ UpcallInitialize())
+
+static CMPIStatus UpcallMethodCleanup(
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus UpcallInvokeMethod(
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* meth,
+ const CMPIArgs* in,
+ CMPIArgs* out)
+{
+ return Upcall_DispatchMethod(
+ _cb, mi, cc, cr, cop, meth, in, out);
+}
+
+CMMethodMIStub(
+ Upcall,
+ KC_Upcall,
+ _cb,
+ UpcallInitialize())
+
+KONKRET_REGISTRATION(
+ "root/cimv2",
+ "KC_Upcall",
+ "KC_Upcall",
+ "instance method");
Added: cmpi-bindings/trunk/test/konkret/Widget.h
===================================================================
--- cmpi-bindings/trunk/test/konkret/Widget.h (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Widget.h 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,458 @@
+/*
+**==============================================================================
+**
+** CAUTION: This file generated by KonkretCMPI. Please do not edit.
+**
+**==============================================================================
+*/
+
+#ifndef _konkrete_Widget_h
+#define _konkrete_Widget_h
+
+#include <konkret/konkret.h>
+
+/*
+**==============================================================================
+**
+** struct WidgetRef
+**
+**==============================================================================
+*/
+
+/* classname=KC_Widget */
+typedef struct _WidgetRef
+{
+ KBase __base;
+ /* KC_Widget features */
+ const KString Id;
+}
+WidgetRef;
+
+static const unsigned char __WidgetRef_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x57,0x69,0x64,0x67,0x65,0x74,0x00,0x01,0x4c,0x02,0x49,
+ 0x64,0x00,
+};
+
+KINLINE void WidgetRef_Init(
+ WidgetRef* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __WidgetRef_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+}
+
+KINLINE CMPIStatus WidgetRef_InitFromInstance(
+ WidgetRef* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ WidgetRef_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus WidgetRef_InitFromObjectPath(
+ WidgetRef* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ WidgetRef_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void WidgetRef_Print(
+ const WidgetRef* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'r');
+}
+
+KINLINE CMPIInstance* WidgetRef_ToInstance(
+ const WidgetRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* WidgetRef_ToObjectPath(
+ const WidgetRef* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* WidgetRef_NameSpace(
+ WidgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void WidgetRef_SetString_Id(
+ WidgetRef* self,
+ CMPIString* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_SetString(field, x);
+ }
+}
+
+KINLINE void WidgetRef_Set_Id(
+ WidgetRef* self,
+ const char* s)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Set(field, self->__base.cb, s);
+ }
+}
+
+KINLINE void WidgetRef_Null_Id(
+ WidgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Null(field);
+ }
+}
+
+KINLINE void WidgetRef_Clr_Id(
+ WidgetRef* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Clr(field);
+ }
+}
+
+/*
+**==============================================================================
+**
+** struct Widget
+**
+**==============================================================================
+*/
+
+/* classname=KC_Widget */
+typedef struct _Widget
+{
+ KBase __base;
+ /* KC_Widget features */
+ const KString Id;
+ const KString Color;
+ const KUint32 Size;
+}
+Widget;
+
+static const unsigned char __Widget_sig[] =
+{
+ 0x09,0x4b,0x43,0x5f,0x57,0x69,0x64,0x67,0x65,0x74,0x00,0x03,0x4c,0x02,0x49,
+ 0x64,0x00,0x0c,0x05,0x43,0x6f,0x6c,0x6f,0x72,0x00,0x05,0x04,0x53,0x69,0x7a,
+ 0x65,0x00,
+};
+
+KINLINE void Widget_Init(
+ Widget* self,
+ const CMPIBroker* cb,
+ const char* ns)
+{
+ const unsigned char* sig = __Widget_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, ns);
+}
+
+KINLINE CMPIStatus Widget_InitFromInstance(
+ Widget* self,
+ const CMPIBroker* cb,
+ const CMPIInstance* x)
+{
+ Widget_Init(self, cb, NULL);
+ return KBase_FromInstance(&self->__base, x);
+}
+
+KINLINE CMPIStatus Widget_InitFromObjectPath(
+ Widget* self,
+ const CMPIBroker* cb,
+ const CMPIObjectPath* x)
+{
+ Widget_Init(self, cb, NULL);
+ return KBase_FromObjectPath(&self->__base, x);
+}
+
+KINLINE void Widget_Print(
+ const Widget* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'i');
+}
+
+KINLINE CMPIInstance* Widget_ToInstance(
+ const Widget* self,
+ CMPIStatus* status)
+{
+ return KBase_ToInstance(&self->__base, status);
+}
+
+KINLINE CMPIObjectPath* Widget_ToObjectPath(
+ const Widget* self,
+ CMPIStatus* status)
+{
+ return KBase_ToObjectPath(&self->__base, status);
+}
+
+KINLINE const char* Widget_NameSpace(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ return self->__base.ns ? KChars(self->__base.ns) : NULL;
+ return NULL;
+}
+
+KINLINE void Widget_SetString_Id(
+ Widget* self,
+ CMPIString* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_SetString(field, x);
+ }
+}
+
+KINLINE void Widget_Set_Id(
+ Widget* self,
+ const char* s)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Set(field, self->__base.cb, s);
+ }
+}
+
+KINLINE void Widget_Null_Id(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Null(field);
+ }
+}
+
+KINLINE void Widget_Clr_Id(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Id;
+ KString_Clr(field);
+ }
+}
+
+KINLINE void Widget_SetString_Color(
+ Widget* self,
+ CMPIString* x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Color;
+ KString_SetString(field, x);
+ }
+}
+
+KINLINE void Widget_Set_Color(
+ Widget* self,
+ const char* s)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Color;
+ KString_Set(field, self->__base.cb, s);
+ }
+}
+
+KINLINE void Widget_Null_Color(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Color;
+ KString_Null(field);
+ }
+}
+
+KINLINE void Widget_Clr_Color(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KString* field = (KString*)&self->Color;
+ KString_Clr(field);
+ }
+}
+
+KINLINE void Widget_Set_Size(
+ Widget* self,
+ CMPIUint32 x)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KUint32* field = (KUint32*)&self->Size;
+ KUint32_Set(field, x);
+ }
+}
+
+KINLINE void Widget_Null_Size(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KUint32* field = (KUint32*)&self->Size;
+ KUint32_Null(field);
+ }
+}
+
+KINLINE void Widget_Clr_Size(
+ Widget* self)
+{
+ if (self && self->__base.magic == KMAGIC)
+ {
+ KUint32* field = (KUint32*)&self->Size;
+ KUint32_Clr(field);
+ }
+}
+
+/* classname=KC_Widget */
+typedef struct _Widget_Add_Args
+{
+ KBase __base;
+ /* IN */
+ KUint32 X;
+ /* IN */
+ KUint32 Y;
+}
+Widget_Add_Args;
+
+static const unsigned char __Widget_Add_Args_sig[] =
+{
+ 0x03,0x41,0x64,0x64,0x00,0x02,0x25,0x01,0x58,0x00,0x25,0x01,0x59,0x00,
+};
+
+KINLINE void Widget_Add_Args_Init(
+ Widget_Add_Args* self,
+ const CMPIBroker* cb)
+{
+ const unsigned char* sig = __Widget_Add_Args_sig;
+ KBase_Init(&self->__base, cb, sizeof(*self), sig, NULL);
+}
+
+KINLINE CMPIStatus Widget_Add_Args_InitFromArgs(
+ Widget_Add_Args* self,
+ const CMPIBroker* cb,
+ const CMPIArgs* x,
+ CMPIBoolean in,
+ CMPIBoolean out)
+{
+ Widget_Add_Args_Init(self, cb);
+ return KBase_FromArgs(&self->__base, x, in, out);
+}
+
+KINLINE CMPIArgs* Widget_Add_Args_ToArgs(
+ const Widget_Add_Args* self,
+ CMPIBoolean in,
+ CMPIBoolean out,
+ CMPIStatus* status)
+{
+ return KBase_ToArgs(&self->__base, in, out, status);
+}
+
+KINLINE CMPIStatus Widget_Add_Args_SetArgs(
+ const Widget_Add_Args* self,
+ CMPIBoolean in,
+ CMPIBoolean out,
+ CMPIArgs* ca)
+{
+ return KBase_SetToArgs(&self->__base, in, out, ca);
+}
+
+KINLINE void Widget_Add_Args_Print(
+ const Widget_Add_Args* self,
+ FILE* os)
+{
+ KBase_Print(os, &self->__base, 'a');
+}
+
+/*
+**==============================================================================
+**
+** Widget methods
+**
+**==============================================================================
+*/
+
+KEXTERN KUint32 Widget_Add(
+ const CMPIBroker* cb,
+ CMPIMethodMI* mi,
+ const CMPIContext* context,
+ const KUint32* X,
+ const KUint32* Y,
+ CMPIStatus* status);
+
+KINLINE CMPIStatus Widget_DispatchMethod(
+ const CMPIBroker* cb,
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* meth,
+ const CMPIArgs* in,
+ CMPIArgs* out)
+{
+ WidgetRef self;
+
+ KReturnIf(WidgetRef_InitFromObjectPath(&self, cb, cop));
+
+ if (strcasecmp(meth, "Add") == 0)
+ {
+ CMPIStatus st = KSTATUS_INIT;
+ Widget_Add_Args args;
+ KUint32 r;
+
+ KReturnIf(Widget_Add_Args_InitFromArgs(
+ &args, cb, in, 1, 0));
+
+ r = Widget_Add(
+ cb,
+ mi,
+ cc,
+ &args.X,
+ &args.Y,
+ &st);
+
+ if (!KOkay(st))
+ return st;
+
+ if (!r.exists)
+ KReturn(ERR_FAILED);
+
+ KReturnIf(Widget_Add_Args_SetArgs(
+ &args, 0, 1, out));
+ KReturnUint32Data(cr, &r);
+ CMReturnDone(cr);
+
+ KReturn(OK);
+ }
+
+ KReturn(ERR_METHOD_NOT_FOUND);
+}
+
+#define Widget_ClassName "KC_Widget"
+
+#endif /* _konkrete_Widget_h */
Added: cmpi-bindings/trunk/test/konkret/Widget.mof
===================================================================
--- cmpi-bindings/trunk/test/konkret/Widget.mof (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Widget.mof 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,21 @@
+class KC_Widget
+{
+ [Key] String Id;
+ string Color;
+ uint32 Size;
+
+ [Static]
+ uint32 Add([In] uint32 X, [In] uint32 Y);
+};
+
+[Association]
+class KC_Gadget
+{
+ [Key] KC_Widget REF Left;
+ [Key] KC_Widget REF Right;
+};
+
+class KC_Upcall
+{
+ [Key] String Id;
+};
Added: cmpi-bindings/trunk/test/konkret/Widget.reg
===================================================================
--- cmpi-bindings/trunk/test/konkret/Widget.reg (rev 0)
+++ cmpi-bindings/trunk/test/konkret/Widget.reg 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,18 @@
+[KC_Widget]
+ provider: KC_Widget
+ location: WidgetProvider
+ type: instance method
+ namespace: root/cimv2
+#
+[KC_Gadget]
+ provider: KC_Gadget
+ location: WidgetProvider
+ type: instance association
+ namespace: root/cimv2
+#
+[KC_Upcall]
+ provider: KC_Upcall
+ location: WidgetProvider
+ type: instance method
+ namespace: root/cimv2
+#
Added: cmpi-bindings/trunk/test/konkret/WidgetProvider.c
===================================================================
--- cmpi-bindings/trunk/test/konkret/WidgetProvider.c (rev 0)
+++ cmpi-bindings/trunk/test/konkret/WidgetProvider.c 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,215 @@
+#include <konkret/konkret.h>
+#include "Widget.h"
+
+static const CMPIBroker* _broker = NULL;
+
+static void WidgetInitialize()
+{
+}
+
+static CMPIStatus WidgetCleanup(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus WidgetEnumInstanceNames(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ WidgetRef w;
+
+ /* Widget.Id="1001" */
+ WidgetRef_Init(&w, _broker, KNameSpace(cop));
+ WidgetRef_Set_Id(&w, "1001");
+ KReturnObjectPath(cr, w);
+
+ /* Widget.Id="1002" */
+ WidgetRef_Init(&w, _broker, KNameSpace(cop));
+ WidgetRef_Set_Id(&w, "1002");
+ KReturnObjectPath(cr, w);
+
+ /* Widget.Id=1003 */
+ WidgetRef_Init(&w, _broker, KNameSpace(cop));
+ WidgetRef_Set_Id(&w, "1003");
+ KReturnObjectPath(cr, w);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus WidgetEnumInstances(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ Widget w;
+
+ /* Widget.Id="1001" */
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1001");
+ Widget_Set_Color(&w, "Red");
+ Widget_Set_Size(&w, 1);
+ KReturnInstance(cr, w);
+
+ /* Widget.Id="1002" */
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1002");
+ Widget_Set_Color(&w, "Green");
+ Widget_Set_Size(&w, 2);
+ KReturnInstance(cr, w);
+
+ /* Widget.Id=1003 */
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1003");
+ Widget_Set_Color(&w, "Blue");
+ Widget_Set_Size(&w, 3);
+ KReturnInstance(cr, w);
+
+ CMReturn(CMPI_RC_OK);
+}
+
+CMPIStatus WidgetGetInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* result,
+ const CMPIObjectPath* cop,
+ const char** properties)
+{
+ WidgetRef wr;
+ Widget w;
+
+ WidgetRef_InitFromObjectPath(&wr, _broker, cop);
+
+ if (!wr.Id.exists || wr.Id.null)
+ CMReturn(CMPI_RC_ERR_FAILED);
+
+ if (strcmp(wr.Id.chars, "1001") == 0)
+ {
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1001");
+ Widget_Set_Color(&w, "Red");
+ Widget_Set_Size(&w, 1);
+ KReturnInstance(result, w);
+ CMReturn(CMPI_RC_OK);
+ }
+ else if (strcmp(wr.Id.chars, "1002") == 0)
+ {
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1002");
+ Widget_Set_Color(&w, "Green");
+ Widget_Set_Size(&w, 2);
+ KReturnInstance(result, w);
+ CMReturn(CMPI_RC_OK);
+ }
+ else if (strcmp(wr.Id.chars, "1003") == 0)
+ {
+ Widget_Init(&w, _broker, KNameSpace(cop));
+ Widget_Set_Id(&w, "1003");
+ Widget_Set_Color(&w, "Blue");
+ Widget_Set_Size(&w, 3);
+ KReturnInstance(result, w);
+ CMReturn(CMPI_RC_OK);
+ }
+
+ CMReturn(CMPI_RC_ERR_NOT_FOUND);
+}
+
+static CMPIStatus WidgetCreateInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const CMPIInstance* ci)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus WidgetModifyInstance(
+ 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 WidgetDeleteInstance(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+static CMPIStatus WidgetExecQuery(
+ CMPIInstanceMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* lang,
+ const char* query)
+{
+ CMReturn(CMPI_RC_ERR_NOT_SUPPORTED);
+}
+
+CMInstanceMIStub(
+ Widget,
+ KC_Widget,
+ _broker,
+ WidgetInitialize())
+
+static CMPIStatus WidgetMethodCleanup(
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ CMPIBoolean term)
+{
+ CMReturn(CMPI_RC_OK);
+}
+
+static CMPIStatus WidgetInvokeMethod(
+ CMPIMethodMI* mi,
+ const CMPIContext* cc,
+ const CMPIResult* cr,
+ const CMPIObjectPath* cop,
+ const char* meth,
+ const CMPIArgs* in,
+ CMPIArgs* out)
+{
+ return Widget_DispatchMethod(
+ _broker, mi, cc, cr, cop, meth, in, out);
+}
+
+CMMethodMIStub(
+ Widget,
+ KC_Widget,
+ _broker,
+ WidgetInitialize())
+
+KUint32 Widget_Add(
+ const CMPIBroker* cb,
+ CMPIMethodMI* mi,
+ const CMPIContext* context,
+ const KUint32* X,
+ const KUint32* Y,
+ CMPIStatus* status)
+{
+ KUint32 result = KUINT32_INIT;
+
+ KSetStatus(status, ERR_NOT_SUPPORTED);
+ return result;
+}
+
+KONKRET_REGISTRATION(
+ "root/cimv2",
+ "KC_Widget",
+ "KC_Widget",
+ "instance method");
Added: cmpi-bindings/trunk/test/konkret/register.mof
===================================================================
--- cmpi-bindings/trunk/test/konkret/register.mof (rev 0)
+++ cmpi-bindings/trunk/test/konkret/register.mof 2008-10-23 00:50:26 UTC (rev 1121)
@@ -0,0 +1,96 @@
+/*
+**==============================================================================
+**
+** Widget Module
+**
+**==============================================================================
+*/
+
+instance of PG_ProviderModule
+{
+ Name = "KC_WidgetModule";
+ Vendor = "Pegasus";
+ Version = "2.0.0";
+ InterfaceType = "CMPI";
+ InterfaceVersion = "2.0.0";
+ Location = "WidgetProvider";
+};
+
+/*
+**==============================================================================
+**
+** Widget Provider
+**
+**==============================================================================
+*/
+
+instance of PG_Provider
+{
+ Name = "KC_Widget";
+ ProviderModuleName = "KC_WidgetModule";
+};
+
+instance of PG_ProviderCapabilities
+{
+ CapabilityID = "KC_Widget";
+ ProviderModuleName = "KC_WidgetModule";
+ ProviderName = "KC_Widget";
+ ClassName = "KC_Widget";
+ Namespaces = {"root/cimv2"};
+ ProviderType = { 2 /*instance*/, 5 /*method*/ };
+ supportedProperties = NULL;
+ supportedMethods = NULL;
+};
+
+/*
+**==============================================================================
+**
+** Gadget Provider
+**
+**==============================================================================
+*/
+
+instance of PG_Provider
+{
+ Name = "KC_Gadget";
+ ProviderModuleName = "KC_WidgetModule";
+};
+
+instance of PG_ProviderCapabilities
+{
+ CapabilityID = "KC_Gadget";
+ ProviderModuleName = "KC_WidgetModule";
+ ProviderName = "KC_Gadget";
+ ClassName = "KC_Gadget";
+ Namespaces = {"root/cimv2"};
+ ProviderType = { 2 /*instance*/, 3, /*association*/ 5 /*method*/ };
+ supportedProperties = NULL;
+ supportedMethods = NULL;
+};
+
+/*
+**==============================================================================
+**
+** Upcall Provider
+**
+**==============================================================================
+*/
+
+instance of PG_Provider
+{
+ Name = "KC_Upcall";
+ ProviderModuleName = "KC_WidgetModule";
+};
+
+instance of PG_ProviderCapabilities
+{
+ CapabilityID = "KC_Upcall";
+ ProviderModuleName = "KC_WidgetModule";
+ ProviderName = "KC_Upcall";
+ ClassName = "KC_Upcall";
+ Namespaces = {"root/cimv2"};
+ ProviderType = { 2 /*instance*/, 5 /*method*/ };
+ supportedProperties = NULL;
+ supportedMethods = NULL;
+};
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-21 23:29:54
|
Revision: 1120
http://omc.svn.sourceforge.net/omc/?rev=1120&view=rev
Author: bartw
Date: 2008-10-21 23:29:48 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
allow some instances to be created without a namespace, if the broker allows this. This is a workaround for sblim-sfcb bug 2185410
Modified Paths:
--------------
cmpi-bindings/trunk/swig/cmpi_callbacks.i
cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
Modified: cmpi-bindings/trunk/swig/cmpi_callbacks.i
===================================================================
--- cmpi-bindings/trunk/swig/cmpi_callbacks.i 2008-10-21 23:04:10 UTC (rev 1119)
+++ cmpi-bindings/trunk/swig/cmpi_callbacks.i 2008-10-21 23:29:48 UTC (rev 1120)
@@ -250,7 +250,7 @@
return result;
}
- CMPIInstance* new_instance(const CMPIObjectPath* path)
+ CMPIInstance* new_instance(const CMPIObjectPath* path, int allow_null_ns)
{
CMPIStatus st = { CMPI_RC_OK, NULL };
CMPIInstance* result;
@@ -259,13 +259,16 @@
/* Raise exception if no namespace */
- if (!(ns = CMGetNameSpace(path, &st)) || st.rc ||
- !(str = CMGetCharsPtr(ns, NULL)) || *str == '\0')
+ if (!allow_null_ns)
{
- CMSetStatusWithChars($self, &st, CMPI_RC_ERR_FAILED,
- "object path has no namespace");
- _raise_ex(&st);
- return NULL;
+ if (!(ns = CMGetNameSpace(path, &st)) || st.rc ||
+ !(str = CMGetCharsPtr(ns, NULL)) || *str == '\0')
+ {
+ CMSetStatusWithChars($self, &st, CMPI_RC_ERR_FAILED,
+ "object path has no namespace");
+ _raise_ex(&st);
+ return NULL;
+ }
}
result = CMNewInstance($self, path, &st);
Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py
===================================================================
--- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-21 23:04:10 UTC (rev 1119)
+++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-10-21 23:29:48 UTC (rev 1120)
@@ -346,8 +346,17 @@
return self.broker.modifyInstance(self.ctx, cop, inst)
def DeliverIndication(self, ns, instance):
- inst = self.proxy.pywbem2cmpi_inst(instance)
- return self.broker.deliverIndication(self.ctx, ns, inst)
+ if self.broker.name() == 'Pegasus':
+ allow_null_ns = False
+ else:
+ allow_null_ns = True
+ if self.broker.name() == 'RequestHandler':
+ # Check sblim bug #2185410.
+ if instance.path is not None:
+ instance.path.namespace = None
+ inst = self.proxy.pywbem2cmpi_inst(instance, allow_null_ns)
+ rv = self.broker.deliverIndication(self.ctx, ns, inst)
+ return rv
def is_subclass(self, ns, super, sub):
subObjPath=self.broker.new_object_path(ns, sub)
@@ -696,12 +705,17 @@
return cargs
- def pywbem2cmpi_inst(self, pinst):
+ def pywbem2cmpi_inst(self, pinst, allow_null_ns=False):
pcop = pinst.path
- if pcop is None:
- pcop = pywbem.CIMInstanceName(pinst.classname)
+ if not allow_null_ns:
+ if pcop is None or pcop.namespace is None:
+ raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_NAMESPACE,
+ "Instance must have a namespace")
+ else:
+ if pcop is None:
+ pcop = pywbem.CIMInstanceName(pinst.classname)
cop = self.pywbem2cmpi_instname(pcop)
- cinst = self.broker.new_instance(cop)
+ cinst = self.broker.new_instance(cop, allow_null_ns)
if pinst.property_list is not None:
cinst.set_property_filter(pinst.property_list)
for prop in pinst.properties.values():
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-21 23:04:17
|
Revision: 1119
http://omc.svn.sourceforge.net/omc/?rev=1119&view=rev
Author: bartw
Date: 2008-10-21 23:04:10 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
minor change
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
Modified: cmpi-bindings/trunk/test/python/UpcallAtomProvider.py
===================================================================
--- cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-21 23:03:37 UTC (rev 1118)
+++ cmpi-bindings/trunk/test/python/UpcallAtomProvider.py 2008-10-21 23:04:10 UTC (rev 1119)
@@ -824,8 +824,7 @@
cur_ind_count = 0
try:
-
- alert_ind = pywbem.CIMInstance("UpcallAtom_Indication",
+ alert_ind = pywbem.CIMInstance('UpcallAtom_Indication',
path=pywbem.CIMInstanceName('UpcallAtom_Indication',
namespace=object_name.namespace))
alert_ind['AlertType'] = pywbem.Uint16(2)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ba...@us...> - 2008-10-21 23:03:44
|
Revision: 1118
http://omc.svn.sourceforge.net/omc/?rev=1118&view=rev
Author: bartw
Date: 2008-10-21 23:03:37 +0000 (Tue, 21 Oct 2008)
Log Message:
-----------
delete stale subscriptions before starting the test
Modified Paths:
--------------
cmpi-bindings/trunk/test/python/TestIndications.py
Modified: cmpi-bindings/trunk/test/python/TestIndications.py
===================================================================
--- cmpi-bindings/trunk/test/python/TestIndications.py 2008-10-21 20:09:08 UTC (rev 1117)
+++ cmpi-bindings/trunk/test/python/TestIndications.py 2008-10-21 23:03:37 UTC (rev 1118)
@@ -75,6 +75,26 @@
filtercop = ch.CreateInstance(filterinst)
return filtercop
+def deleteAllSubs(ch, destination='http://localhost:%s' % _port,
+ ns=_interop_ns):
+ subs = ch.EnumerateInstanceNames('CIM_IndicationSubscription',
+ namespace=ns)
+ num = 0
+ for sub in subs:
+ handler_name = sub['Handler']
+ try:
+ handler = ch.GetInstance(handler_name, PropertyList=['Destination'])
+ except pywbem.CIMError, args:
+ print "** Error fetching handler instance: %s %s" % \
+ (handler_name, args)
+ continue
+ if handler['Destination'] == destination:
+ deleteSubscription(ch, sub)
+ num+= 1
+ if num > 0:
+ print '** deleted %d subscriptions' % num
+
+
def createDest( ch, destination='http://localhost:%s' % _port,
ns=_interop_ns,
in_name=None):
@@ -173,6 +193,8 @@
cl = CIMListener(callback=cb, http_port=5309)
+ deleteAllSubs(conn, ns=_interop_ns)
+
def threadfunc():
try:
time.sleep(1)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|