You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(26) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(5) |
Feb
(16) |
Mar
(5) |
Apr
(5) |
May
(13) |
Jun
(12) |
Jul
(1) |
Aug
(2) |
Sep
(13) |
Oct
(6) |
Nov
(1) |
Dec
(29) |
2008 |
Jan
(2) |
Feb
(2) |
Mar
(2) |
Apr
(57) |
May
(35) |
Jun
(45) |
Jul
(132) |
Aug
(87) |
Sep
(141) |
Oct
(86) |
Nov
(17) |
Dec
(2) |
2009 |
Jan
(3) |
Feb
(2) |
Mar
(3) |
Apr
(3) |
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <kk...@us...> - 2010-08-02 09:06:15
|
Revision: 1178 http://omc.svn.sourceforge.net/omc/?rev=1178&view=rev Author: kkaempf Date: 2010-08-02 09:06:09 +0000 (Mon, 02 Aug 2010) Log Message: ----------- **** moved to http://github.com/kkaempf/cmpi-bindings **** Modified Paths: -------------- cmpi-bindings/trunk/README Modified: cmpi-bindings/trunk/README =================================================================== --- cmpi-bindings/trunk/README 2010-01-13 09:34:36 UTC (rev 1177) +++ cmpi-bindings/trunk/README 2010-08-02 09:06:09 UTC (rev 1178) @@ -1,3 +1,7 @@ +**** moved to http://github.com/kkaempf/cmpi-bindings **** + + + Swig based CMPI bindings ------------------------ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2010-01-13 09:34:45
|
Revision: 1177 http://omc.svn.sourceforge.net/omc/?rev=1177&view=rev Author: kkaempf Date: 2010-01-13 09:34:36 +0000 (Wed, 13 Jan 2010) Log Message: ----------- include %dir for provider directory 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 2010-01-13 09:26:30 UTC (rev 1176) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2010-01-13 09:34:36 UTC (rev 1177) @@ -112,6 +112,7 @@ %files -n cmpi-bindings-ruby %defattr(-,root,root,-) +%dir %{_libdir}/cmpi %{_libdir}/cmpi/librbCmpiProvider.so %{ruby_sitelib}/cmpi_rbwbem_bindings.rb @@ -130,6 +131,7 @@ %files -n cmpi-bindings-pywbem %defattr(-,root,root,-) +%dir %{_libdir}/cmpi %{_libdir}/cmpi/libpyCmpiProvider.so %{python_sitelib}/cmpi_pywbem_bindings.py %{python_sitelib}/cmpi_pywbem_bindings.pyc @@ -148,6 +150,7 @@ %files -n cmpi-bindings-perl %defattr(-,root,root,-) +%dir %{_libdir}/cmpi %{_libdir}/cmpi/libplCmpiProvider.so %{perl_vendorlib}/cmpi_plwbem_bindings.pl %{perl_vendorlib}/cmpi.pm This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2010-01-13 09:26:36
|
Revision: 1176 http://omc.svn.sourceforge.net/omc/?rev=1176&view=rev Author: kkaempf Date: 2010-01-13 09:26:30 +0000 (Wed, 13 Jan 2010) Log Message: ----------- fix build for Fedora and RHEL Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.changes cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.changes =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.changes 2009-11-04 17:25:48 UTC (rev 1175) +++ cmpi-bindings/trunk/package/cmpi-bindings.changes 2010-01-13 09:26:30 UTC (rev 1176) @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Wed Jan 13 10:25:15 CET 2010 - kk...@su... + +- Fix build for Fedora and RHEL + +------------------------------------------------------------------- Sun Aug 9 08:45:29 CEST 2009 - co...@no... - use new python macros Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2009-11-04 17:25:48 UTC (rev 1175) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2010-01-13 09:26:30 UTC (rev 1176) @@ -24,9 +24,44 @@ Summary: Adapter to write and run CMPI-type CIM providers Group: Development/Libraries/Other BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: cmake gcc-c++ + # We need swig threads support. -BuildRequires: cmake gcc-c++ python-devel ruby-devel swig >= 1.3.34 perl -BuildRequires: sblim-sfcb +BuildRequires: swig >= 1.3.34 + +BuildRequires: sblim-cmpi-devel + +BuildRequires: python-devel perl + +%if 0%{?rhel_version} > 0 +BuildRequires: -vim +%endif + +%if 0%{?fedora} + 0%{?rhel_version} > 0 +BuildRequires: curl-devel pkgconfig ruby ruby-devel +%if 0%{?fedora} > 0 +BuildRequires: perl-devel +%endif +%endif + +%if 0%{?suse_version} > 0 + +BuildRequires: libcurl-devel +%if 0%{?suse_version} > 1020 +BuildRequires: fdupes +%endif + +# SLE9 +%if 0%{?suse_version} < 920 +BuildRequires: pkgconfig ruby +%else +BuildRequires: ruby-devel +BuildRequires: pkg-config +%endif + +%endif + + Source: %{name}-%{version}.tar.bz2 Prefix: /usr @@ -34,7 +69,7 @@ - %prep -%setup -q +%setup -q %build mkdir build @@ -61,6 +96,16 @@ Group: Development/Languages/Ruby # 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} + 0%{?rhel_version} > 0 +Requires: ruby(abi) = 1.8 +%endif +%if 0%{?suse_version} > 1110 +Requires: ruby(abi) = 1.8 +%endif +%if 0%{?ruby_sitelib} == 0 +%{!?ruby_sitelib: %global ruby_sitelib %(ruby -r rbconfig -e 'vd = Config::CONFIG["vendorlibdir"]; print(vd ? vd : Config::CONFIG["sitelibdir"])')} +%{!?ruby_sitearch: %global ruby_sitearch %(ruby -r rbconfig -e 'vad = Config::CONFIG["vendorarchdir"]; print(vad ? vad : Config::CONFIG["sitearchdir"])')} +%endif %description -n cmpi-bindings-ruby - @@ -68,23 +113,16 @@ %files -n cmpi-bindings-ruby %defattr(-,root,root,-) %{_libdir}/cmpi/librbCmpiProvider.so -%if 0%{?sles_version} == 10 -%{_libdir}/ruby/site_ruby/%{rb_ver}/cmpi_rbwbem_bindings.rb -%else -%{_libdir}/ruby/vendor_ruby/%{rb_ver}/cmpi_rbwbem_bindings.rb -%endif +%{ruby_sitelib}/cmpi_rbwbem_bindings.rb %package -n cmpi-bindings-pywbem Summary: Adapter to write and run CMPI-type CIM providers in Python 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} -%{!?python_sitelib: %define py_sitedir %(%__python -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} +%{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} +%{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")} %{!?py_requires: %define py_requires Requires: python} -%endif %{py_requires} %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...> - 2009-11-04 17:26:04
|
Revision: 1175 http://omc.svn.sourceforge.net/omc/?rev=1175&view=rev Author: bartw Date: 2009-11-04 17:25:48 +0000 (Wed, 04 Nov 2009) Log Message: ----------- fixed References up-calls 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 2009-08-10 07:32:20 UTC (rev 1174) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2009-11-04 17:25:48 UTC (rev 1175) @@ -289,8 +289,8 @@ while e and e.hasNext(): data = e.next() assert(data.type == cmpi.CMPI_instance) - piname=self.proxy.cmpi2pywbem_inst(data.value.ref) - yield piname + pinst=self.proxy.cmpi2pywbem_inst(data.value.inst) + yield pinst def ReferenceNames(self, path, resultClass=None, role=None): cop = self.proxy.pywbem2cmpi_instname(path) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2009-08-10 07:32:34
|
Revision: 1174 http://omc.svn.sourceforge.net/omc/?rev=1174&view=rev Author: kkaempf Date: 2009-08-10 07:32:20 +0000 (Mon, 10 Aug 2009) Log Message: ----------- use new python macros Modified Paths: -------------- cmpi-bindings/trunk/package/cmpi-bindings.changes cmpi-bindings/trunk/package/cmpi-bindings.spec.in Modified: cmpi-bindings/trunk/package/cmpi-bindings.changes =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.changes 2009-05-05 14:56:53 UTC (rev 1173) +++ cmpi-bindings/trunk/package/cmpi-bindings.changes 2009-08-10 07:32:20 UTC (rev 1174) @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Sun Aug 9 08:45:29 CEST 2009 - co...@no... + +- use new python macros + +------------------------------------------------------------------- Thu Oct 23 13:53:28 MDT 2008 - np...@no... - Update to latest code, prep for release for python bindings Modified: cmpi-bindings/trunk/package/cmpi-bindings.spec.in =================================================================== --- cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2009-05-05 14:56:53 UTC (rev 1173) +++ cmpi-bindings/trunk/package/cmpi-bindings.spec.in 2009-08-10 07:32:20 UTC (rev 1174) @@ -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; print get_python_lib(1)")} +%{!?python_sitelib: %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} @@ -93,10 +93,10 @@ %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 +%{python_sitelib}/cmpi_pywbem_bindings.py +%{python_sitelib}/cmpi_pywbem_bindings.pyc +%{python_sitelib}/cmpi.py +%{python_sitelib}/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: <jb...@us...> - 2009-05-05 14:57:57
|
Revision: 1173 http://omc.svn.sourceforge.net/omc/?rev=1173&view=rev Author: jbgill Date: 2009-05-05 14:56:53 +0000 (Tue, 05 May 2009) Log Message: ----------- added PXE boot option to provider and db schema to support vm-install's new --pxe-boot flag. Modified Paths: -------------- contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c Added Paths: ----------- contrib/xen-vm-builder/trunk/pxeboot.patch Modified: contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof =================================================================== --- contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof 2009-04-02 22:29:05 UTC (rev 1172) +++ contrib/xen-vm-builder/trunk/mof/XEN_VMBuilderVirtualSystemCreationData.mof 2009-05-05 14:56:53 UTC (rev 1173) @@ -157,5 +157,11 @@ Values{"Destroy", "Restart", "Preserve", "Rename-Restart", "Coredump-Destroy", "Coredump-Restart"}] uint16 OnCrash; + + [Description("Tells whether or not the VM should PXE boot. " + "Applies only to fully-virtualized (HVM) VMs."), + ValueMap{"0", "1"}, + Values{"No PXE Boot", "PXE Boot"}] + uint8 PXEBoot; }; Added: contrib/xen-vm-builder/trunk/pxeboot.patch =================================================================== --- contrib/xen-vm-builder/trunk/pxeboot.patch (rev 0) +++ contrib/xen-vm-builder/trunk/pxeboot.patch 2009-05-05 14:56:53 UTC (rev 1173) @@ -0,0 +1,172 @@ +Index: mof/XEN_VMBuilderVirtualSystemCreationData.mof +=================================================================== +--- mof/XEN_VMBuilderVirtualSystemCreationData.mof (revision 1172) ++++ mof/XEN_VMBuilderVirtualSystemCreationData.mof (working copy) +@@ -157,5 +157,11 @@ + Values{"Destroy", "Restart", "Preserve", "Rename-Restart", + "Coredump-Destroy", "Coredump-Restart"}] + uint16 OnCrash; ++ ++ [Description("Tells whether or not the VM should PXE boot. " ++ "Applies only to fully-virtualized (HVM) VMs."), ++ ValueMap{"0", "1"}, ++ Values{"No PXE Boot", "PXE Boot"}] ++ uint8 PXEBoot; + }; + +Index: src/providers/vm-builder/vmcreation-data.c +=================================================================== +--- src/providers/vm-builder/vmcreation-data.c (revision 1172) ++++ src/providers/vm-builder/vmcreation-data.c (working copy) +@@ -102,7 +102,8 @@ + "VirtualSystemType," \ + "OnPowerOff," \ + "OnReboot," \ +- "OnCrash" ++ "OnCrash," \ ++ "PXEBoot" + + const char* all_cd_fields_query_with_where = "SELECT "CSV_FIELDS" FROM CreationData " + "WHERE InstanceID=%Q;"; +@@ -151,7 +152,8 @@ + CDF_VirtualSystemType, + CDF_OnPowerOff, + CDF_OnReboot, +- CDF_OnCrash ++ CDF_OnCrash, ++ CDF_PXEBoot + }; + + /* +@@ -282,6 +284,21 @@ + + /*****************************************************************************/ + static CMPIrc ++valid_pxe_boot(const CMPIData *pdata, CMPIStatus* pstatus) ++{ ++ CMSetStatus(pstatus, CMPI_RC_OK); ++ if (!CMIsNullValue((*pdata))) { ++ if (pdata->value.uint8 > 1) { ++ CMSetStatusWithChars(_broker, pstatus, ++ CMPI_RC_ERR_INVALID_PARAMETER, ++ "Invalid 'PXEBoot' property"); ++ } ++ } ++ return pstatus->rc; ++} ++ ++/*****************************************************************************/ ++static CMPIrc + valid_automatic_recovery_action(const CMPIData *pdata, CMPIStatus* pstatus) + { + CMSetStatus(pstatus, CMPI_RC_OK); +@@ -328,17 +345,25 @@ + /*****************************************************************************/ + static int + add_u8_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, +- const char* prop_name) ++ const char* prop_name, int endstmt) + { + int cc = 0; + CMPIData data = CMGetProperty(instance, prop_name, NULL); + if (!CMIsNullValue(data)) { + char wkbfr[32]; +- snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8); ++ if (endstmt) { ++ snprintf(wkbfr, sizeof(wkbfr), "%u", data.value.uint8); ++ } else { ++ snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8); ++ } + cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0); + cc = 1; + } else { +- cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); ++ if (endstmt) { ++ cmpiutilStrBuf_cat(pstrbuf, "NULL", 0); ++ } else { ++ cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); ++ } + } + return cc; + } +@@ -523,6 +548,7 @@ + set_u16_prop(dbctx, CDF_OnPowerOff, instance, "OnPowerOff"); + set_u16_prop(dbctx, CDF_OnReboot, instance, "OnReboot"); + set_u16_prop(dbctx, CDF_OnCrash, instance, "OnCrash"); ++ set_u8_prop(dbctx, CDF_PXEBoot, instance, "PXEBoot"); + } + + /****************************************************************************** +@@ -1044,6 +1070,12 @@ + return status; + } + } ++ if (mod_add_u8_prop(pstra, modified_instance, "PXEBoot", properties)) { ++ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) { ++ cmpiutilStrArray_destroy(pstra); ++ return status; ++ } ++ } + pstrbuf = cmpiutilStrBuf_create(); + if (!pstrbuf) { + CMSetStatusWithChars(_broker, &status, CMPI_RC_ERROR_SYSTEM, +@@ -1221,7 +1253,7 @@ + add_u32_prop_to_query(pstrbuf, newinstance, "Memory", NULL); + add_stra_prop_to_query(pstrbuf, newinstance, "Nics"); + add_stra_prop_to_query(pstrbuf, newinstance, "Notes"); +- add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs"); ++ add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs", 0); + if (add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data)) { + if (valid_os_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); +@@ -1256,12 +1288,19 @@ + return status; + } + } +- if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1)) { ++ if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 0)) { + if (valid_on_crash(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } + } ++ if (add_u8_prop_to_query(pstrbuf, newinstance, "PXEBoot", 1)) { ++ if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) { ++ cmpiutilStrBuf_destroy(pstrbuf); ++ return status; ++ } ++ } ++ + cmpiutilStrBuf_cat(pstrbuf, ");", 0); + + DEBUGOUT("SQL: %s\n", pstrbuf->bfr); +Index: src/providers/vm-builder/builder-service.c +=================================================================== +--- src/providers/vm-builder/builder-service.c (revision 1172) ++++ src/providers/vm-builder/builder-service.c (working copy) +@@ -894,6 +894,11 @@ + return NULL; + } + ++ /**** PXEBoot ****/ ++ data = CMGetProperty(cdci, "PXEBoot", NULL); ++ if (!CMIsNullValue(data) && data.value.uint8 == 1) ++ cmpiutilStrArray_append(pstra, "--pxe-boot"); ++ + /**** OnPowerOff ****/ + data = CMGetProperty(cdci, "OnPowerOff", NULL); + if (!CMIsNullValue(data)) { +Index: src/providers/vm-builder/vmbuilder-db.c +=================================================================== +--- src/providers/vm-builder/vmbuilder-db.c (revision 1172) ++++ src/providers/vm-builder/vmbuilder-db.c (working copy) +@@ -103,6 +103,9 @@ + //-- 4: Coredump-Destroy + //-- 5: Coredump-Restart + "OnCrash INTEGER," ++ //-- 0: No PXE Boot ++ //-- 1: PXE Boot ++ "PXEBoot INTEGER," + "PRIMARY KEY(InstanceID COLLATE NOCASE));" + "CREATE TABLE Job(" + "JobName TEXT NOT NULL," Modified: contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec =================================================================== --- contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-04-02 22:29:05 UTC (rev 1172) +++ contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-05-05 14:56:53 UTC (rev 1173) @@ -34,8 +34,8 @@ %if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11 Patch0: suse11_ostypes.patch %endif +Patch1: pxeboot.patch - %description Linux CIM providers for CMPI instrumentation of XEN virtual machine creation. @@ -52,6 +52,7 @@ %if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11 %patch0 -p0 %endif +%patch1 -p0 %build # If the LD_RUN_PATH environment variable is set at link time, @@ -100,6 +101,7 @@ sfcbstage -n root/cimv2 -r %{REGISTRATION} %{SCHEMA} sfcbrepos -f /etc/init.d/sfcb condrestart +%{__rm} -f /var/opt/xen-vm-builder/db/vmbuilder.db %preun # If removing (not upgrading) then de-register, before the files are gone Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c =================================================================== --- contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2009-04-02 22:29:05 UTC (rev 1172) +++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/builder-service.c 2009-05-05 14:56:53 UTC (rev 1173) @@ -894,6 +894,11 @@ return NULL; } + /**** PXEBoot ****/ + data = CMGetProperty(cdci, "PXEBoot", NULL); + if (!CMIsNullValue(data) && data.value.uint8 == 1) + cmpiutilStrArray_append(pstra, "--pxe-boot"); + /**** OnPowerOff ****/ data = CMGetProperty(cdci, "OnPowerOff", NULL); if (!CMIsNullValue(data)) { Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c =================================================================== --- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c 2009-04-02 22:29:05 UTC (rev 1172) +++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmbuilder-db.c 2009-05-05 14:56:53 UTC (rev 1173) @@ -103,6 +103,9 @@ //-- 4: Coredump-Destroy //-- 5: Coredump-Restart "OnCrash INTEGER," + //-- 0: No PXE Boot + //-- 1: PXE Boot + "PXEBoot INTEGER," "PRIMARY KEY(InstanceID COLLATE NOCASE));" "CREATE TABLE Job(" "JobName TEXT NOT NULL," Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c =================================================================== --- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2009-04-02 22:29:05 UTC (rev 1172) +++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2009-05-05 14:56:53 UTC (rev 1173) @@ -102,7 +102,8 @@ "VirtualSystemType," \ "OnPowerOff," \ "OnReboot," \ - "OnCrash" + "OnCrash," \ + "PXEBoot" const char* all_cd_fields_query_with_where = "SELECT "CSV_FIELDS" FROM CreationData " "WHERE InstanceID=%Q;"; @@ -151,7 +152,8 @@ CDF_VirtualSystemType, CDF_OnPowerOff, CDF_OnReboot, - CDF_OnCrash + CDF_OnCrash, + CDF_PXEBoot }; /* @@ -282,6 +284,21 @@ /*****************************************************************************/ static CMPIrc +valid_pxe_boot(const CMPIData *pdata, CMPIStatus* pstatus) +{ + CMSetStatus(pstatus, CMPI_RC_OK); + if (!CMIsNullValue((*pdata))) { + if (pdata->value.uint8 > 1) { + CMSetStatusWithChars(_broker, pstatus, + CMPI_RC_ERR_INVALID_PARAMETER, + "Invalid 'PXEBoot' property"); + } + } + return pstatus->rc; +} + +/*****************************************************************************/ +static CMPIrc valid_automatic_recovery_action(const CMPIData *pdata, CMPIStatus* pstatus) { CMSetStatus(pstatus, CMPI_RC_OK); @@ -328,17 +345,25 @@ /*****************************************************************************/ static int add_u8_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, - const char* prop_name) + const char* prop_name, int endstmt) { int cc = 0; CMPIData data = CMGetProperty(instance, prop_name, NULL); if (!CMIsNullValue(data)) { char wkbfr[32]; - snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8); + if (endstmt) { + snprintf(wkbfr, sizeof(wkbfr), "%u", data.value.uint8); + } else { + snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8); + } cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0); cc = 1; } else { - cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); + if (endstmt) { + cmpiutilStrBuf_cat(pstrbuf, "NULL", 0); + } else { + cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); + } } return cc; } @@ -523,6 +548,7 @@ set_u16_prop(dbctx, CDF_OnPowerOff, instance, "OnPowerOff"); set_u16_prop(dbctx, CDF_OnReboot, instance, "OnReboot"); set_u16_prop(dbctx, CDF_OnCrash, instance, "OnCrash"); + set_u8_prop(dbctx, CDF_PXEBoot, instance, "PXEBoot"); } /****************************************************************************** @@ -1044,6 +1070,12 @@ return status; } } + if (mod_add_u8_prop(pstra, modified_instance, "PXEBoot", properties)) { + if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } + } pstrbuf = cmpiutilStrBuf_create(); if (!pstrbuf) { CMSetStatusWithChars(_broker, &status, CMPI_RC_ERROR_SYSTEM, @@ -1221,7 +1253,7 @@ add_u32_prop_to_query(pstrbuf, newinstance, "Memory", NULL); add_stra_prop_to_query(pstrbuf, newinstance, "Nics"); add_stra_prop_to_query(pstrbuf, newinstance, "Notes"); - add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs"); + add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs", 0); if (add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data)) { if (valid_os_type(&data, &status) != CMPI_RC_OK) { cmpiutilStrBuf_destroy(pstrbuf); @@ -1256,12 +1288,19 @@ return status; } } - if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1)) { + if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 0)) { if (valid_on_crash(&data, &status) != CMPI_RC_OK) { cmpiutilStrBuf_destroy(pstrbuf); return status; } } + if (add_u8_prop_to_query(pstrbuf, newinstance, "PXEBoot", 1)) { + if (valid_pxe_boot(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } + } + cmpiutilStrBuf_cat(pstrbuf, ");", 0); DEBUGOUT("SQL: %s\n", pstrbuf->bfr); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mgf...@us...> - 2009-04-02 22:29:08
|
Revision: 1172 http://omc.svn.sourceforge.net/omc/?rev=1172&view=rev Author: mgfritch Date: 2009-04-02 22:29:05 +0000 (Thu, 02 Apr 2009) Log Message: ----------- - Fixup incomplete suse11_ostypes.patch Modified Paths: -------------- contrib/xen-vm-builder/trunk/suse11_ostypes.patch Modified: contrib/xen-vm-builder/trunk/suse11_ostypes.patch =================================================================== --- contrib/xen-vm-builder/trunk/suse11_ostypes.patch 2009-04-02 18:37:19 UTC (rev 1171) +++ contrib/xen-vm-builder/trunk/suse11_ostypes.patch 2009-04-02 22:29:05 UTC (rev 1172) @@ -1,6 +1,6 @@ Index: mof/XEN_VMBuilderVirtualSystemCreationData.mof =================================================================== ---- mof/XEN_VMBuilderVirtualSystemCreationData.mof (revision 1169) +--- mof/XEN_VMBuilderVirtualSystemCreationData.mof (revision 1171) +++ mof/XEN_VMBuilderVirtualSystemCreationData.mof (working copy) @@ -110,13 +110,13 @@ " provides bootstrap capability. "), @@ -18,9 +18,22 @@ uint32 OSType; [Description("Behaviour of a domain when it is powered off. " +Index: src/providers/vm-builder/vmcreation-data.c +=================================================================== +--- src/providers/vm-builder/vmcreation-data.c (revision 1171) ++++ src/providers/vm-builder/vmcreation-data.c (working copy) +@@ -181,7 +181,7 @@ + { + CMSetStatus(pstatus, CMPI_RC_OK); + if (!CMIsNullValue((*pdata))) { +- if (pdata->value.uint32 > 24) { ++ if (pdata->value.uint32 > 28) { + CMSetStatusWithChars(_broker, pstatus, + CMPI_RC_ERR_INVALID_PARAMETER, + "Invalid 'OSType' property"); Index: src/providers/vm-builder/builder-service.c =================================================================== ---- src/providers/vm-builder/builder-service.c (revision 1169) +--- src/providers/vm-builder/builder-service.c (revision 1171) +++ src/providers/vm-builder/builder-service.c (working copy) @@ -93,7 +93,11 @@ "windowsvistax64", @@ -28,10 +41,10 @@ "winserver2008", - "winserver2008x64" + "winserver2008x64", -+ "opensuse11", -+ "pxe", -+ "sled11", -+ "sles11" ++ "opensuse11", ++ "pxe", ++ "sled11", ++ "sles11" }; size_t NumOsTypes = sizeof(OSTypes) / sizeof(char*); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mgf...@us...> - 2009-04-02 18:37:26
|
Revision: 1171 http://omc.svn.sourceforge.net/omc/?rev=1171&view=rev Author: mgfritch Date: 2009-04-02 18:37:19 +0000 (Thu, 02 Apr 2009) Log Message: ----------- - Added patch for extending the OSTypes available on SUSE11 Modified Paths: -------------- contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec Added Paths: ----------- contrib/xen-vm-builder/trunk/suse11_ostypes.patch Modified: contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec =================================================================== --- contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-04-01 16:17:49 UTC (rev 1170) +++ contrib/xen-vm-builder/trunk/sblim-cmpi-xenvm-builder.spec 2009-04-02 18:37:19 UTC (rev 1171) @@ -16,7 +16,7 @@ %define tarname sblim-cmpi-xenvm-builder Url: http://www.omc-project.org # Increment the version every time the source code changes. -Version: 1.0.1 +Version: 1.0.3 Release: 0.2 Group: System/Management Summary: Linux CIM providers for CMPI instrumentation of virtual machine creation @@ -31,7 +31,11 @@ Obsoletes: novell-zenworks-vmbuilder-cimproviders novell-zenworks-vmbuilder-cli novell-zenworks-vmbuilder-zosjob Source0: %{tarname}-%{version}.tar.gz #Source1: %{tarname}-mof.tar.bz2 +%if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11 +Patch0: suse11_ostypes.patch +%endif + %description Linux CIM providers for CMPI instrumentation of XEN virtual machine creation. @@ -45,6 +49,9 @@ %prep # Untar the sources. %setup -n %{tarname}-%{version} +%if 0%{?suse_version} >= 1100 || 0%{?sles_version} >= 11 +%patch0 -p0 +%endif %build # If the LD_RUN_PATH environment variable is set at link time, Added: contrib/xen-vm-builder/trunk/suse11_ostypes.patch =================================================================== --- contrib/xen-vm-builder/trunk/suse11_ostypes.patch (rev 0) +++ contrib/xen-vm-builder/trunk/suse11_ostypes.patch 2009-04-02 18:37:19 UTC (rev 1171) @@ -0,0 +1,37 @@ +Index: mof/XEN_VMBuilderVirtualSystemCreationData.mof +=================================================================== +--- mof/XEN_VMBuilderVirtualSystemCreationData.mof (revision 1169) ++++ mof/XEN_VMBuilderVirtualSystemCreationData.mof (working copy) +@@ -110,13 +110,13 @@ + " provides bootstrap capability. "), + ValueMap { "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "10", + "11", "12", "13", "14", "15", "16", "17", "18", "19", "20", "21", +- "22", "23", "24"}, ++ "22", "23", "24", "25", "26", "27", "28"}, + Values { "other", "suse", "sles8", "sles9", "sles10", "sled10", + "oes2l", "oes2nw", "netware", "redhat", "rhel3", "rhel4", + "rhel5", "solaris9", "solaris10", "windows", "windowsx64", + "windowsnt", "windowsxp", "windowsxpx64", "windowsvista", + "windowsvistax64", "opensuse", "winserver2008", +- "winserver2008x64" }] ++ "winserver2008x64", "opensuse11", "pxe", "sled11", "sles11" }] + uint32 OSType; + + [Description("Behaviour of a domain when it is powered off. " +Index: src/providers/vm-builder/builder-service.c +=================================================================== +--- src/providers/vm-builder/builder-service.c (revision 1169) ++++ src/providers/vm-builder/builder-service.c (working copy) +@@ -93,7 +93,11 @@ + "windowsvistax64", + "opensuse", + "winserver2008", +- "winserver2008x64" ++ "winserver2008x64", ++ "opensuse11", ++ "pxe", ++ "sled11", ++ "sles11" + }; + size_t NumOsTypes = sizeof(OSTypes) / sizeof(char*); + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-04-01 16:18:04
|
Revision: 1170 http://omc.svn.sourceforge.net/omc/?rev=1170&view=rev Author: bartw Date: 2009-04-01 16:17:49 +0000 (Wed, 01 Apr 2009) Log Message: ----------- added version to caption Modified Paths: -------------- pybase/trunk/OMC_InitdService.py Modified: pybase/trunk/OMC_InitdService.py =================================================================== --- pybase/trunk/OMC_InitdService.py 2009-03-30 13:56:02 UTC (rev 1169) +++ pybase/trunk/OMC_InitdService.py 2009-04-01 16:17:49 UTC (rev 1170) @@ -81,13 +81,14 @@ #------------------------------------------------------------------------------ -def _get_rpm_install_date(fullpath): +def _get_rpm_install_date_and_version(fullpath): try: l=Popen([r'/bin/rpm', '-qf', '--queryformat', \ - '%{INSTALLTIME}', fullpath], \ + '%{INSTALLTIME} %{VERSION}', fullpath], \ stdout=PIPE).communicate()[0] if len(l): - return pywbem.CIMDateTime.fromtimestamp(long(l)) + l = l.split() + return (pywbem.CIMDateTime.fromtimestamp(long(l[0])), l[1]) except: pass return None @@ -149,14 +150,17 @@ if line.startswith('#') and 'Short-Description:' in line: caption = line[line.find(':')+1:] break + + idt_and_ver = _get_rpm_install_date_and_version(fullpath) + if idt_and_ver is not None: + idt, ver = idt_and_ver + model['InstallDate'] = idt + caption+= ' version '+ver + if caption: model['Caption'] = caption model['Description'] = caption - idt = _get_rpm_install_date(fullpath) - if idt: - model['InstallDate'] = idt - osts = [] cmd = fullpath + ' status' st = call(cmd, shell=True) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2009-03-30 13:56:09
|
Revision: 1169 http://omc.svn.sourceforge.net/omc/?rev=1169&view=rev Author: kkaempf Date: 2009-03-30 13:56:02 +0000 (Mon, 30 Mar 2009) Log Message: ----------- enable 'rdoc' documentation and adapt comments appropriately Modified Paths: -------------- cmpi-bindings/trunk/swig/cmpi.i cmpi-bindings/trunk/swig/cmpi_types.i cmpi-bindings/trunk/swig/ruby/CMakeLists.txt Modified: cmpi-bindings/trunk/swig/cmpi.i =================================================================== --- cmpi-bindings/trunk/swig/cmpi.i 2009-03-18 20:29:45 UTC (rev 1168) +++ cmpi-bindings/trunk/swig/cmpi.i 2009-03-30 13:56:02 UTC (rev 1169) @@ -16,6 +16,8 @@ %include "typemaps.i" %include exception.i +#define __type + %{ /* Modified: cmpi-bindings/trunk/swig/cmpi_types.i =================================================================== --- cmpi-bindings/trunk/swig/cmpi_types.i 2009-03-18 20:29:45 UTC (rev 1168) +++ cmpi-bindings/trunk/swig/cmpi_types.i 2009-03-30 13:56:02 UTC (rev 1169) @@ -110,6 +110,11 @@ %rename(CMPIException) CMPIException; typedef struct _CMPIException {} CMPIException; +/* + * Container for a fault, contains numeric error_code and textual + * description + * + */ %extend CMPIException { CMPIException() @@ -121,12 +126,25 @@ { free($self->description); } - +#if defined(SWIGRUBY) +%rename("error_code") get_error_code(); +#endif + /* + * Numerical error code + * + */ int get_error_code() { return $self->error_code; } +#if defined(SWIGRUBY) +%rename("description") get_description(); +#endif + /* + * Textual error description + * + */ const char* get_description() { return $self->description; @@ -161,128 +179,152 @@ %extend _CMPIError { ~CMPIError() { } - /* Gets the type of this Error */ + +/* Gets the type of this Error */ CMPIErrorType type() { return CMGetErrorType($self, NULL); } - /* Sets the error type of this error object. */ + #if defined(SWIGRUBY) %rename("type=") set_type(const CMPIErrorType et); #endif + /* Sets the error type of this error object. */ void set_type(const CMPIErrorType et) { CMSetErrorType($self, et); } - /* Returns a string which describes the alternate error type. */ + +/* Returns a string which describes the alternate error type. */ const char *other_type() { return CMGetCharPtr(CMGetOtherErrorType($self, NULL)); } - /* Sets the 'other' error type of this error object. */ + #if defined(SWIGRUBY) %rename("other_type=") set_other_type(const char *ot); #endif + /* Sets the 'other' error type of this error object. */ void set_other_type(const char *ot) { CMSetOtherErrorType($self, ot); } + /* Returns a string which describes the owning entity. */ const char *owning_entity() { return CMGetCharPtr(CMGetOwningEntity($self, NULL)); } + /* Returns a string which is the message ID. */ const char *message_id() { return CMGetCharPtr(CMGetMessageID($self, NULL)); } + /* Returns a string comnating an error message. */ const char *message() { return CMGetCharPtr(CMGetErrorMessage($self, NULL)); } + /* Returns the perceieved severity of this error. */ CMPIErrorSeverity severity() { return CMGetPerceivedSeverity($self, NULL); } + /* Returns the probable cause of this error. */ CMPIErrorProbableCause probable_cause() { return CMGetProbableCause($self, NULL); } - /* Sets the description of the probable cause. */ + #if defined(SWIGRUBY) %rename("probable_cause=") set_probable_cause(const char *pcd); #endif + /* Sets the description of the probable cause. */ void set_probable_cause(const char *pcd) { CMSetProbableCauseDescription($self, pcd); } + /* Returns a string which describes the probable cause. */ const char *probable_cause_description() { return CMGetCharPtr(CMGetProbableCauseDescription($self, NULL)); } + /* Returns an array of strings which describes recomended actions. */ CMPIArray *recommended_actions() { return CMGetRecommendedActions($self, NULL); } - /* Sets the recomended actions array. */ + #if defined(SWIGRUBY) %rename("recommended_actions=") set_recommended_actions(const CMPIArray* ra); #endif + /* Sets the recomended actions array. */ void set_recommended_actions(const CMPIArray* ra) { CMSetRecommendedActions($self, ra); } + /* Returns a string which describes the Error source. */ const char *source() { return CMGetCharPtr(CMGetErrorSource($self, NULL)); } - /* Specifies a string which specifes The identifying information of - the entity (i.e., the instance) generating the error. */ + #if defined(SWIGRUBY) %rename("source=") set_source(const char *es); #endif + /* Specifies a string which specifes The identifying information of + the entity (i.e., the instance) generating the error. */ void set_source(const char *es) { CMSetErrorSource($self, es); } + /* Returns a the format that the error src is in. */ CMPIErrorSrcFormat source_format() { return CMGetErrorSourceFormat($self, NULL); } - /* Sets the source format of the error object. */ + #if defined(SWIGRUBY) %rename("source_format=") set_source_format(const CMPIErrorSrcFormat esf); #endif + /* Sets the source format of the error object. */ void set_source_format(const CMPIErrorSrcFormat esf) { CMSetErrorSourceFormat($self, esf); } + /* Returns a string which describes the 'other' format, only available if the error source is OTHER. */ const char *other_format() { return CMGetCharPtr(CMGetOtherErrorSourceFormat($self, NULL)); } - /* specifies A string defining "Other" values for ErrorSourceFormat */ + #if defined(SWIGRUBY) %rename("other_format=") set_other_format(const char *oesf); #endif + /* specifies A string defining "Other" values for ErrorSourceFormat */ void set_other_format(const char *oesf) { CMSetOtherErrorSourceFormat($self, oesf); } + /* Returns the status code of this error. */ CMPIrc status_code() { return CMGetCIMStatusCode($self, NULL); } + /* Returns a string which describes the status code error. */ const char *status_description() { return CMGetCharPtr(CMGetCIMStatusCodeDescription($self, NULL)); } - /* Sets the description of the status code. */ + #if defined(SWIGRUBY) %rename("status_description=") set_status_description(const char *cd); #endif + /* Sets the description of the status code. */ void set_status_description(const char *cd) { CMSetCIMStatusCodeDescription($self, cd); } + /* Returns an array which contains the dynamic content of the message. */ CMPIArray *message_arguments() { return CMGetMessageArguments($self, NULL); } - /* Sets an array of strings for the dynamic content of the message. */ + #if defined(SWIGRUBY) %rename("message_arguments=") set_message_arguments(CMPIArray* ma); #endif + /* Sets an array of strings for the dynamic content of the message. */ void set_message_arguments(CMPIArray* ma) { CMSetMessageArguments($self, ma); } @@ -297,6 +339,7 @@ { /* no con-/destructor, the broker handles this */ + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -308,16 +351,19 @@ return CMGetCharPtr(result); } + /* Add the +instance+ to the result */ void return_instance(CMPIInstance *instance) { RAISE_IF(CMReturnInstance($self, instance)); } + /* Add the +objectpath+ to the result */ void return_objectpath(CMPIObjectPath *path) { RAISE_IF(CMReturnObjectPath($self, path)); } + /* Add typed value to the result */ void return_data(const CMPIValue* value, const CMPIType type) { RAISE_IF(CMReturnData($self, value, type)); @@ -361,16 +407,12 @@ #ifdef SWIGRUBY %rename ("to_s") string(); #endif + /* Return string representation */ const char *string() { return CMGetCharPtr($self->ft->toString($self, NULL)); } - /* Adds/replaces a named key property. - * name: Key property name. - * value: Address of value structure. - * type: Value type. - */ #if 0 /* TODO: FIXME: No global _BROKER */ #if defined(SWIGRUBY) %alias set "[]="; @@ -425,6 +467,11 @@ #endif #endif + /* Adds/replaces a named key property. + * name: Key property name. + * value: Address of value structure. + * type: Value type. + */ void add_key( const char *name, const CMPIValue* value, @@ -433,6 +480,9 @@ RAISE_IF(CMAddKey($self, name, value, type)); } +#if defined(SWIGRUBY) + %rename("key") get_key(const char *name); +#endif /* Gets a named key property value. * name: Key property name. */ @@ -446,10 +496,8 @@ return result; } - /* Gets a key property value defined by its index. - * name: [out] Key property name - */ #if defined (SWIGRUBY) + %rename("key_at") get_key_at(int index); VALUE #endif #if defined (SWIGPYTHON) @@ -458,7 +506,10 @@ #if defined (SWIGPERL) SV* #endif - get_key_at(int index) { + /* Gets a key property value defined by its index. + * name: [out] Key property name + */ + __type get_key_at(int index) { Target_Type tdata; CMPIString *s = NULL; CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -496,8 +547,9 @@ return result; } + +#if defined(SWIGRUBY) /* iterate over keys as [<value>,<name>] pairs */ -#if defined(SWIGRUBY) void keys() { int i; @@ -524,13 +576,13 @@ %} #endif - /* Set/replace namespace and classname components from <src>. */ + /* Set/replace namespace and classname components from +src+. */ void replace_from(const CMPIObjectPath * src) { RAISE_IF(CMSetNameSpaceFromObjectPath($self, src)); } - /* Set/replace hostname, namespace and classname components from <src>. + /* Set/replace hostname, namespace and classname components from +src+. */ void replace_all_from(const CMPIObjectPath * src) { @@ -538,7 +590,7 @@ } /* Get class qualifier value. - * qName: Qualifier name. + * +qName+: Qualifier name. */ CMPIData qualifier(const char *qname) { @@ -552,8 +604,8 @@ } /* Get property qualifier value. - * pName Property name. - * qName Qualifier name. + * +pName+: Property name. + * +qName+: Qualifier name. */ CMPIData property_qualifier(const char *pName, const char *qName) { @@ -675,11 +727,6 @@ { } - /* Adds/replaces a named Property. - * name: Entry name. - * value: Address of value structure. - * type: Value type. - */ #if 0 /* TODO: FIXME: No global _BROKER */ #if defined(SWIGRUBY) %alias set "[]="; @@ -734,6 +781,11 @@ #endif #endif + /* Adds/replaces a named Property. + * name: Entry name. + * value: Address of value structure. + * type: Value type. + */ void set_property( const char *name, const CMPIValue * value, @@ -742,10 +794,10 @@ RAISE_IF(CMSetProperty($self, name, value, type)); } - /* get a named property value */ #if defined(SWIGRUBY) %alias get "[]"; /* + * get a named property value * Property access in Ruby: * data = instance[:propname] # access by name (symbol) * data = instance["propname" # access by name (string) @@ -769,6 +821,11 @@ } #endif + +#if defined(SWIGRUBY) + %rename("property") get_property(const char *name); +#endif + /* Get property by name */ CMPIData get_property(const char *name) { CMPIData result; @@ -780,9 +837,6 @@ return result; } - /** Gets a Property value defined by its index. - * index: Position in the internal Data array. - */ #if defined (SWIGRUBY) VALUE #endif @@ -792,7 +846,10 @@ #if defined (SWIGPERL) SV * #endif - get_property_at(int index) + /** Gets a Property value defined by its index. + * index: Position in the internal Data array. + */ + __type get_property_at(int index) { Target_Type tdata; Target_Type result; @@ -820,10 +877,10 @@ return result; } - /* Gets the number of properties contained in this Instance. */ #if defined(SWIGRUBY) %alias property_count "size"; #endif + /* Gets the number of properties contained in this Instance. */ int property_count() { int result; @@ -850,13 +907,13 @@ return result; } +#if defined(SWIGRUBY) + %alias set_objectpath "objectpath="; +#endif /* Replaces the ObjectPath of the instance. * The passed objectpath shall contain the namespace, classname, * as well as all keys for the specified instance. */ -#if defined(SWIGRUBY) - %alias set_objectpath "objectpath="; -#endif void set_objectpath(const CMPIObjectPath *path) { RAISE_IF(CMSetObjectPath($self, path)); @@ -976,10 +1033,10 @@ RAISE_IF(CMAddArg($self, name, value, type)); } - /* Gets a named argument value. */ #if defined(SWIGRUBY) %alias get "[]"; #endif + /* Gets a named argument value. */ CMPIData get(const char *name) { CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -991,8 +1048,6 @@ return result; } - /* Gets a Argument value defined by its index. - */ #if defined (SWIGRUBY) VALUE #endif @@ -1002,7 +1057,9 @@ #if defined (SWIGPERL) SV * #endif - get_arg_at(int index) + /* Gets a Argument value defined by its index. + */ + __type get_arg_at(int index) { Target_Type tdata; Target_Type result; @@ -1032,7 +1089,6 @@ } /* Gets the number of arguments contained in this Args. */ - int arg_count() { CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -1049,11 +1105,13 @@ # # CMPISelectExp -%extend _CMPISelectExp { /* This structure encompasses queries * and provides mechanism to operate on the query. */ +%extend _CMPISelectExp { ~CMPISelectExp() { } + + /* Return string representation */ const char* to_s() { return CMGetCharPtr(CMGetSelExpString($self, NULL)); } @@ -1064,6 +1122,7 @@ # CMPISelectCond %extend _CMPISelectCond { + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); return CMGetCharPtr(s); @@ -1082,6 +1141,7 @@ # CMPIPredicate %extend _CMPIPredicate { + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); return CMGetCharPtr(s); @@ -1149,6 +1209,7 @@ return result; } + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIStatus st = { CMPI_RC_OK, NULL }; @@ -1167,6 +1228,7 @@ %extend _CMPIArray { + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); @@ -1190,10 +1252,10 @@ return result; } - /* Gets an element value defined by its index. */ #if defined(SWIGRUBY) %alias at "[]"; #endif + /* Gets an element value defined by its index. */ CMPIData at(int index) { CMPIData result; @@ -1205,10 +1267,10 @@ return result; } - /* Sets an element value defined by its index. */ #if defined(SWIGRUBY) %alias set "[]="; #endif + /* Sets an element value defined by its index. */ void set(int index, const CMPIValue * value, CMPIType type) { RAISE_IF(CMSetArrayElementAt($self, index, value, type)); @@ -1232,10 +1294,12 @@ # CMPIContext %extend _CMPIContext { + /* Return string representation */ const char* to_s(const CMPIBroker* broker) { CMPIString *s = CDToString(broker, $self, NULL); return CMGetCharPtr(s); } + void add_entry(const char* name, const CMPIValue* data, const CMPIType type) { CMAddContextEntry($self, name, data, type); @@ -1254,7 +1318,7 @@ #if defined (SWIGPERL) SV* #endif - get_entry_at(int index) { + __type get_entry_at(int index) { Target_Type tdata; Target_Type result; CMPIString *s = NULL; @@ -1295,16 +1359,21 @@ %extend _CMPIDateTime { ~CMPIDateTime() { } + + /* Return string representation */ const char* to_s() { return CMGetCharPtr(CMGetStringFormat($self, NULL)); } + + /* Return integer representation */ uint64_t to_i() { return CMGetBinaryFormat($self, NULL); } - /* Tests whether DateTime is an interval value. */ + #if defined(SWIGRUBY) %rename("interval?") is_interval; #endif + /* Tests whether DateTime is an interval value. */ int is_interval() { return CMIsInterval($self, NULL); } Modified: cmpi-bindings/trunk/swig/ruby/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/swig/ruby/CMakeLists.txt 2009-03-18 20:29:45 UTC (rev 1168) +++ cmpi-bindings/trunk/swig/ruby/CMakeLists.txt 2009-03-30 13:56:02 UTC (rev 1169) @@ -57,3 +57,21 @@ # cmpi_rbwbem_bindings: provider implementation # INSTALL(FILES cmpi_rbwbem_bindings.rb DESTINATION ${RUBY_LIB_DIR}) + +# rdoc +SET(rdoc_dir "${CMAKE_CURRENT_BINARY_DIR}/html") +ADD_CUSTOM_COMMAND ( + OUTPUT ${rdoc_dir} + COMMAND ${CMAKE_COMMAND} -E echo_append "Creating rdoc documentation ..." + COMMAND rm -rf ${rdoc_dir} + COMMAND rdoc -o ${rdoc_dir} cmpi.i *.i + COMMAND ${CMAKE_COMMAND} -E echo "Done." + WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/swig + DEPENDS ${CMAKE_SOURCE_DIR}/swig/*.i +) +ADD_CUSTOM_TARGET(ruby_rdoc ALL DEPENDS "${rdoc_dir}") +ADD_DEPENDENCIES(ruby_rdoc ${NAME}) + +# +# Leave this to %doc in the .spec file +#INSTALL(DIRECTORY "${rdoc_dir}" DESTINATION ${DOC_INSTALL_DIR}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-03-18 20:30:01
|
Revision: 1168 http://omc.svn.sourceforge.net/omc/?rev=1168&view=rev Author: bartw Date: 2009-03-18 20:29:45 +0000 (Wed, 18 Mar 2009) Log Message: ----------- some fixes for redhat Modified Paths: -------------- pybase/trunk/OMC_InitdService.py pybase/trunk/OMC_OperatingSystem.py Modified: pybase/trunk/OMC_InitdService.py =================================================================== --- pybase/trunk/OMC_InitdService.py 2009-03-06 21:14:14 UTC (rev 1167) +++ pybase/trunk/OMC_InitdService.py 2009-03-18 20:29:45 UTC (rev 1168) @@ -47,6 +47,7 @@ if file in ('reboot', 'halt', + 'killall', 'single', 'README', 'core', Modified: pybase/trunk/OMC_OperatingSystem.py =================================================================== --- pybase/trunk/OMC_OperatingSystem.py 2009-03-06 21:14:14 UTC (rev 1167) +++ pybase/trunk/OMC_OperatingSystem.py 2009-03-18 20:29:45 UTC (rev 1168) @@ -102,19 +102,23 @@ model.update(LastBootUpTime = pywbem.CIMDateTime.fromtimestamp( time.time() - float(fo.read().split()[0]))) fo.close() + infofile = None if os.path.exists('/etc/SuSE-release'): - fo = open('/etc/SuSE-release', 'r') + infofile = '/etc/SuSE-release' + elif os.path.exists('/etc/redhat-release'): + infofile = '/etc/redhat-release' + if infofile is not None: + fo = open(infofile, 'r') version = fo.readline().strip() model.update(Version = version) model.update(ElementName = version) model.update(Description = version) model.update(Caption = version) fo.close() - install_time = Popen(['/bin/rpm', '-qf','/etc/SuSE-release', + install_time = Popen(['/bin/rpm', '-qf', infofile, '--queryformat','%{INSTALLTIME}'], stdout=PIPE).communicate()[0] model.update(InstallDate = pywbem.CIMDateTime.fromtimestamp(int(install_time))) - # TODO non-SUSE distros model.update(Distributed = True) #model['EnabledDefault'] = # TODO (type = pywbem.Uint16 self.Values.EnabledDefault) (default=2L) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-03-06 21:14:29
|
Revision: 1167 http://omc.svn.sourceforge.net/omc/?rev=1167&view=rev Author: bartw Date: 2009-03-06 21:14:14 +0000 (Fri, 06 Mar 2009) Log Message: ----------- catch conversion errors, and rethrow with useful info. otherwise the provider writer has no idea which property is causing the problem. 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 2009-02-27 00:03:27 UTC (rev 1166) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2009-03-06 21:14:14 UTC (rev 1167) @@ -738,7 +738,11 @@ # if pinst.property_list and \ # prop.name.lower() not in pinst.property_list: # continue - data, _type = self.pywbem2cmpi_value(prop.value, _type=prop.type) + try: + data, _type = self.pywbem2cmpi_value(prop.value, + _type=prop.type) + except TypeError, te: + raise TypeError('Error converting Property %s: Value %s, Type %s; %s' % (prop.name, prop.value, prop.type, str(te))) ctype = _pywbem2cmpi_typemap[_type] if isinstance(prop.value, list): ctype = ctype | cmpi.CMPI_ARRAY This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-02-27 00:03:33
|
Revision: 1166 http://omc.svn.sourceforge.net/omc/?rev=1166&view=rev Author: bartw Date: 2009-02-27 00:03:27 +0000 (Fri, 27 Feb 2009) Log Message: ----------- Removed on-demand TargetInitialization, and moved target initialization to the generic "Create" factory functions. The on-demand initialization was done previously because SFCB passed a null CMPIStatus to the factory functions, which meant they couldn't gracefully fail. This has since been fixed in SFCB. This change was necessary to properly implement Cleanup(). In Cleanup(), it is was not previously safe to allow providers to return CMPI_RC_DO_NOT_UNLOAD, such that they will not be unloaded. For example, consider an instance and method provider. If the provider is called for a method only, the factory functions for both instance and method will be called, allocating a ProviderMIHandle for each provider type. However, only the method provider will have miHdl->instance initialized. When Cleanup() is called by SFCB, the instance Cleanup() is called first, then the method Cleanup(). Problem: when instance Cleanup() is called, the miHdl->Instance is null, so the provider isn't called. Then the instance miHdl is free'd, and the MI_COUNT is decremented (in the case of Python at least). Next the method provider Cleanup() is called. The target provider's cleanup() is called, and it may return CMPI_RC_DO_NOT_UNLOAD. So, the provider is not unloaded. If a subsequent instance operation comes in, we have a problem because the instance miHdl has already been free'd. Also, the MI_COUNT is incorrect. So, we'll tell the target provider we're always terminating until this can be fixed. Modified Paths: -------------- cmpi-bindings/trunk/src/cmpi_provider.c Modified: cmpi-bindings/trunk/src/cmpi_provider.c =================================================================== --- cmpi-bindings/trunk/src/cmpi_provider.c 2009-02-26 04:03:49 UTC (rev 1165) +++ cmpi-bindings/trunk/src/cmpi_provider.c 2009-02-27 00:03:27 UTC (rev 1166) @@ -186,9 +186,6 @@ static pthread_mutex_t _CMPI_INIT_MUTEX = PTHREAD_MUTEX_INITIALIZER; /* mutex around _MI_COUNT */ static Target_Type _TARGET_MODULE = Target_Null; /* The target module (aka namespace) */ -/* on-demand init */ -#define TARGET_CMPI_INIT { if (((ProviderMIHandle*)(self->hdl))->instance == Target_Null) if (TargetInitialize(((ProviderMIHandle*)(self->hdl)), &status) != 0) return status; } - #if defined(SWIGPYTHON) #include "target_python.c" #endif @@ -216,10 +213,6 @@ miHdl, miHdl->instance, context, terminating)); CMPIStatus status = {CMPI_RC_OK, NULL}; - // If an instance/method provider is loaded, but only an instance operation - // is called, Cleanup() will be called twice (once for instance, once - // for method). However, since only instance operations were requested, - // miHdl->instance won't be set for one of the calls to Cleanup(). if (miHdl->instance != Target_Null) { Target_Type _context; @@ -350,8 +343,6 @@ _SBLIM_TRACE(1,("EnumInstancesNames() called, context %p, result %p, reference %p", context, result, reference)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) result, SWIGTYPE_p__CMPIResult, 0); @@ -390,8 +381,6 @@ _SBLIM_TRACE(1,("EnumInstances() called, context %p, result %p, reference %p, properties %p", context, result, reference, properties)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) result, SWIGTYPE_p__CMPIResult, 0); @@ -431,8 +420,6 @@ _SBLIM_TRACE(1,("GetInstance() called, context %p, results %p, reference %p, properties %p", context, results, reference, properties)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); @@ -475,8 +462,6 @@ _SBLIM_TRACE(1,("CreateInstance() called, context %p, results %p, reference %p, newinstance %p", context, results, reference, newinstance)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); @@ -523,8 +508,6 @@ _SBLIM_TRACE(1,("SetInstance() called, context %p, results %p, reference %p, newinstance %p, properties %p", context, results, reference, newinstance, properties)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); @@ -563,8 +546,6 @@ _SBLIM_TRACE(1,("DeleteInstance() called, context %p, results %p, reference %p", context, results, reference)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); @@ -603,8 +584,6 @@ _SBLIM_TRACE(1,("ExecQuery() called, context %p, results %p, reference %p, query %s, language %s", context, results, reference, query, language)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _context = SWIG_NewPointerObj((void*) context, SWIGTYPE_p__CMPIContext, 0); _result = SWIG_NewPointerObj((void*) results, SWIGTYPE_p__CMPIResult, 0); @@ -658,8 +637,6 @@ _SBLIM_TRACE(1,("associatorNames() called, ctx %p, rslt %p, objName %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, objName, assocClass, resultClass, role, resultRole)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -727,8 +704,6 @@ _SBLIM_TRACE(1,("associators() called, ctx %p, rslt %p, objName %p, assocClass %s, resultClass %s, role %s, resultRole %s", ctx, rslt, objName, assocClass, resultClass, role, resultRole)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -793,8 +768,6 @@ _SBLIM_TRACE(1,("referenceNames() called, ctx %p, rslt %p, objName %p, resultClass %s, role %s", ctx, rslt, objName, resultClass, role)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -848,8 +821,6 @@ _SBLIM_TRACE(1,("references() called, ctx %p, rslt %p, objName %p, resultClass %s, role %s, properties %p", ctx, rslt, objName, resultClass, role, properties)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -902,8 +873,6 @@ _SBLIM_TRACE(1,("invokeMethod() called, ctx %p, rslt %p, objName %p, method %s, in %p, out %p", ctx, rslt, objName, method, in, out)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -947,8 +916,6 @@ _SBLIM_TRACE(1,("authorizeFilter() called, ctx %p, filter %p, className %s, classPath %p, owner %s", ctx, filter, className, classPath, owner)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _filter = SWIG_NewPointerObj((void*) filter, SWIGTYPE_p__CMPISelectExp, 0); @@ -989,8 +956,6 @@ _SBLIM_TRACE(1,("activateFilter() called, ctx %p, filter %p, className %s, classPath %p, firstActivation %d", ctx, filter, className, classPath, firstActivation)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _filter = SWIG_NewPointerObj((void*) filter, SWIGTYPE_p__CMPISelectExp, 0); @@ -1031,8 +996,6 @@ _SBLIM_TRACE(1,("deActivateFilter() called, ctx %p, filter %p, className %s, classPath %p, lastActivation %d", ctx, filter, className, classPath, lastActivation)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); _filter = SWIG_NewPointerObj((void*) filter, SWIGTYPE_p__CMPISelectExp, 0); @@ -1075,8 +1038,6 @@ //_SBLIM_TRACE(1,("mustPoll() called, ctx %p, rslt %p, filter %p, className %s, classPath %p", ctx, rslt, filter, className, classPath)); _SBLIM_TRACE(1,("mustPoll() called, ctx %p, filter %p, className %s, classPath %p", ctx, filter, className, classPath)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); //Target_Type _rslt = SWIG_NewPointerObj((void*) rslt, SWIGTYPE_p__CMPIResult, 0); @@ -1110,8 +1071,6 @@ _SBLIM_TRACE(1,("enableIndications() called, ctx %p", ctx)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); @@ -1137,8 +1096,6 @@ _SBLIM_TRACE(1,("disableIndications() called, ctx %p", ctx)); - TARGET_CMPI_INIT - TARGET_THREAD_BEGIN_BLOCK; _ctx = SWIG_NewPointerObj((void*) ctx, SWIGTYPE_p__CMPIContext, 0); @@ -1205,18 +1162,14 @@ }; -static void +static int createInit(const CMPIBroker* broker, - const CMPIContext* context, const char* miname, CMPIStatus* st) + const CMPIContext* context, + ProviderMIHandle* miHdl, + const char* miname, CMPIStatus* st) { - _SBLIM_TRACE(1,("\n>>>>> createInit() called, miname= %s (ctx=%p)\n", miname, context)); - - /* - * We can't initialize the target here and load target modules, because - * SFCB passes a NULL CMPIStatus* st, which means we can't report - * back error strings. Instead, we'll check and initialize in each - * MIFT function - */ + _SBLIM_TRACE(1,("\n>>>>> createInit() called, broker %p, miname= %s (ctx=%p), status %p\n", broker, miname, context, st)); + return TargetInitialize(miHdl, st); } @@ -1233,12 +1186,17 @@ hdl->miName = strdup(miname); \ hdl->broker = broker; \ } \ - mi= (CMPI##ptype##MI*)malloc(sizeof(CMPI##ptype##MI)); \ + if (createInit(broker, context, hdl, miname, st) != 0) { \ + if (st) st->rc = CMPI_RC_ERR_FAILED; \ + free(hdl->miName); \ + free(hdl); \ + return NULL; \ + } \ + mi = (CMPI##ptype##MI*)malloc(sizeof(CMPI##ptype##MI)); \ if (mi) { \ mi->hdl = hdl; \ mi->ft = &ptype##MIFT__; \ } \ - createInit(broker, context, miname, st); \ /*_SBLIM_TRACE(1, ("\n>>>>> returning mi=0x%08x mi->hdl=0x%08x mi->ft=0x%08x", mi, mi->hdl, mi->ft));*/ \ ++_MI_COUNT; \ return mi; \ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-02-26 04:03:54
|
Revision: 1165 http://omc.svn.sourceforge.net/omc/?rev=1165&view=rev Author: bartw Date: 2009-02-26 04:03:49 +0000 (Thu, 26 Feb 2009) Log Message: ----------- Pass cleanup function along to providers so they can perform necessary cleanup. Allow them to specify that they don't want to be unloaded. Modified Paths: -------------- cmpi-bindings/trunk/src/cmpi_provider.c cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py Modified: cmpi-bindings/trunk/src/cmpi_provider.c =================================================================== --- cmpi-bindings/trunk/src/cmpi_provider.c 2009-01-27 21:42:25 UTC (rev 1164) +++ cmpi-bindings/trunk/src/cmpi_provider.c 2009-02-26 04:03:49 UTC (rev 1165) @@ -212,7 +212,35 @@ const CMPIContext * context, CMPIBoolean terminating) { - CMPIStatus status = {CMPI_RC_OK, NULL}; /* Return status of CIM operations. */ + _SBLIM_TRACE(1,("Cleanup() called, miHdl %p, miHdl->instance %p, context %p, terminating %d", + miHdl, miHdl->instance, context, terminating)); + CMPIStatus status = {CMPI_RC_OK, NULL}; + + // If an instance/method provider is loaded, but only an instance operation + // is called, Cleanup() will be called twice (once for instance, once + // for method). However, since only instance operations were requested, + // miHdl->instance won't be set for one of the calls to Cleanup(). + if (miHdl->instance != Target_Null) + { + Target_Type _context; + Target_Type _terminating; + + TARGET_THREAD_BEGIN_BLOCK; + _context = SWIG_NewPointerObj((void*) context, + SWIGTYPE_p__CMPIContext, 0); + _terminating = Target_Bool(terminating); + + TargetCall(miHdl, &status, "cleanup", 2, _context, _terminating); + TARGET_THREAD_END_BLOCK; + _SBLIM_TRACE(1,("Cleanup() %d", status.rc)); + } + + if (!terminating && (status.rc == CMPI_RC_DO_NOT_UNLOAD || + status.rc == CMPI_RC_NEVER_UNLOAD)) + { + _SBLIM_TRACE(1,("Cleanup() Provider requested not to be unloaded.")); + return status; + } if (miHdl != NULL) { @@ -224,7 +252,6 @@ free(miHdl); miHdl = NULL; } - TargetCleanup(); _SBLIM_TRACE(1,("Cleanup() %s", (status.rc == CMPI_RC_OK)? "succeeded":"failed")); Modified: cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py =================================================================== --- cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2009-01-27 21:42:25 UTC (rev 1164) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2009-02-26 04:03:49 UTC (rev 1165) @@ -673,6 +673,18 @@ return (0, '') + def cleanup(self, ctx, terminating): + env = ProviderEnvironment(self, ctx) + try: + if not terminating: + if not self.proxy.MI_canunload(env): + return (cmpi.CMPI_RC_DO_NOT_UNLOAD, '') + self.proxy.MI_shutdown(env) + except pywbem.CIMError, args: + return args[:2] + + return (0, '') + # conversion routines ####################################################################### This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2009-01-27 22:42:18
|
Revision: 1164 http://omc.svn.sourceforge.net/omc/?rev=1164&view=rev Author: bartw Date: 2009-01-27 21:42:25 +0000 (Tue, 27 Jan 2009) Log Message: ----------- Fix for swig-1.3.37. Swig no longer deposits the language-specific files in the current directory, hence the addition of outdir. Thanks to Mihai Ibanescu. Modified Paths: -------------- cmpi-bindings/trunk/swig/perl/CMakeLists.txt cmpi-bindings/trunk/swig/python/CMakeLists.txt cmpi-bindings/trunk/swig/ruby/CMakeLists.txt Modified: cmpi-bindings/trunk/swig/perl/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/swig/perl/CMakeLists.txt 2009-01-16 13:34:31 UTC (rev 1163) +++ cmpi-bindings/trunk/swig/perl/CMakeLists.txt 2009-01-27 21:42:25 UTC (rev 1164) @@ -25,7 +25,7 @@ ADD_CUSTOM_COMMAND ( OUTPUT ${SWIG_OUTPUT} COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Perl ..." - COMMAND ${SWIG_EXECUTABLE} -perl5 -shadow -features autodoc -o ${SWIG_OUTPUT} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} + COMMAND ${SWIG_EXECUTABLE} -perl5 -shadow -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} COMMAND ${CMAKE_COMMAND} -E echo "Done." WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i Modified: cmpi-bindings/trunk/swig/python/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/swig/python/CMakeLists.txt 2009-01-16 13:34:31 UTC (rev 1163) +++ cmpi-bindings/trunk/swig/python/CMakeLists.txt 2009-01-27 21:42:25 UTC (rev 1164) @@ -27,7 +27,7 @@ ADD_CUSTOM_COMMAND ( OUTPUT ${SWIG_OUTPUT} COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for Python ..." - COMMAND ${SWIG_EXECUTABLE} -python -threads -features autodoc -o ${SWIG_OUTPUT} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} + COMMAND ${SWIG_EXECUTABLE} -python -threads -features autodoc -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} COMMAND ${CMAKE_COMMAND} -E echo "Done." WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i Modified: cmpi-bindings/trunk/swig/ruby/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/swig/ruby/CMakeLists.txt 2009-01-16 13:34:31 UTC (rev 1163) +++ cmpi-bindings/trunk/swig/ruby/CMakeLists.txt 2009-01-27 21:42:25 UTC (rev 1164) @@ -25,7 +25,7 @@ ADD_CUSTOM_COMMAND ( OUTPUT ${SWIG_OUTPUT} COMMAND ${CMAKE_COMMAND} -E echo_append "Creating wrapper code for ruby..." - COMMAND ${SWIG_EXECUTABLE} -ruby -o ${SWIG_OUTPUT} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} + COMMAND ${SWIG_EXECUTABLE} -ruby -o ${SWIG_OUTPUT} -outdir ${CMAKE_CURRENT_BINARY_DIR} -I${CMPI_INCLUDE_DIR} ${SWIG_INPUT} COMMAND ${CMAKE_COMMAND} -E echo "Done." WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../*.i This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2009-01-16 13:34:37
|
Revision: 1163 http://omc.svn.sourceforge.net/omc/?rev=1163&view=rev Author: kkaempf Date: 2009-01-16 13:34:31 +0000 (Fri, 16 Jan 2009) Log Message: ----------- Initial release announcement Added Paths: ----------- cmpi-bindings/trunk/ANNOUNCE Added: cmpi-bindings/trunk/ANNOUNCE =================================================================== --- cmpi-bindings/trunk/ANNOUNCE (rev 0) +++ cmpi-bindings/trunk/ANNOUNCE 2009-01-16 13:34:31 UTC (rev 1163) @@ -0,0 +1,64 @@ +In the past, writing CIM providers was quite restrictive. + +On the one hand, CIM providers were CIMOM-specific and hardly +portable. On the other hand, developing in C or C++ with its +edit-compile-link-test cycle takes an awful lot of time. + +Both problems are well known and solutions for each of them existing +in the past. CMPI, the Common Manageablity Programming Interface, +makes the CIM provider CIMOM agnostic. +Then there is the pywbem provider interface for coding CIM providers +in Python - originally using the proprietary OpenWBEM and OpenPegasus C++ +interfaces. + + +Enter cmpi-bindings. + +cmpi-bindings provides flexibility on both sides - the implementation +language and the CIMOM interface. + +cmpi-bindings use SWIG (http://www.swig.org) to generate language +bindings between the CMPI API and any SWIG-supported programming +language. +Now you're free to code providers in your favorite language, like +Ruby, Python, Perl or, if you really have to, even Java (just kidding). + +cmpi-bindings started with the following design goals: +- CIMOM neutral + - CMPI provider interface +- Support most popular scripting languages + - Python, Ruby, Perl, ... +- Automatically generated bindings +- Object orientation + - reduce call parameters + - leverage exceptions +- Code similarity + - across providers implemented in different languages + + +The latest release (0.7) of the pywbem provider interface fully +supports cmpi-bindings, effectively making Python the language of +choice for CIM provider development. + + +Internals + +cmpi-bindings use SWIG in an unusual and innovative way. + +Originally, SWIG is designed to allow access C or C++ libraries from +other languages. It provides data type and function call mappings from +C/C++ to a target language. + +As-is, SWIG nicely maps all CMPI data types and functions working on +these data types. However, writing CIM providers in a target language +requires inversion of control - calling the target language (provider +implementation) from the CIMOM. +To achieve this, cmpi-bindings need a small (typically ~400 lines of C +code) target language dependant 'glue' layer. Extending it to other +languages is fairly easy, implementations for Perl, Python and Ruby +exist currently. + +See +http://omc.svn.sourceforge.net/viewvc/omc/cmpi-bindings/trunk/doc/cmpi-bindings.pdf +for a presentation on cmpi-bindings from last years Management +Developers Conference (www.mandevcon.com) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2009-01-09 14:14:21
|
Revision: 1162 http://omc.svn.sourceforge.net/omc/?rev=1162&view=rev Author: kkaempf Date: 2009-01-09 14:14:14 +0000 (Fri, 09 Jan 2009) Log Message: ----------- Slide from the 2008 Management Developers Conference, describing cmpi-bindings and its implementation. Added Paths: ----------- cmpi-bindings/trunk/doc/cmpi-bindings.pdf Added: cmpi-bindings/trunk/doc/cmpi-bindings.pdf =================================================================== --- cmpi-bindings/trunk/doc/cmpi-bindings.pdf (rev 0) +++ cmpi-bindings/trunk/doc/cmpi-bindings.pdf 2009-01-09 14:14:14 UTC (rev 1162) @@ -0,0 +1,4308 @@ +%PDF-1.4 +%äüöß +2 0 obj +<</Length 3 0 R/Filter/FlateDecode>> +stream +x\x9C}SMk\xDC@\xBD\xFBW\xE8\xB03\xD2|xf \x9B\xF5Bzz(=\xA5M{Ȧ4\x97\xFC\xFD<il\xEFM1\xD6\xCCH=\xE9I\xE3:\xA6\xF7\xE6/9j\xB6\xBD\xA8\x8CA\xE5\xDBO\xFAzC\xAF +\x93~o\xBF\x9F\xFC\x8E\x8D\xCA\xFCpÊ+g;]\xAB\xDF\xFDn\x9Eo\xBA\xAA +}籄 ]OO\xC7\xE6\xF6\xE1h\xFF\x87 +^?`\xEC\xE6&\xC7n\xA0\xC0\xB94\xFF\xA0\xDB\xD0\xCD\xCF\xDFF\xC7EF'\xA5\x85\xF4%\x8E.]Te*-\xEB9\x8F\xAE/~tY\xC5PZȻ\xD2\xA3ە0\xBA{S\xECu;Y\x94\\xD8]\xA8M\xAACT;,\xECL2\xB4,%\x8D\xEC\xE7\xA6\xA0\xA6X\xFC\xAA\xECO[\xB3\xA72\x9C\x9B\xAA\xDDv(&\xAFMn\x89\xFD7\xD7\xF3l{\x8D.\xA2\x98W.\xDF\xE7/\xCD47\xD7d\x8B\xF8Nȃ\xEDX\xD9B/\xB6Yd%[ +&\xA3r]O\xAC\x88\xAD_hZ\xEC\xFDF\xFB'\x88٣\xBD\x92\xE4\xE8\xA5\xEE\xEC"\xBA\x91\xAEqY;\x83\x82&\xF4\xA6\x8D\xDAs%\xCCi\x8B\xAAbr\xDBt\xD4+Ui\x91@] +"k\x9ED\x8C3\xDEt,\xD0\xEFMS\xF0[\xF5S\xAD\xF4\xC6!\x8A\xC9$.\xE2\xD1XI\xF5]L\xAC\xD5"k)\xC8>\xD8Ȋ:De\xB1\x8E\xAC\xFC\x87:\x91m\xE2\x94V\xEEN@w\xF8h\xBF\xD4v +\xA9`S\xD9ЗL\xC7|t\xDCx\xB9 n\xCER\x900\xA0>M#E\xE0K\xB0걭\xAF8\xAE\xAF\x98%\x99\x9B\xAE\x92\x87.Q\xF2\xB8Y\xBDR\xF5z\xA4\xBB0\xF2\xB1 +endstream +endobj + +3 0 obj +481 +endobj + +6 0 obj +<</Type/XObject/Subtype/Image/Width 156 /Height 150 /BitsPerComponent 8 /Length 7 0 R +/Filter/FlateDecode/ColorSpace[ /Indexed/DeviceRGB 35 < +007066 107970 208279 7ABF49 308B83 40948C 509D96 60A6A0 70AFA9 7FB7B2 82C354 8BC760 93CB6B 9BCF77 8FC0BC A4D382 +ACD78E B4DB99 BCDFA4 9FC9C5 AFD2CF BFDBD9 C5E3AF CDE7BA D5EBC6 DEEFD1 CFE4E2 DFEDEC E6F3DD EEF7E8 EFF6F5 F7FBF4 +FFFFFF FC03FB 000000 FFFFFF > ] +/Mask 8 0 R +>> +stream +x\x9C\xED\x99ۖ\xAA0\x86Qd\xA4 +\xA8`\xEC\xE2\xFD_r\xD3#=\x80\xE3\xB6ef.\xF2_̂Z\xEBG\x92&)3 \x81@ \x81@ \x81@\xA0%u\x98\x89\xFC6\x87.\x82\xABe\xB1\xAE\x95\xEE\xA7)ݯ\xDF\xCB<^R\x86*\xCCg!vs\xEF_\xAF\xAC\xC8\xC1\xA4\x92\xB4\xE7\xBA\xFB \xB0\xBE:~&\x88\x8A\xA3qw_\x99\xAC+\xDE\x9B\x87\xC5+\x92\xA1\xEF^\xADD\xD7\xFB\xD8,F5n\xE8\xCD +d\xA4\xF22XC\xF3 \xE9\xC6\xDD\xDEr\xF8\xDD0\xAF\x9A\xD0p\xC8\xEE}\x93\x91\xB3Y\x9C\xB3t\x82\xE2\xAC\xADv\xBFv~F\x8B\xE3\xAA\xFF\x90\xA1c($Z\xE3I6\x9A +S@\\xC4\xD50^\xAC^ۓ\x8Bٍ]\x90\xF1O\xFD\x97\xD0F7\x8A\xCC\xD8S\xE4M\xD4-Lho\x905\x84\xDDr\xAA\xAF\xD5ϋY7ܫ\xBA'\xBC{ \x93KO4j#^O\x8A1\xF3\xD6b\xBF\xC9"wo\xB48\xC7v\xB5˃\xF4K\xFD\xF7}\xDA:\x8E.$\xB5\xECE\xF3@ջ\xEDʪ\x9E\xF5\xF0U\xD5\xF4ca\xCE\xEC\xFF\x9C;)\xAF\xA1=s\xE6\x8F6h\x95\xEAx\xBAB^>\xCE\xE2+V\xFEh\x93\xD9 +\xBD8@&.\xBE\xA4َƾ\xEA=\x830H_\x8E\xC5b9LzD\xE6ԟ\x83\xCB0%A\xA4\xA2\xF5\xE2\xD4wf |
From: <ba...@us...> - 2008-12-18 23:30:45
|
Revision: 1161 http://omc.svn.sourceforge.net/omc/?rev=1161&view=rev Author: bartw Date: 2008-12-18 23:30:39 +0000 (Thu, 18 Dec 2008) Log Message: ----------- changed version to prepare for release Modified Paths: -------------- cmpi-bindings/trunk/VERSION.cmake Modified: cmpi-bindings/trunk/VERSION.cmake =================================================================== --- cmpi-bindings/trunk/VERSION.cmake 2008-12-02 02:04:19 UTC (rev 1160) +++ cmpi-bindings/trunk/VERSION.cmake 2008-12-18 23:30:39 UTC (rev 1161) @@ -1,3 +1,3 @@ SET(VERSION_MAJOR "0") SET(VERSION_MINOR "4") -SET(VERSION_PATCH "0rc1") +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-12-02 02:04:21
|
Revision: 1160 http://omc.svn.sourceforge.net/omc/?rev=1160&view=rev Author: bartw Date: 2008-12-02 02:04:19 +0000 (Tue, 02 Dec 2008) Log Message: ----------- added Added Paths: ----------- cmpi-bindings/trunk/test/python/start.py Added: cmpi-bindings/trunk/test/python/start.py =================================================================== --- cmpi-bindings/trunk/test/python/start.py (rev 0) +++ cmpi-bindings/trunk/test/python/start.py 2008-12-02 02:04:19 UTC (rev 1160) @@ -0,0 +1,42 @@ +#!/usr/bin/env python + +import pywbem +from subprocess import call, Popen, PIPE +from time import sleep +import sys + +conn = pywbem.SFCBUDSConnection() +conn.default_namespace = 'root/interop' + +cnt = 0 +while True: + call('/etc/init.d/sfcb start', shell=True) + for i in xrange(0,20): + sleep(1) + try: + cnames = conn.EnumerateClassNames() + break; + except: + exc_class, exc, tb = sys.exc_info() + sys.stdout.write('.'); sys.stdout.flush() + sleep(1) + else: + raise exc_class, exc, tb + print '\nfetched %s classes' % len(cnames) + print cnt + cnt+= 1 + call('/etc/init.d/sfcb stop', shell=True) + for i in xrange(0,20): + po = Popen('ps ax | grep sfcbd | grep -v grep', shell=True, stdout=PIPE) + procs = po.stdout.read() + if po.wait() != 0: + break + sys.stdout.write('.'); sys.stdout.flush() + sleep(1) + else: + print '\nError: not all sfcbd processes stopped' + print procs + sys.exit(1) + + + This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-11-07 22:44:23
|
Revision: 1159 http://omc.svn.sourceforge.net/omc/?rev=1159&view=rev Author: bartw Date: 2008-11-07 22:44:18 +0000 (Fri, 07 Nov 2008) Log Message: ----------- fixed location of README in CMakeLists.txt Modified Paths: -------------- cmpi-bindings/trunk/CMakeLists.txt Modified: cmpi-bindings/trunk/CMakeLists.txt =================================================================== --- cmpi-bindings/trunk/CMakeLists.txt 2008-11-07 20:38:27 UTC (rev 1158) +++ cmpi-bindings/trunk/CMakeLists.txt 2008-11-07 22:44:18 UTC (rev 1159) @@ -48,7 +48,7 @@ SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Language Bindings for CMPI") SET(CPACK_PACKAGE_VENDOR "Novell Inc.") -SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/doc/README") +SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README") SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.BSD") SET(CPACK_PACKAGE_VERSION_MAJOR ${VERSION_MAJOR}) SET(CPACK_PACKAGE_VERSION_MINOR ${VERSION_MINOR}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-11-07 20:38:34
|
Revision: 1158 http://omc.svn.sourceforge.net/omc/?rev=1158&view=rev Author: bartw Date: 2008-11-07 20:38:27 +0000 (Fri, 07 Nov 2008) Log Message: ----------- added another check Modified Paths: -------------- cmpi-bindings/trunk/test/python/TestMethod_Test.py Modified: cmpi-bindings/trunk/test/python/TestMethod_Test.py =================================================================== --- cmpi-bindings/trunk/test/python/TestMethod_Test.py 2008-11-07 17:59:32 UTC (rev 1157) +++ cmpi-bindings/trunk/test/python/TestMethod_Test.py 2008-11-07 20:38:27 UTC (rev 1158) @@ -424,6 +424,7 @@ ra = 'one,two,three,four' rv, outs = self.conn.InvokeMethod('strSplit', 'Test_Method', str=ra, sep=',') + self.assertEquals(outs['nelems'], 4) self.assertEquals(outs['elems'], ra.split(',')) self.assertTrue(ra) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ba...@us...> - 2008-11-07 17:59:37
|
Revision: 1157 http://omc.svn.sourceforge.net/omc/?rev=1157&view=rev Author: bartw Date: 2008-11-07 17:59:32 +0000 (Fri, 07 Nov 2008) Log Message: ----------- change import order 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-11-07 15:37:40 UTC (rev 1156) +++ cmpi-bindings/trunk/swig/python/cmpi_pywbem_bindings.py 2008-11-07 17:59:32 UTC (rev 1157) @@ -31,15 +31,15 @@ # Author: Bart Whiteley <bwhiteley suse.de> -import cmpi - - from pywbem.cim_provider2 import ProviderProxy import pywbem import types import syslog import sys + +import cmpi + ##============================================================================== ## ## _exception_to_error() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jc...@us...> - 2008-11-07 15:37:52
|
Revision: 1156 http://omc.svn.sourceforge.net/omc/?rev=1156&view=rev Author: jcarey Date: 2008-11-07 15:37:40 +0000 (Fri, 07 Nov 2008) Log Message: ----------- Added code to avoid validation of properties if they are NULL Modified Paths: -------------- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c Modified: contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c =================================================================== --- contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2008-11-07 11:03:43 UTC (rev 1155) +++ contrib/xen-vm-builder/trunk/src/providers/vm-builder/vmcreation-data.c 2008-11-07 15:37:40 UTC (rev 1156) @@ -326,25 +326,29 @@ } /*****************************************************************************/ -static void +static int add_u8_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, const char* prop_name) { + int cc = 0; CMPIData data = CMGetProperty(instance, prop_name, NULL); if (!CMIsNullValue(data)) { char wkbfr[32]; snprintf(wkbfr, sizeof(wkbfr), "%u,", data.value.uint8); cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0); + cc = 1; } else { cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); } + return cc; } /*****************************************************************************/ -static void +static int add_u16_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, const char* prop_name, CMPIData *pdata, int endstmt) { + int cc = 0; CMPIData data; const char* pnnfmt; const char* pnullfmt; @@ -364,16 +368,19 @@ char wkbfr[32]; snprintf(wkbfr, sizeof(wkbfr), pnnfmt, pdata->value.uint16); cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0); + cc = 1; } else { cmpiutilStrBuf_cat(pstrbuf, pnullfmt, 0); } + return cc; } /*****************************************************************************/ -static void +static int add_u32_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, const char* prop_name, CMPIData* pdata) { + int cc = 0; CMPIData data; if (!pdata) { pdata = &data; @@ -384,16 +391,19 @@ char wkbfr[32]; snprintf(wkbfr, sizeof(wkbfr), "%u,", pdata->value.uint32); cmpiutilStrBuf_cat(pstrbuf, wkbfr, 0); + cc = 1; } else { cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); } + return cc; } /*****************************************************************************/ -static void +static int add_str_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, const char* prop_name, int endstmt) { + int cc = 0; CMPIData data; const char* pnnfmt; const char* pnullfmt; @@ -408,16 +418,19 @@ if (!CMIsNullValue(data)) { char *p = (char*) CMGetCharPtr(data.value.string); db_sql_insert(pstrbuf, pnnfmt, p); + cc = 1; } else { cmpiutilStrBuf_cat(pstrbuf, pnullfmt, 0); } + return cc; } /*****************************************************************************/ -static void +static int add_stra_prop_to_query(cmpiutilStrBuf* pstrbuf, const CMPIInstance* instance, const char* prop_name) { + int cc = 0; CMPIData data = CMGetProperty(instance, prop_name, NULL); if (!CMIsNullValue(data)) { cmpiutilStrBuf* lstrbuf = stringArray2Str(_broker, data.value.array); @@ -427,9 +440,11 @@ } else { cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); } + cc = 1; } else { cmpiutilStrBuf_cat(pstrbuf, "NULL,", 0); } + return cc; } @@ -708,7 +723,7 @@ /*****************************************************************************/ -void +int mod_add_u16_prop(cmpiutilStrArray* pstra, const CMPIInstance* modified_instance, const char* prop_name, const char** properties, CMPIData* pdata) { @@ -719,7 +734,7 @@ pdata = &data; } if (!get_mod_property(modified_instance, prop_name, properties, pdata)) { - return; + return 0; } if (!CMIsNullValue((*pdata))) { snprintf(wkbfr, sizeof(wkbfr), "%s=%u", prop_name, pdata->value.uint16); @@ -727,17 +742,18 @@ snprintf(wkbfr, sizeof(wkbfr), "%s=NULL", prop_name); } cmpiutilStrArray_append(pstra, wkbfr); + return 1; } /*****************************************************************************/ -void +int mod_add_u8_prop(cmpiutilStrArray* pstra, const CMPIInstance* modified_instance, const char* prop_name, const char** properties) { char wkbfr[256]; CMPIData data; if (!get_mod_property(modified_instance, prop_name, properties, &data)) { - return; + return 0; } if (!CMIsNullValue(data)) { snprintf(wkbfr, sizeof(wkbfr), "%s=%u", prop_name, data.value.uint8); @@ -745,16 +761,17 @@ snprintf(wkbfr, sizeof(wkbfr), "%s=NULL", prop_name); } cmpiutilStrArray_append(pstra, wkbfr); + return 1; } /*****************************************************************************/ -void +int mod_add_str_prop(cmpiutilStrArray* pstra, const CMPIInstance* modified_instance, const char* prop_name, const char** properties) { CMPIData data; if (!get_mod_property(modified_instance, prop_name, properties, &data)) { - return; + return 0; } if (!CMIsNullValue(data)) { char *p = (char*) CMGetCharPtr(data.value.string); @@ -766,16 +783,17 @@ snprintf(wkbfr, sizeof(wkbfr), "%s=NULL", prop_name); cmpiutilStrArray_append(pstra, wkbfr); } + return 1; } /*****************************************************************************/ -void +int mod_add_stra_prop(cmpiutilStrArray* pstra, const CMPIInstance* modified_instance, const char* prop_name, const char** properties) { CMPIData data; if (!get_mod_property(modified_instance, prop_name, properties, &data)) { - return; + return 0; } if (!CMIsNullValue(data)) { cmpiutilStrBuf* lstrbuf = stringArray2Str(_broker, data.value.array); @@ -794,10 +812,11 @@ snprintf(wkbfr, sizeof(wkbfr), "%s=NULL", prop_name); cmpiutilStrArray_append(pstra, wkbfr); } + return 1; } /*****************************************************************************/ -void +int mod_add_u32_prop(cmpiutilStrArray* pstra, const CMPIInstance* modified_instance, const char* prop_name, const char** properties, CMPIData* pdata) { @@ -808,7 +827,7 @@ pdata = &data; } if (!get_mod_property(modified_instance, prop_name, properties, pdata)) { - return; + return 0; } if (!CMIsNullValue((*pdata))) { snprintf(wkbfr, sizeof(wkbfr), "%s=%u", prop_name, pdata->value.uint32); @@ -816,6 +835,7 @@ snprintf(wkbfr, sizeof(wkbfr), "%s=NULL", prop_name); } cmpiutilStrArray_append(pstra, wkbfr); + return 1; } /****************************************************************************** @@ -897,20 +917,23 @@ return status; } - mod_add_u16_prop(pstra, modified_instance, "AutoMaticRecoveryAction", properties, &data); - if (valid_automatic_recovery_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "AutoMaticRecoveryAction", properties, &data)) { + if (valid_automatic_recovery_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - mod_add_u16_prop(pstra, modified_instance, "AutoMaticShutdownAction", properties, &data); - if (valid_automatic_shutdown_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "AutoMaticShutdownAction", properties, &data)) { + if (valid_automatic_shutdown_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - mod_add_u16_prop(pstra, modified_instance, "AutoMaticStartupAction", properties, &data); - if (valid_automatic_startup_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "AutoMaticStartupAction", properties, &data)) { + if (valid_automatic_startup_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } if (get_mod_property(modified_instance, "AutoMaticStartupActionDelay", properties, &data)) { if (!CMIsNullValue(data)) { @@ -932,10 +955,11 @@ "AutomaticStartupActionSequenceNumber", properties, NULL); mod_add_str_prop(pstra, modified_instance, "CPUArchitecture", properties); mod_add_str_prop(pstra, modified_instance, "Caption", properties); - mod_add_u16_prop(pstra, modified_instance, "ChangeableType", properties, &data); - if (valid_changeable_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "ChangeableType", properties, &data)) { + if (valid_changeable_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } mod_add_str_prop(pstra, modified_instance, "ConfigurationDataRoot", properties); mod_add_str_prop(pstra, modified_instance, "ConfigurationFile", properties); @@ -962,15 +986,17 @@ mod_add_str_prop(pstra, modified_instance, "ElementName", properties); mod_add_stra_prop(pstra, modified_instance, "ExtraConfigInfo", properties); mod_add_str_prop(pstra, modified_instance, "ExtraInstallArgs", properties); - mod_add_u32_prop(pstra, modified_instance, "GraphicsType", properties, &data); - if (valid_graphics_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u32_prop(pstra, modified_instance, "GraphicsType", properties, &data)) { + if (valid_graphics_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - mod_add_u32_prop(pstra, modified_instance, "GraphicsViewerType", properties, &data); - if (valid_graphics_viewer_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u32_prop(pstra, modified_instance, "GraphicsViewerType", properties, &data)) { + if (valid_graphics_viewer_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } mod_add_str_prop(pstra, modified_instance, "LogDataRoot", properties); mod_add_u32_prop(pstra, modified_instance, "MaxMemory", properties, NULL); @@ -978,10 +1004,11 @@ mod_add_stra_prop(pstra, modified_instance, "Nics", properties); mod_add_stra_prop(pstra, modified_instance, "Notes", properties); mod_add_u8_prop(pstra, modified_instance, "NumVCPUs", properties); - mod_add_u32_prop(pstra, modified_instance, "OSType", properties, &data); - if (valid_os_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u32_prop(pstra, modified_instance, "OSType", properties, &data)) { + if (valid_os_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } mod_add_str_prop(pstra, modified_instance, "RecoveryFile", properties); mod_add_str_prop(pstra, modified_instance, "ResponseFile", properties); @@ -991,32 +1018,32 @@ mod_add_str_prop(pstra, modified_instance, "SwapFileDataRoot", properties); mod_add_u32_prop(pstra, modified_instance, "VNCPort", properties, NULL); mod_add_str_prop(pstra, modified_instance, "VNCPassword", properties); - mod_add_u32_prop(pstra, modified_instance, "VirtType", properties, &data); - if (valid_virt_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u32_prop(pstra, modified_instance, "VirtType", properties, &data)) { + if (valid_virt_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } mod_add_str_prop(pstra, modified_instance, "VirtualSystemIdentifier", properties); mod_add_str_prop(pstra, modified_instance, "VirtualSystemType", properties); - - mod_add_u16_prop(pstra, modified_instance, "OnPowerOff", properties, &data); - if (valid_on_power_off(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "OnPowerOff", properties, &data)) { + if (valid_on_power_off(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - - mod_add_u16_prop(pstra, modified_instance, "OnReboot", properties, &data); - if (valid_on_reboot(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "OnReboot", properties, &data)) { + if (valid_on_reboot(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - - mod_add_u16_prop(pstra, modified_instance, "OnCrash", properties, &data); - if (valid_on_crash(&data, &status) != CMPI_RC_OK) { - cmpiutilStrArray_destroy(pstra); - return status; + if (mod_add_u16_prop(pstra, modified_instance, "OnCrash", properties, &data)) { + if (valid_on_crash(&data, &status) != CMPI_RC_OK) { + cmpiutilStrArray_destroy(pstra); + return status; + } } - pstrbuf = cmpiutilStrBuf_create(); if (!pstrbuf) { CMSetStatusWithChars(_broker, &status, CMPI_RC_ERROR_SYSTEM, @@ -1106,20 +1133,23 @@ cmpiutilStrBuf_cat(pstrbuf, ") VALUES (", 0); db_sql_insert(pstrbuf, "%Q,", iid); - add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticRecoveryAction", &data, 0); - if (valid_automatic_recovery_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticRecoveryAction", &data, 0)) { + if (valid_automatic_recovery_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } - add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticShutdownAction", &data, 0); - if (valid_automatic_shutdown_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticShutdownAction", &data, 0)) { + if (valid_automatic_shutdown_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } - add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticStartupAction", &data, 0); - if (valid_automatic_startup_action(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticStartupAction", &data, 0)) { + if (valid_automatic_startup_action(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } data = CMGetProperty(newinstance, "AutoMaticStartupActionDelay", NULL); if (!CMIsNullValue(data)) { @@ -1141,10 +1171,11 @@ add_u16_prop_to_query(pstrbuf, newinstance, "AutoMaticStartupActionSequenceNumber", NULL, 0); add_str_prop_to_query(pstrbuf, newinstance, "CPUArchitecture", 0); add_str_prop_to_query(pstrbuf, newinstance, "Caption", 0); - add_u16_prop_to_query(pstrbuf, newinstance, "ChangeableType", &data, 0); - if (valid_changeable_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "ChangeableType", &data, 0)) { + if (valid_changeable_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } add_str_prop_to_query(pstrbuf, newinstance, "ConfigurationDataRoot", 0); add_str_prop_to_query(pstrbuf, newinstance, "ConfigurationFile", 0); @@ -1173,15 +1204,17 @@ add_str_prop_to_query(pstrbuf, newinstance, "ElementName", 0); add_stra_prop_to_query(pstrbuf, newinstance, "ExtraConfigInfo"); add_str_prop_to_query(pstrbuf, newinstance, "ExtraInstallArgs", 0); - add_u32_prop_to_query(pstrbuf, newinstance, "GraphicsType", &data); - if (valid_graphics_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u32_prop_to_query(pstrbuf, newinstance, "GraphicsType", &data)) { + if (valid_graphics_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } - add_u32_prop_to_query(pstrbuf, newinstance, "GraphicsViewerType", &data); - if (valid_graphics_viewer_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u32_prop_to_query(pstrbuf, newinstance, "GraphicsViewerType", &data)) { + if (valid_graphics_viewer_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } add_str_prop_to_query(pstrbuf, newinstance, "LogDataRoot", 0); add_u32_prop_to_query(pstrbuf, newinstance, "MaxMemory", NULL); @@ -1189,10 +1222,11 @@ add_stra_prop_to_query(pstrbuf, newinstance, "Nics"); add_stra_prop_to_query(pstrbuf, newinstance, "Notes"); add_u8_prop_to_query(pstrbuf, newinstance, "NumVCPUs"); - add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data); - if (valid_os_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u32_prop_to_query(pstrbuf, newinstance, "OSType", &data)) { + if (valid_os_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } add_str_prop_to_query(pstrbuf, newinstance, "RecoveryFile", 0); add_str_prop_to_query(pstrbuf, newinstance, "ResponseFile", 0); @@ -1202,27 +1236,31 @@ add_str_prop_to_query(pstrbuf, newinstance, "SwapFileDataRoot", 0); add_u32_prop_to_query(pstrbuf, newinstance, "VNCPort", NULL); add_str_prop_to_query(pstrbuf, newinstance, "VNCPassword", 0); - add_u32_prop_to_query(pstrbuf, newinstance, "VirtType", &data); - if (valid_virt_type(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u32_prop_to_query(pstrbuf, newinstance, "VirtType", &data)) { + if (valid_virt_type(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } add_str_prop_to_query(pstrbuf, newinstance, "VirtualSystemIdentifier", 0); add_str_prop_to_query(pstrbuf, newinstance, "VirtualSystemType", 0); - add_u16_prop_to_query(pstrbuf, newinstance, "OnPowerOff", &data, 0); - if (valid_on_power_off(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "OnPowerOff", &data, 0)) { + if (valid_on_power_off(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } - add_u16_prop_to_query(pstrbuf, newinstance, "OnReboot", &data, 0); - if (valid_on_reboot(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "OnReboot", &data, 0)) { + if (valid_on_reboot(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } - add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1); - if (valid_on_crash(&data, &status) != CMPI_RC_OK) { - cmpiutilStrBuf_destroy(pstrbuf); - return status; + if (add_u16_prop_to_query(pstrbuf, newinstance, "OnCrash", &data, 1)) { + if (valid_on_crash(&data, &status) != CMPI_RC_OK) { + cmpiutilStrBuf_destroy(pstrbuf); + return status; + } } cmpiutilStrBuf_cat(pstrbuf, ");", 0); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-07 11:03:46
|
Revision: 1155 http://omc.svn.sourceforge.net/omc/?rev=1155&view=rev Author: kkaempf Date: 2008-11-07 11:03:43 +0000 (Fri, 07 Nov 2008) Log Message: ----------- don't call Py_DecRef on NULL Modified Paths: -------------- cmpi-bindings/trunk/src/target_python.c Modified: cmpi-bindings/trunk/src/target_python.c =================================================================== --- cmpi-bindings/trunk/src/target_python.c 2008-11-06 16:28:25 UTC (rev 1154) +++ cmpi-bindings/trunk/src/target_python.c 2008-11-07 11:03:43 UTC (rev 1155) @@ -295,9 +295,9 @@ } rc = pi != 0; cleanup: - Py_DecRef(pyargs); - Py_DecRef(pyfunc); - Py_DecRef(prv); + if (pyargs) Py_DecRef(pyargs); + if (pyfunc) Py_DecRef(pyfunc); + if (prv) Py_DecRef(prv); return rc; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <kk...@us...> - 2008-11-06 16:28:36
|
Revision: 1154 http://omc.svn.sourceforge.net/omc/?rev=1154&view=rev Author: kkaempf Date: 2008-11-06 16:28:25 +0000 (Thu, 06 Nov 2008) Log Message: ----------- add copyright notice Modified Paths: -------------- 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/target_perl.c =================================================================== --- cmpi-bindings/trunk/src/target_perl.c 2008-11-06 14:41:43 UTC (rev 1153) +++ cmpi-bindings/trunk/src/target_perl.c 2008-11-06 16:28:25 UTC (rev 1154) @@ -6,6 +6,37 @@ * Here: Perl */ +/***************************************************************************** +* Copyright (C) 2008 Novell Inc. All rights reserved. +* Copyright (C) 2008 SUSE Linux Products GmbH. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell Inc. nor of SUSE Linux Products GmbH nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL Novell Inc. OR SUSE Linux Products GmbH OR +* THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ + /* load <RB_BINDINGS_FILE>.pl */ #define PL_BINDINGS_FILE "cmpi_plwbem_bindings" Modified: cmpi-bindings/trunk/src/target_python.c =================================================================== --- cmpi-bindings/trunk/src/target_python.c 2008-11-06 14:41:43 UTC (rev 1153) +++ cmpi-bindings/trunk/src/target_python.c 2008-11-06 16:28:25 UTC (rev 1154) @@ -6,6 +6,36 @@ * Here: Python */ +/***************************************************************************** +* Copyright (C) 2008 Novell Inc. All rights reserved. +* Copyright (C) 2008 SUSE Linux Products GmbH. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell Inc. nor of SUSE Linux Products GmbH nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL Novell Inc. OR SUSE Linux Products GmbH OR +* THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ #include <Python.h> Modified: cmpi-bindings/trunk/src/target_ruby.c =================================================================== --- cmpi-bindings/trunk/src/target_ruby.c 2008-11-06 14:41:43 UTC (rev 1153) +++ cmpi-bindings/trunk/src/target_ruby.c 2008-11-06 16:28:25 UTC (rev 1154) @@ -6,6 +6,37 @@ * Here: Ruby */ +/***************************************************************************** +* Copyright (C) 2008 Novell Inc. All rights reserved. +* Copyright (C) 2008 SUSE Linux Products GmbH. All rights reserved. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions are met: +* +* - Redistributions of source code must retain the above copyright notice, +* this list of conditions and the following disclaimer. +* +* - Redistributions in binary form must reproduce the above copyright notice, +* this list of conditions and the following disclaimer in the documentation +* and/or other materials provided with the distribution. +* +* - Neither the name of Novell Inc. nor of SUSE Linux Products GmbH nor the +* names of its contributors may be used to endorse or promote products +* derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' +* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL Novell Inc. OR SUSE Linux Products GmbH OR +* THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +* WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +* OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF +* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +*****************************************************************************/ + /* load <RB_BINDINGS_FILE>.rb */ #define RB_BINDINGS_FILE "cmpi_rbwbem_bindings" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |