From cvincent at linux.vnet.ibm.com Tue May 3 16:37:47 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 03 May 2011 12:37:47 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] New test to test DiskPool autostart In-Reply-To: <1872aaa2378208e3359c.1302802581@elm3a148.beaverton.ibm.com> References: <1872aaa2378208e3359c.1302802581@elm3a148.beaverton.ibm.com> Message-ID: <4DC02F5B.2080203@linux.vnet.ibm.com> ResourcePoolConfigurationService - 15_DiskPoolAutostart.py: PASS +1 On 04/14/2011 01:36 PM, Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1302802477 25200 > # Node ID 1872aaa2378208e3359c7a32d809d78102506797 > # Parent 327294d1f3df451ec317e670580e7c60619c8b02 > [TEST] New test to test DiskPool autostart. > > Feature to Autostart DiskPool was added to libvirt-cim. > This cimtest tests that feature. > > Signed-off-by: Sharad Mishra > > diff -r 327294d1f3df -r 1872aaa23782 suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/15_DiskPoolAutostart.py > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/15_DiskPoolAutostart.py Thu Apr 14 10:34:37 2011 -0700 > @@ -0,0 +1,118 @@ > +#!/usr/bin/python > +# > +# Copyright 2011 IBM Corp. > +# > +# Authors: > +# Sharad Mishra > +# > +# > +# This library is free software; you can redistribute it and/or > +# modify it under the terms of the GNU General Public > +# License as published by the Free Software Foundation; either > +# version 2.1 of the License, or (at your option) any later version. > +# > +# This library is distributed in the hope that it will be useful, > +# but WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# General Public License for more details. > +# > +# You should have received a copy of the GNU General Public > +# License along with this library; if not, write to the Free Software > +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > +# > +# -Date: 04.14.2011 > + > +import sys > +from pywbem import cim_types > +from CimTest.Globals import logger > +from XenKvmLib.xm_virt_util import virsh_version > +from CimTest.ReturnCodes import FAIL, PASS, SKIP > +from XenKvmLib.const import do_main, platform_sup > +from XenKvmLib.classes import get_typed_class > +from XenKvmLib.common_util import destroy_diskpool > +from XenKvmLib.pool import create_pool, verify_pool, undefine_diskpool > +from XenKvmLib.const import get_provider_version > +from VirtLib import utils > + > +disk_pool_autostart_support=1087 > + > +def verify_autostart(server, key): > + cmd = "virsh pool-info %s 2>/dev/null" % key > + s, disk_xml = utils.run_remote(server, cmd) > + if s != 0: > + logger.error("Encountered error running command : %s", cmd) > + return FAIL > + > + disk = disk_xml.translate(None, ' ') > + val = disk.find("Autostart:yes") > + if val == -1: > + logger.error("Pool is NOT set to Autostart"); > + return FAIL > + > + return PASS > + > + > + at do_main(platform_sup) > +def main(): > + options = main.options > + server = options.ip > + virt = options.virt > + > + dp_types = { } > + > + libvirt_version = virsh_version(server, virt) > + if libvirt_version< "0.4.1": > + logger.info("Storage pool creation support is available in Libvirt " > + "version>= 0.4.1 , hence skipping the test....") > + return SKIP > + > + curr_cim_rev, changeset = get_provider_version(virt, server) > + if curr_cim_rev< disk_pool_autostart_support: > + logger.info("DiskPool Autostart support available in libvirt-cim" > + " version>= %s, hence skipping this test...", > + disk_pool_autostart_support) > + return SKIP > + > + status = FAIL > + pool_attr = None > + key = 'DISK_POOL_DIR' > + value = 1 > + try: > + logger.info("Verifying '%s'.....", key) > + test_pool = key > + pool_attr = { "Path" : "/var/lib/libvirt/images", > + "Autostart" : cim_types.Uint16(1) } > + > + status = create_pool(server, virt, test_pool, pool_attr, > + mode_type=value, pool_type= "DiskPool") > + > + if status != PASS: > + raise Exception("Failed to create '%s' type diskpool '%s'" \ > + % (key, test_pool)) > + > + status = verify_autostart(server, key) > + if status != PASS: > + destroy_diskpool(server, virt, test_pool) > + undefine_diskpool(server, virt, test_pool) > + raise Exception("Error in diskpool verification") > + > + status = destroy_diskpool(server, virt, test_pool) > + if status != PASS: > + raise Exception("Unable to destroy diskpool '%s'" \ > + % test_pool) > + > + status = undefine_diskpool(server, virt, test_pool) > + if status != PASS: > + raise Exception("Unable to undefine diskpool '%s'" \ > + % test_pool) > + > + status = PASS > + > + except Exception, details: > + status = FAIL > + logger.error("Exception details: %s", details) > + > + return status > + > +if __name__ == "__main__": > + sys.exit(main()) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Tue May 3 16:38:27 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 03 May 2011 12:38:27 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] Updating test case to remove check for "Reserved" value In-Reply-To: <4c8e0c673d796ae7a5e1.1302806577@elm3a148.beaverton.ibm.com> References: <4c8e0c673d796ae7a5e1.1302806577@elm3a148.beaverton.ibm.com> Message-ID: <4DC02F83.9070106@linux.vnet.ibm.com> ElementConforms - 01_forward.py: PASS +1 On 04/14/2011 02:42 PM, Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1302806505 25200 > # Node ID 4c8e0c673d796ae7a5e17ee771d935e449b77bce > # Parent 1872aaa2378208e3359c7a32d809d78102506797 > [TEST] Updating test case to remove check for "Reserved" value. > > This test creates a DiskPool and gets its pool info. Then reads it again using association. There is a delay in reading the two values and at times it is seen the these values change by few bytes. This patch will check for all StoragePool attributes except "Reserved". > > Signed-off-by: Sharad Mishra > > diff -r 1872aaa23782 -r 4c8e0c673d79 suites/libvirt-cim/cimtest/ElementConforms/01_forward.py > --- a/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Apr 14 10:34:37 2011 -0700 > +++ b/suites/libvirt-cim/cimtest/ElementConforms/01_forward.py Thu Apr 14 11:41:45 2011 -0700 > @@ -99,7 +99,16 @@ > elements = managed_ele_values[cn] > > for ele in elements: > - if assoc_val.items() == ele.items(): > + val1=assoc_val.items() > + # "Reserved" is the second attribute. > + # remove it. > + del val1[1] > + val2=ele.items() > + # "Reserved" is the second attribute. > + # remove it. > + del val2[1] > + # Now compare without "Reserved" > + if val1 == val2: > return PASS > > except Exception, details: > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From snmishra at us.ibm.com Tue May 3 18:41:58 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Tue, 3 May 2011 11:41:58 -0700 Subject: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications In-Reply-To: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> References: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> Message-ID: Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 04/28/2011 04:51:13 PM: > Chip Vincent > Sent by: libvirt-cim-bounces at redhat.com > > 04/28/2011 04:51 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > # HG changeset patch > # User Chip Vincent > # Date 1304034351 14400 > # Node ID 454ce8f30a13881cc6f5206d8e8e6f42a2ff8621 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Fix UUID in migration job lifecycle indications. > > Fixed the logic that fetches a VM UUID and adds it to the migration > job's InstanceIdentifier property. > > Siged-off-by: Chip Vincent > > diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c > +++ b/src/Virt_VSMigrationService.c > @@ -812,15 +812,20 @@ > CMPIInstance *ind = NULL; > CMPIInstance *prev_inst = NULL; > const char *pfx = NULL; > + virConnectPtr conn = NULL; > virDomainPtr dom = NULL; > char uuid[VIR_UUID_STRING_BUFLEN]; > CMPIDateTime *timestamp = NULL; > > + conn = connect_by_classname(_BROKER, job->ref_cn, s); > + if(conn == NULL) > + goto out; "out" will try to close a connection that has not been established yet. > + > ind_name = ind_type_to_name(ind_type); > > CU_DEBUG("Creating indication."); > > - pfx = pfx_from_conn(job->conn); > + pfx = pfx_from_conn(conn); > > ind = get_typed_instance(broker, > pfx, > @@ -832,13 +837,15 @@ > goto out; > } > > - dom = virDomainLookupByName(job->conn, job->domain); > - if(dom == NULL) { > - CU_DEBUG("Failed to connect to domain %s", job->domain); > + timestamp = CMNewDateTime(broker, s); > + CMSetProperty(ind, "IndicationTime", > + (CMPIValue *)×tamp, CMPI_dateTime); > + > + dom = virDomainLookupByName(conn, job->domain); > + if (dom == NULL) > goto out; > - } > > - if(virDomainGetUUIDString(dom, uuid) != 0) { > + if (virDomainGetUUIDString(dom, &uuid[0]) != 0) { Why are you doing "&uuid[0]" and why not just "&uuid" ? > CU_DEBUG("Failed to get UUID from domain name"); > goto out; > } > @@ -846,10 +853,6 @@ > CMSetProperty(ind, "IndicationIdentifier", > (CMPIValue *)uuid, CMPI_chars); > > - timestamp = CMNewDateTime(broker, s); > - CMSetProperty(ind, "IndicationTime", > - (CMPIValue *)×tamp, CMPI_dateTime); > - > if (ind_type == MIG_MODIFIED) { > /* Need to copy job inst before attaching as > PreviousInstance > because otherwise the changes we are about to make to job > @@ -867,6 +870,7 @@ > > out: > virDomainFree(dom); > + virConnectClose(conn); > return ind; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvincent at linux.vnet.ibm.com Tue May 3 19:21:13 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 03 May 2011 15:21:13 -0400 Subject: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications In-Reply-To: References: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> Message-ID: <4DC055A9.1030605@linux.vnet.ibm.com> > > Subject > > > > [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > > > # HG changeset patch > > # User Chip Vincent > > # Date 1304034351 14400 > > # Node ID 454ce8f30a13881cc6f5206d8e8e6f42a2ff8621 > > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > > Fix UUID in migration job lifecycle indications. > > > > Fixed the logic that fetches a VM UUID and adds it to the migration > > job's InstanceIdentifier property. > > > > Siged-off-by: Chip Vincent > > > > diff --git a/src/Virt_VSMigrationService.c > b/src/Virt_VSMigrationService.c > > --- a/src/Virt_VSMigrationService.c > > +++ b/src/Virt_VSMigrationService.c > > @@ -812,15 +812,20 @@ > > CMPIInstance *ind = NULL; > > CMPIInstance *prev_inst = NULL; > > const char *pfx = NULL; > > + virConnectPtr conn = NULL; > > virDomainPtr dom = NULL; > > char uuid[VIR_UUID_STRING_BUFLEN]; > > CMPIDateTime *timestamp = NULL; > > > > + conn = connect_by_classname(_BROKER, job->ref_cn, s); > > + if(conn == NULL) > > + goto out; > > "out" will try to close a connection that has not been established yet. This is the same pattern most of the providers use and virConnectClose() properly handles a NULL connection, much like free handles NULL. I prefer this approach as opposed to having multiple goto's for each failure scenario. > > > + > > ind_name = ind_type_to_name(ind_type); > > > > CU_DEBUG("Creating indication."); > > > > - pfx = pfx_from_conn(job->conn); > > + pfx = pfx_from_conn(conn); > > > > ind = get_typed_instance(broker, > > pfx, > > @@ -832,13 +837,15 @@ > > goto out; > > } > > > > - dom = virDomainLookupByName(job->conn, job->domain); > > - if(dom == NULL) { > > - CU_DEBUG("Failed to connect to domain %s", job->domain); > > + timestamp = CMNewDateTime(broker, s); > > + CMSetProperty(ind, "IndicationTime", > > + (CMPIValue *)×tamp, CMPI_dateTime); > > + > > + dom = virDomainLookupByName(conn, job->domain); > > + if (dom == NULL) > > goto out; > > - } > > > > - if(virDomainGetUUIDString(dom, uuid) != 0) { > > + if (virDomainGetUUIDString(dom, &uuid[0]) != 0) { > > Why are you doing "&uuid[0]" and why not just "&uuid" ? libvirt test case for this function used that notation, so I simply followed their lead regarding this style guideline. > > > CU_DEBUG("Failed to get UUID from domain name"); > > goto out; > > } > > @@ -846,10 +853,6 @@ > > CMSetProperty(ind, "IndicationIdentifier", > > (CMPIValue *)uuid, CMPI_chars); > > > > - timestamp = CMNewDateTime(broker, s); > > - CMSetProperty(ind, "IndicationTime", > > - (CMPIValue *)×tamp, CMPI_dateTime); > > - > > if (ind_type == MIG_MODIFIED) { > > /* Need to copy job inst before attaching as > > PreviousInstance > > because otherwise the changes we are about to make to job > > @@ -867,6 +870,7 @@ > > > > out: > > virDomainFree(dom); > > + virConnectClose(conn); > > return ind; > > } > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From snmishra at us.ibm.com Tue May 3 19:44:06 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Tue, 3 May 2011 12:44:06 -0700 Subject: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications In-Reply-To: <4DC055A9.1030605@linux.vnet.ibm.com> References: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> <4DC055A9.1030605@linux.vnet.ibm.com> Message-ID: I am okay with virConnectClose trying to close a NULL connection. I suggest we change to &uuid. Regards, Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/03/2011 12:21:13 PM: > Chip Vincent > Sent by: libvirt-cim-bounces at redhat.com > > 05/03/2011 12:21 PM > > Please respond to > cvincent at linux.vnet.ibm.com; Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > Re: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > > > > Subject > > > > > > [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > > > > > # HG changeset patch > > > # User Chip Vincent > > > # Date 1304034351 14400 > > > # Node ID 454ce8f30a13881cc6f5206d8e8e6f42a2ff8621 > > > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > > > Fix UUID in migration job lifecycle indications. > > > > > > Fixed the logic that fetches a VM UUID and adds it to the migration > > > job's InstanceIdentifier property. > > > > > > Siged-off-by: Chip Vincent > > > > > > diff --git a/src/Virt_VSMigrationService.c > > b/src/Virt_VSMigrationService.c > > > --- a/src/Virt_VSMigrationService.c > > > +++ b/src/Virt_VSMigrationService.c > > > @@ -812,15 +812,20 @@ > > > CMPIInstance *ind = NULL; > > > CMPIInstance *prev_inst = NULL; > > > const char *pfx = NULL; > > > + virConnectPtr conn = NULL; > > > virDomainPtr dom = NULL; > > > char uuid[VIR_UUID_STRING_BUFLEN]; > > > CMPIDateTime *timestamp = NULL; > > > > > > + conn = connect_by_classname(_BROKER, job->ref_cn, s); > > > + if(conn == NULL) > > > + goto out; > > > > "out" will try to close a connection that has not been established yet. > > This is the same pattern most of the providers use and virConnectClose() > properly handles a NULL connection, much like > free handles NULL. I prefer this approach as opposed to having > multiple goto's for each failure scenario. > > > > > > + > > > ind_name = ind_type_to_name(ind_type); > > > > > > CU_DEBUG("Creating indication."); > > > > > > - pfx = pfx_from_conn(job->conn); > > > + pfx = pfx_from_conn(conn); > > > > > > ind = get_typed_instance(broker, > > > pfx, > > > @@ -832,13 +837,15 @@ > > > goto out; > > > } > > > > > > - dom = virDomainLookupByName(job->conn, job->domain); > > > - if(dom == NULL) { > > > - CU_DEBUG("Failed to connect to domain %s", job->domain); > > > + timestamp = CMNewDateTime(broker, s); > > > + CMSetProperty(ind, "IndicationTime", > > > + (CMPIValue *)×tamp, CMPI_dateTime); > > > + > > > + dom = virDomainLookupByName(conn, job->domain); > > > + if (dom == NULL) > > > goto out; > > > - } > > > > > > - if(virDomainGetUUIDString(dom, uuid) != 0) { > > > + if (virDomainGetUUIDString(dom, &uuid[0]) != 0) { > > > > Why are you doing "&uuid[0]" and why not just "&uuid" ? > > libvirt test case for this function used that notation, so I simply > followed their lead regarding this style guideline. > > > > > > CU_DEBUG("Failed to get UUID from domain name"); > > > goto out; > > > } > > > @@ -846,10 +853,6 @@ > > > CMSetProperty(ind, "IndicationIdentifier", > > > (CMPIValue *)uuid, CMPI_chars); > > > > > > - timestamp = CMNewDateTime(broker, s); > > > - CMSetProperty(ind, "IndicationTime", > > > - (CMPIValue *)×tamp, CMPI_dateTime); > > > - > > > if (ind_type == MIG_MODIFIED) { > > > /* Need to copy job inst before attaching as > > > PreviousInstance > > > because otherwise the changes we are about to make to job > > > @@ -867,6 +870,7 @@ > > > > > > out: > > > virDomainFree(dom); > > > + virConnectClose(conn); > > > return ind; > > > } > > > > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > > > > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > -- > Chip Vincent > Open Virtualization > IBM Linux Technology Center > cvincent at linux.vnet.ibm.com > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From eblima at linux.vnet.ibm.com Wed May 4 20:24:28 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Wed, 04 May 2011 17:24:28 -0300 Subject: [Libvirt-cim] [PATCH] Configure: Check for libuuid Message-ID: <662adcc6b7d033ccfba6.1304540668@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1304539509 10800 # Node ID 662adcc6b7d033ccfba6ce5471ab0c13e0f34235 # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 Configure: Check for libuuid This patch introduces a macro in acinclude.m4 to check for libuuid development files and fixes the build accordingly. diff -r 8b428df21c36 -r 662adcc6b7d0 acinclude.m4 --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 +++ b/acinclude.m4 Wed May 04 17:05:09 2011 -0300 @@ -238,10 +238,24 @@ AC_DEFUN([CHECK_LIBVIRT], [ PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + AC_SUBST([LIBVIRT_CFLAGS]) + AC_SUBST([LIBVIRT_LIBS]) CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" ]) +AC_DEFUN([CHECK_LIBUUID], + [ + PKG_CHECK_MODULES([LIBUUID], [uuid], [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) + if test "$LIBUUID_FOUND" = "no" ; then + AC_MSG_ERROR([libuuid development files required]) + fi + AC_SUBST([LIBUUID_CFLAGS]) + AC_SUBST([LIBUUID_LIBS]) + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" + ]) + # A convenience macro that spits out a fail message for a particular test # # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) diff -r 8b428df21c36 -r 662adcc6b7d0 configure.ac --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 +++ b/configure.ac Wed May 04 17:05:09 2011 -0300 @@ -148,10 +148,14 @@ # Check for presense of a CIM server (this macro is defined in acinclude.m4) CHECK_CIMSERVER +# Check pkg-config program +PKG_PROG_PKG_CONFIG + # Check for presence of libraries CHECK_LIBVIRT CHECK_LIBXML2 CHECK_LIBCU +CHECK_LIBUUID CFLAGS_STRICT="-Werror" diff -r 8b428df21c36 -r 662adcc6b7d0 libxkutil/Makefile.am --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/Makefile.am Wed May 04 17:05:09 2011 -0300 @@ -1,7 +1,6 @@ # Copyright IBM Corp. 2007 SUBDIRS = tests - CFLAGS += $(CFLAGS_STRICT) noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ @@ -9,14 +8,14 @@ lib_LTLIBRARIES = libxkutil.la -AM_LDFLAGS = -lvirt -luuid - libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ xmlgen.c infostore.c pool_parsing.c +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ + @LIBUUID_LIBS@ + noinst_PROGRAMS = xml_parse_test xml_parse_test_SOURCES = xml_parse_test.c -xml_parse_test_LDADD = -lvirt -xml_parse_test_LDFLAGS = libxkutil.la -xml_parse_test_DEPENDENCIES = libxkutil.la +xml_parse_test_LDADD = libxkutil.la \ + @LIBVIRT_LIBS@ diff -r 8b428df21c36 -r 662adcc6b7d0 libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/xmlgen.c Wed May 04 17:05:09 2011 -0300 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff -r 8b428df21c36 -r 662adcc6b7d0 src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Wed May 04 17:05:09 2011 -0300 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include diff -r 8b428df21c36 -r 662adcc6b7d0 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Wed May 04 17:05:09 2011 -0300 @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff -r 8b428df21c36 -r 662adcc6b7d0 src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Wed May 04 17:05:09 2011 -0300 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include From cvincent at linux.vnet.ibm.com Fri May 6 00:48:05 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 05 May 2011 20:48:05 -0400 Subject: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications In-Reply-To: References: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> <4DC055A9.1030605@linux.vnet.ibm.com> Message-ID: <4DC34545.5020408@linux.vnet.ibm.com> Sharad, I finally got a chance to try your suggestion and it did not work correctly. Virt_VSMigrationService.c: In function ?prepare_indication?: Virt_VSMigrationService.c:848: error: passing argument 2 of ?virDomainGetUUIDString? from incompatible pointer type /usr/include/libvirt/libvirt.h:678: note: expected ?char *? but argument is of type ?char (*)[37]? This is because '&uuid[0]' is equivalent to &(*uuid), not &uuid. On 05/03/2011 03:44 PM, Sharad Mishra wrote: > I am okay with virConnectClose trying to close a NULL connection. > I suggest we change to &uuid. > > Regards, > Sharad Mishra > Open Virtualization > Linux Technology Center > IBM > > libvirt-cim-bounces at redhat.com wrote on 05/03/2011 12:21:13 PM: > > > Chip Vincent > > Sent by: libvirt-cim-bounces at redhat.com > > > > 05/03/2011 12:21 PM > > > > Please respond to > > cvincent at linux.vnet.ibm.com; Please respond to > > List for discussion and development of libvirt CIM > > > > > To > > > > libvirt-cim at redhat.com > > > > cc > > > > Subject > > > > Re: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > > > > > > > Subject > > > > > > > > [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications > > > > > > > > # HG changeset patch > > > > # User Chip Vincent > > > > # Date 1304034351 14400 > > > > # Node ID 454ce8f30a13881cc6f5206d8e8e6f42a2ff8621 > > > > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > > > > Fix UUID in migration job lifecycle indications. > > > > > > > > Fixed the logic that fetches a VM UUID and adds it to the migration > > > > job's InstanceIdentifier property. > > > > > > > > Siged-off-by: Chip Vincent > > > > > > > > diff --git a/src/Virt_VSMigrationService.c > > > b/src/Virt_VSMigrationService.c > > > > --- a/src/Virt_VSMigrationService.c > > > > +++ b/src/Virt_VSMigrationService.c > > > > @@ -812,15 +812,20 @@ > > > > CMPIInstance *ind = NULL; > > > > CMPIInstance *prev_inst = NULL; > > > > const char *pfx = NULL; > > > > + virConnectPtr conn = NULL; > > > > virDomainPtr dom = NULL; > > > > char uuid[VIR_UUID_STRING_BUFLEN]; > > > > CMPIDateTime *timestamp = NULL; > > > > > > > > + conn = connect_by_classname(_BROKER, job->ref_cn, s); > > > > + if(conn == NULL) > > > > + goto out; > > > > > > "out" will try to close a connection that has not been established yet. > > > > This is the same pattern most of the providers use and virConnectClose() > > properly handles a NULL connection, much like > > free handles NULL. I prefer this approach as opposed to having > > multiple goto's for each failure scenario. > > > > > > > > > + > > > > ind_name = ind_type_to_name(ind_type); > > > > > > > > CU_DEBUG("Creating indication."); > > > > > > > > - pfx = pfx_from_conn(job->conn); > > > > + pfx = pfx_from_conn(conn); > > > > > > > > ind = get_typed_instance(broker, > > > > pfx, > > > > @@ -832,13 +837,15 @@ > > > > goto out; > > > > } > > > > > > > > - dom = virDomainLookupByName(job->conn, job->domain); > > > > - if(dom == NULL) { > > > > - CU_DEBUG("Failed to connect to domain %s", job->domain); > > > > + timestamp = CMNewDateTime(broker, s); > > > > + CMSetProperty(ind, "IndicationTime", > > > > + (CMPIValue *)×tamp, CMPI_dateTime); > > > > + > > > > + dom = virDomainLookupByName(conn, job->domain); > > > > + if (dom == NULL) > > > > goto out; > > > > - } > > > > > > > > - if(virDomainGetUUIDString(dom, uuid) != 0) { > > > > + if (virDomainGetUUIDString(dom, &uuid[0]) != 0) { > > > > > > Why are you doing "&uuid[0]" and why not just "&uuid" ? > > > > libvirt test case for this function used that notation, so I simply > > followed their lead regarding this style guideline. > > > > > > > > > CU_DEBUG("Failed to get UUID from domain name"); > > > > goto out; > > > > } > > > > @@ -846,10 +853,6 @@ > > > > CMSetProperty(ind, "IndicationIdentifier", > > > > (CMPIValue *)uuid, CMPI_chars); > > > > > > > > - timestamp = CMNewDateTime(broker, s); > > > > - CMSetProperty(ind, "IndicationTime", > > > > - (CMPIValue *)×tamp, CMPI_dateTime); > > > > - > > > > if (ind_type == MIG_MODIFIED) { > > > > /* Need to copy job inst before attaching as > > > > PreviousInstance > > > > because otherwise the changes we are about to make to job > > > > @@ -867,6 +870,7 @@ > > > > > > > > out: > > > > virDomainFree(dom); > > > > + virConnectClose(conn); > > > > return ind; > > > > } > > > > > > > > _______________________________________________ > > > > Libvirt-cim mailing list > > > > Libvirt-cim at redhat.com > > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > > > > > > > > > _______________________________________________ > > > Libvirt-cim mailing list > > > Libvirt-cim at redhat.com > > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > -- > > Chip Vincent > > Open Virtualization > > IBM Linux Technology Center > > cvincent at linux.vnet.ibm.com > > _______________________________________________ > > Libvirt-cim mailing list > > Libvirt-cim at redhat.com > > https://www.redhat.com/mailman/listinfo/libvirt-cim > > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 6 01:23:27 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 05 May 2011 21:23:27 -0400 Subject: [Libvirt-cim] [PATCH] Fix UUID in migration job lifecycle indications In-Reply-To: <4DC34545.5020408@linux.vnet.ibm.com> References: <454ce8f30a13881cc6f5.1304034673@oc0840652111.ibm.com> <4DC055A9.1030605@linux.vnet.ibm.com> <4DC34545.5020408@linux.vnet.ibm.com> Message-ID: <4DC34D8F.2030806@linux.vnet.ibm.com> Please disregard. You made a typo and I'm sleepy... Using just 'uuid' is sufficient. Will post updated patch shortly. >> > > Why are you doing "&uuid[0]" and why not just "&uuid" ? >> > >> > libvirt test case for this function used that notation, so I simply >> > followed their lead regarding this style guideline. >> > -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 6 01:25:36 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Thu, 05 May 2011 21:25:36 -0400 Subject: [Libvirt-cim] [PATCH] (#2) Fix UUID in migration job lifecycle indications Message-ID: <2f8763c53407a186968a.1304645136@oc0840652111.ibm.com> # HG changeset patch # User Chip Vincent # Date 1304034351 14400 # Node ID 2f8763c53407a186968adf1edc9a2f2a1adbc00e # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 (#2) Fix UUID in migration job lifecycle indications. Fixed the logic that fetches a VM UUID and adds it to the migration job's InstanceIdentifier property. Siged-off-by: Chip Vincent diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c +++ b/src/Virt_VSMigrationService.c @@ -812,15 +812,20 @@ CMPIInstance *ind = NULL; CMPIInstance *prev_inst = NULL; const char *pfx = NULL; + virConnectPtr conn = NULL; virDomainPtr dom = NULL; char uuid[VIR_UUID_STRING_BUFLEN]; CMPIDateTime *timestamp = NULL; + conn = connect_by_classname(_BROKER, job->ref_cn, s); + if(conn == NULL) + goto out; + ind_name = ind_type_to_name(ind_type); CU_DEBUG("Creating indication."); - pfx = pfx_from_conn(job->conn); + pfx = pfx_from_conn(conn); ind = get_typed_instance(broker, pfx, @@ -832,13 +837,15 @@ goto out; } - dom = virDomainLookupByName(job->conn, job->domain); - if(dom == NULL) { - CU_DEBUG("Failed to connect to domain %s", job->domain); + timestamp = CMNewDateTime(broker, s); + CMSetProperty(ind, "IndicationTime", + (CMPIValue *)×tamp, CMPI_dateTime); + + dom = virDomainLookupByName(conn, job->domain); + if (dom == NULL) goto out; - } - if(virDomainGetUUIDString(dom, uuid) != 0) { + if (virDomainGetUUIDString(dom, uuid) != 0) { CU_DEBUG("Failed to get UUID from domain name"); goto out; } @@ -846,10 +853,6 @@ CMSetProperty(ind, "IndicationIdentifier", (CMPIValue *)uuid, CMPI_chars); - timestamp = CMNewDateTime(broker, s); - CMSetProperty(ind, "IndicationTime", - (CMPIValue *)×tamp, CMPI_dateTime); - if (ind_type == MIG_MODIFIED) { /* Need to copy job inst before attaching as PreviousInstance because otherwise the changes we are about to make to job @@ -867,6 +870,7 @@ out: virDomainFree(dom); + virConnectClose(conn); return ind; } From eblima at linux.vnet.ibm.com Mon May 9 18:46:20 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 09 May 2011 15:46:20 -0300 Subject: [Libvirt-cim] [PATCH] [PATCH v2] Configure: Check for libuuid Message-ID: <0c20e785881a6eb43dee.1304966780@etrunko-t410.br.ibm.com> This patch introduces a macro in acinclude.m4 to check for libuuid development files and fixes the build accordingly. Signed-off-by: Eduardo Lima (Etrunko) --- acinclude.m4 | 19 +++++++++++++++++++ configure.ac | 4 ++++ libxkutil/Makefile.am | 11 +++++------ libxkutil/xmlgen.c | 2 +- src/Virt_SettingsDefineCapabilities.c | 2 +- src/Virt_VSMigrationService.c | 2 +- src/Virt_VirtualSystemSnapshotService.c | 2 +- 7 files changed, 32 insertions(+), 10 deletions(-) mode change 100755 => 100644 acinclude.m4 mode change 100755 => 100644 configure.ac mode change 100755 => 100644 libxkutil/Makefile.am mode change 100755 => 100644 libxkutil/xmlgen.c mode change 100755 => 100644 src/Virt_SettingsDefineCapabilities.c mode change 100755 => 100644 src/Virt_VSMigrationService.c mode change 100755 => 100644 src/Virt_VirtualSystemSnapshotService.c -------------- next part -------------- A non-text attachment was scrubbed... Name: libvirt-cim.orig.patch Type: text/x-patch Size: 5167 bytes Desc: not available URL: From snmishra at us.ibm.com Mon May 9 19:59:25 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Mon, 9 May 2011 12:59:25 -0700 Subject: [Libvirt-cim] [PATCH] [PATCH v2] Configure: Check for libuuid In-Reply-To: <0c20e785881a6eb43dee.1304966780@etrunko-t410.br.ibm.com> References: <0c20e785881a6eb43dee.1304966780@etrunko-t410.br.ibm.com> Message-ID: Eduardo, Please resend this patch inline and not as an attachment. Also the subject line should read something like this - "[Libvirt-cim][PATCH](# 2) Configure: Check for libuuid" And in your description before the line "Signed-off-by:" mention what changed from v1. Thanks Sharad Mishra Open Virtualization Linux Technology Center IBM "Eduardo Lima \(Etrunko\)" libvirt-cim at redhat.com Sent by: cc libvirt-cim-bounc es at redhat.com Subject [Libvirt-cim] [PATCH] [PATCH v2] Configure: Check for libuuid 05/09/2011 11:46 AM Please respond to List for discussion and development of libvirt CIM This patch introduces a macro in acinclude.m4 to check for libuuid development files and fixes the build accordingly. Signed-off-by: Eduardo Lima (Etrunko) --- acinclude.m4 | 19 +++++++++++++++++++ configure.ac | 4 ++++ libxkutil/Makefile.am | 11 +++++------ libxkutil/xmlgen.c | 2 +- src/Virt_SettingsDefineCapabilities.c | 2 +- src/Virt_VSMigrationService.c | 2 +- src/Virt_VirtualSystemSnapshotService.c | 2 +- 7 files changed, 32 insertions(+), 10 deletions(-) mode change 100755 => 100644 acinclude.m4 mode change 100755 => 100644 configure.ac mode change 100755 => 100644 libxkutil/Makefile.am mode change 100755 => 100644 libxkutil/xmlgen.c mode change 100755 => 100644 src/Virt_SettingsDefineCapabilities.c mode change 100755 => 100644 src/Virt_VSMigrationService.c mode change 100755 => 100644 src/Virt_VirtualSystemSnapshotService.c [attachment "libvirt-cim.orig.patch" deleted by Sharad Mishra/Beaverton/IBM] _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic08364.gif Type: image/gif Size: 1255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From eblima at linux.vnet.ibm.com Mon May 9 20:03:40 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 09 May 2011 17:03:40 -0300 Subject: [Libvirt-cim] [PATCH] [PATCH v2] Configure: Check for libuuid In-Reply-To: References: <0c20e785881a6eb43dee.1304966780@etrunko-t410.br.ibm.com> Message-ID: <4DC8489C.5070100@linux.vnet.ibm.com> On 05/09/2011 04:59 PM, Sharad Mishra wrote: > Eduardo, > > Please resend this patch inline and not as an attachment. > Also the subject line should read something like this - > "[Libvirt-cim][PATCH](# 2) Configure: Check for libuuid" > And in your description before the line "Signed-off-by:" mention what > changed from v1. Thanks for the advice, I am still having a hard time learning mercurial. I'll work on the patch and send back to the list. Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Mon May 9 20:14:42 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 09 May 2011 17:14:42 -0300 Subject: [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid Message-ID: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> A non-text attachment was scrubbed... Name: libvirt-cim.orig.patch Type: text/x-patch Size: 4351 bytes Desc: not available URL: From snmishra at us.ibm.com Mon May 9 20:20:27 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Mon, 9 May 2011 13:20:27 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid In-Reply-To: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> References: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> Message-ID: Formatting is perfect. Will review later and provide feedback. Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/09/2011 01:14:42 PM: > "Eduardo Lima \(Etrunko\)" > Sent by: libvirt-cim-bounces at redhat.com > > 05/09/2011 01:14 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid > > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1304971973 10800 > # Node ID 8ec3cf0d005f5325cfd408c986853b3489404233 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Configure: Check for libuuid > > This patch introduces a macro in acinclude.m4 to check for libuuid > development files and fixes the build accordingly. > > Changes from v1: > Added specific check for libuuid version < 1.41.2 > > diff -r 8b428df21c36 -r 8ec3cf0d005f acinclude.m4 > --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 > +++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300 > @@ -238,10 +238,29 @@ > AC_DEFUN([CHECK_LIBVIRT], > [ > PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) > + AC_SUBST([LIBVIRT_CFLAGS]) > + AC_SUBST([LIBVIRT_LIBS]) > CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" > LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" > ]) > > +AC_DEFUN([CHECK_LIBUUID], > + [ > + PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2], > [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + PKG_CHECK_MODULES([LIBUUID], [uuid], [LIBUUID_FOUND=yes], > [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + AC_MSG_ERROR([libuuid development files required]) > + else > + LIBUUID_CFLAGS+=" -I$(pkg-config -- > variable=includedir uuid)/uuid " > + fi > + fi > + AC_SUBST([LIBUUID_CFLAGS]) > + AC_SUBST([LIBUUID_LIBS]) > + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" > + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" > + ]) > + > # A convenience macro that spits out a fail message for a particular test > # > # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) > diff -r 8b428df21c36 -r 8ec3cf0d005f configure.ac > --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 > +++ b/configure.ac Mon May 09 17:12:53 2011 -0300 > @@ -148,10 +148,14 @@ > # Check for presense of a CIM server (this macro is defined in acinclude.m4) > CHECK_CIMSERVER > > +# Check pkg-config program > +PKG_PROG_PKG_CONFIG > + > # Check for presence of libraries > CHECK_LIBVIRT > CHECK_LIBXML2 > CHECK_LIBCU > +CHECK_LIBUUID > > CFLAGS_STRICT="-Werror" > > diff -r 8b428df21c36 -r 8ec3cf0d005f libxkutil/Makefile.am > --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300 > @@ -1,7 +1,6 @@ > # Copyright IBM Corp. 2007 > SUBDIRS = tests > > - > CFLAGS += $(CFLAGS_STRICT) > > noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h > infostore.h \ > @@ -9,14 +8,14 @@ > > lib_LTLIBRARIES = libxkutil.la > > -AM_LDFLAGS = -lvirt -luuid > - > libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ > xmlgen.c infostore.c pool_parsing.c > > +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ > + @LIBUUID_LIBS@ > + > noinst_PROGRAMS = xml_parse_test > > xml_parse_test_SOURCES = xml_parse_test.c > -xml_parse_test_LDADD = -lvirt > -xml_parse_test_LDFLAGS = libxkutil.la > -xml_parse_test_DEPENDENCIES = libxkutil.la > +xml_parse_test_LDADD = libxkutil.la \ > + @LIBVIRT_LIBS@ > diff -r 8b428df21c36 -r 8ec3cf0d005f libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300 > @@ -22,7 +22,7 @@ > #include > #include > #include > -#include > +#include > > #include > #include > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_SettingsDefineCapabilities.c > --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300 > @@ -26,7 +26,7 @@ > #include > #include > #include > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300 > @@ -29,7 +29,7 @@ > #include > #include > > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_VirtualSystemSnapshotService.c > --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300 > @@ -24,7 +24,7 @@ > #include > #include > > -#include > +#include > > #include > #include > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From Mohan.Sundar at lntinfotech.com Tue May 10 05:37:32 2011 From: Mohan.Sundar at lntinfotech.com (Mohan Sundar) Date: Tue, 10 May 2011 11:07:32 +0530 Subject: [Libvirt-cim] reg: CIM Classes availability Message-ID: Hi all, I am trying to manage KVM remotely through Libvirt & CIM. I have Libvirt-CIM Providers and OpenPegasus CIMOM to acheive the same. When i tried to get the below values , i could not find any CIM or Libvirt-CIM classes for it. 1. IPSubnet Mask of Host machine 2. DefaultIPGateway of Host machine 3. MACAddress of Guest machines 4. Os Details of Guest Machines [ I need to know the CIM class for achieving this as well as Libvirt API methods to achieve the same.] Thanks in advance Mohan Sundar ________________________________ The contents of this e-mail and any attachment(s) may contain confidential or privileged information for the intended recipient(s). Unintended recipients are prohibited from taking action on the basis of information in this e-mail and using or disseminating the information, and must notify the sender and delete it from their system. L&T Infotech will not accept responsibility or liability for the accuracy or completeness of, or the presence of any virus or disabling code in this e-mail" ______________________________________________________________________ -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: image001.gif Type: image/gif Size: 92 bytes Desc: image001.gif URL: From cvincent at linux.vnet.ibm.com Wed May 11 16:39:43 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 11 May 2011 12:39:43 -0400 Subject: [Libvirt-cim] [PATCH] Ensure graphics devices have unique IDs Message-ID: <90f8c9f2388e0563baa3.1305131983@oc0840652111.ibm.com> # HG changeset patch # User Chip Vincent # Date 1305131981 14400 # Node ID 90f8c9f2388e0563baa311c84024ca41a61e1890 # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 Ensure graphics devices have unique IDs Now that multiple graphics device types are supported, it important that they have unique names that are consistent over time. This patch updates the graphics->id to replace 'graphics' with for vnc and : for serial/console. The port is ommitted from vnc connections because it changes when VM started if autoport is enabled and only one connection is currently supported. The source path is ommitted from serial/console connections because it is present only when the VM is running. Since libvirt limits the number of serial/console pty resources and ensures they have unique ports, the source path is not necessary to ensure consistent unique names. Examples of new graphics id format: InstanceID="test_domain/serial:0" InstanceID="test_domain/serial:1" InstanceID="test_domain/console:0" InstanceID="test_domain/vnc" Signed-off-by: Chip Vincent diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c +++ b/libxkutil/device_parsing.c @@ -503,6 +503,7 @@ struct virt_device *vdev = NULL; struct graphics_device *gdev = NULL; xmlNode *child = NULL; + int ret; vdev = calloc(1, sizeof(*vdev)); if (vdev == NULL) @@ -547,14 +548,16 @@ } vdev->type = CIM_RES_TYPE_GRAPHICS; - vdev->id = strdup("graphics"); + + if (STREQC(gdev->type, "vnc")) + ret = asprintf(&vdev->id, "%s", gdev->type); + else + ret = asprintf(&vdev->id, "%s:%s", gdev->type, gdev->port); - /* FIXME: IDs should be unique, but that breaks existing tests. - ret = asprintf(&vdev->id, "graphics:%s", gdev->type); - if(ret == -1) { + if (ret == -1) { CU_DEBUG("Failed to create graphics is string"); goto err; - } */ + } *vdevs = vdev; From snmishra at us.ibm.com Wed May 11 19:07:59 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Wed, 11 May 2011 12:07:59 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Fix UUID in migration job lifecycle indications In-Reply-To: <2f8763c53407a186968a.1304645136@oc0840652111.ibm.com> References: <2f8763c53407a186968a.1304645136@oc0840652111.ibm.com> Message-ID: test failed. Please work with originator and resubmit the updated patch. Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/05/2011 06:25:36 PM: > Chip Vincent > Sent by: libvirt-cim-bounces at redhat.com > > 05/05/2011 06:25 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] (#2) Fix UUID in migration job lifecycle indications > > # HG changeset patch > # User Chip Vincent > # Date 1304034351 14400 > # Node ID 2f8763c53407a186968adf1edc9a2f2a1adbc00e > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > (#2) Fix UUID in migration job lifecycle indications. > > Fixed the logic that fetches a VM UUID and adds it to the migration > job's InstanceIdentifier property. > > Siged-off-by: Chip Vincent > > diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c > +++ b/src/Virt_VSMigrationService.c > @@ -812,15 +812,20 @@ > CMPIInstance *ind = NULL; > CMPIInstance *prev_inst = NULL; > const char *pfx = NULL; > + virConnectPtr conn = NULL; > virDomainPtr dom = NULL; > char uuid[VIR_UUID_STRING_BUFLEN]; > CMPIDateTime *timestamp = NULL; > > + conn = connect_by_classname(_BROKER, job->ref_cn, s); > + if(conn == NULL) > + goto out; > + > ind_name = ind_type_to_name(ind_type); > > CU_DEBUG("Creating indication."); > > - pfx = pfx_from_conn(job->conn); > + pfx = pfx_from_conn(conn); > > ind = get_typed_instance(broker, > pfx, > @@ -832,13 +837,15 @@ > goto out; > } > > - dom = virDomainLookupByName(job->conn, job->domain); > - if(dom == NULL) { > - CU_DEBUG("Failed to connect to domain %s", job->domain); > + timestamp = CMNewDateTime(broker, s); > + CMSetProperty(ind, "IndicationTime", > + (CMPIValue *)×tamp, CMPI_dateTime); > + > + dom = virDomainLookupByName(conn, job->domain); > + if (dom == NULL) > goto out; > - } > > - if(virDomainGetUUIDString(dom, uuid) != 0) { > + if (virDomainGetUUIDString(dom, uuid) != 0) { > CU_DEBUG("Failed to get UUID from domain name"); > goto out; > } > @@ -846,10 +853,6 @@ > CMSetProperty(ind, "IndicationIdentifier", > (CMPIValue *)uuid, CMPI_chars); > > - timestamp = CMNewDateTime(broker, s); > - CMSetProperty(ind, "IndicationTime", > - (CMPIValue *)×tamp, CMPI_dateTime); > - > if (ind_type == MIG_MODIFIED) { > /* Need to copy job inst before attaching as > PreviousInstance > because otherwise the changes we are about to make to job > @@ -867,6 +870,7 @@ > > out: > virDomainFree(dom); > + virConnectClose(conn); > return ind; > } > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From snmishra at us.ibm.com Fri May 13 04:57:09 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Thu, 12 May 2011 22:57:09 -0600 Subject: [Libvirt-cim] reg: CIM Classes availability In-Reply-To: References: Message-ID: Mohan, Once you have libvirt-cim, libvirt, libcmpiutil and cimom setup on you host, you can use a CIM browser or wbemcli query to get the info. Attached is an output of wbemcli ei -nl http://root:@localhost:15988/root/virt:KVM_ResourceAllocationSettingData (See attached file: out) Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/09/2011 10:37:32 PM: > Mohan Sundar > Sent by: libvirt-cim-bounces at redhat.com > > 05/09/2011 10:37 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > "libvirt-cim at redhat.com" > > cc > > Subject > > [Libvirt-cim] reg: CIM Classes availability > > [image removed] > Hi all, > > I am trying to manage KVM remotely through Libvirt & CIM. > > I have Libvirt-CIM Providers and OpenPegasus CIMOM to acheive the same. > > When i tried to get the below values , i could not find any CIM or > Libvirt-CIM classes for it. > > 1. IPSubnet Mask of Host machine > 2. DefaultIPGateway of Host machine > 3. MACAddress of Guest machines > 4. Os Details of Guest Machines > > [ I need to know the CIM class for achieving this as well as Libvirt > API methods to achieve the same.] > > Thanks in advance > > Mohan Sundar > > > The contents of this e-mail and any attachment(s) may contain > confidential or privileged information for the intended recipient > (s). Unintended recipients are prohibited from taking action on the > basis of information in this e-mail and using or disseminating the > information, and must notify the sender and delete it from their > system. L&T Infotech will not accept responsibility or liability for > the accuracy or completeness of, or the presence of any virus or > disabling code in this e-mail" > > ______________________________________________________________________ > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: out Type: application/octet-stream Size: 17553 bytes Desc: not available URL: From snmishra at us.ibm.com Fri May 13 14:41:23 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 13 May 2011 07:41:23 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid In-Reply-To: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> References: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> Message-ID: Eduardo, Good work. Few minor issues. All patches should have the line "Signed-off-by:" There are a couple of lines longer than 80 characters, we need to limit them to 79 or less. Thanks Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/09/2011 01:14:42 PM: > "Eduardo Lima \(Etrunko\)" > Sent by: libvirt-cim-bounces at redhat.com > > 05/09/11 01:14 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid > > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1304971973 10800 > # Node ID 8ec3cf0d005f5325cfd408c986853b3489404233 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Configure: Check for libuuid > > This patch introduces a macro in acinclude.m4 to check for libuuid > development files and fixes the build accordingly. > > Changes from v1: > Added specific check for libuuid version < 1.41.2 > > diff -r 8b428df21c36 -r 8ec3cf0d005f acinclude.m4 > --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 > +++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300 > @@ -238,10 +238,29 @@ > AC_DEFUN([CHECK_LIBVIRT], > [ > PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) > + AC_SUBST([LIBVIRT_CFLAGS]) > + AC_SUBST([LIBVIRT_LIBS]) > CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" > LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" > ]) > > +AC_DEFUN([CHECK_LIBUUID], > + [ > + PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2], > [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + PKG_CHECK_MODULES([LIBUUID], [uuid], [LIBUUID_FOUND=yes], > [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + AC_MSG_ERROR([libuuid development files required]) > + else > + LIBUUID_CFLAGS+=" -I$(pkg-config -- > variable=includedir uuid)/uuid " > + fi > + fi > + AC_SUBST([LIBUUID_CFLAGS]) > + AC_SUBST([LIBUUID_LIBS]) > + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" > + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" > + ]) > + > # A convenience macro that spits out a fail message for a particular test > # > # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) > diff -r 8b428df21c36 -r 8ec3cf0d005f configure.ac > --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 > +++ b/configure.ac Mon May 09 17:12:53 2011 -0300 > @@ -148,10 +148,14 @@ > # Check for presense of a CIM server (this macro is defined in acinclude.m4) > CHECK_CIMSERVER > > +# Check pkg-config program > +PKG_PROG_PKG_CONFIG > + > # Check for presence of libraries > CHECK_LIBVIRT > CHECK_LIBXML2 > CHECK_LIBCU > +CHECK_LIBUUID > > CFLAGS_STRICT="-Werror" > > diff -r 8b428df21c36 -r 8ec3cf0d005f libxkutil/Makefile.am > --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300 > @@ -1,7 +1,6 @@ > # Copyright IBM Corp. 2007 > SUBDIRS = tests > > - > CFLAGS += $(CFLAGS_STRICT) > > noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h > infostore.h \ > @@ -9,14 +8,14 @@ > > lib_LTLIBRARIES = libxkutil.la > > -AM_LDFLAGS = -lvirt -luuid > - > libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ > xmlgen.c infostore.c pool_parsing.c > > +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ > + @LIBUUID_LIBS@ > + > noinst_PROGRAMS = xml_parse_test > > xml_parse_test_SOURCES = xml_parse_test.c > -xml_parse_test_LDADD = -lvirt > -xml_parse_test_LDFLAGS = libxkutil.la > -xml_parse_test_DEPENDENCIES = libxkutil.la > +xml_parse_test_LDADD = libxkutil.la \ > + @LIBVIRT_LIBS@ > diff -r 8b428df21c36 -r 8ec3cf0d005f libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300 > @@ -22,7 +22,7 @@ > #include > #include > #include > -#include > +#include > > #include > #include > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_SettingsDefineCapabilities.c > --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300 > @@ -26,7 +26,7 @@ > #include > #include > #include > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300 > @@ -29,7 +29,7 @@ > #include > #include > > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 8ec3cf0d005f src/Virt_VirtualSystemSnapshotService.c > --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300 > @@ -24,7 +24,7 @@ > #include > #include > > -#include > +#include > > #include > #include > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From eblima at linux.vnet.ibm.com Fri May 13 15:13:38 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 12:13:38 -0300 Subject: [Libvirt-cim] [PATCH] (#3) Configure: Check for libuuid Message-ID: <845daca07eed6b26555f.1305299618@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1304971973 10800 # Node ID 845daca07eed6b26555f71a7c761ec945fdc644a # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 Configure: Check for libuuid This patch introduces a macro in acinclude.m4 to check for libuuid development files and fixes the build accordingly. Changes from v1: Added specific check for libuuid version < 1.41.2 Changes from v2: Respect 80 characters limit Signed-off-by: Eduardo Lima (Etrunko) diff -r 8b428df21c36 -r 845daca07eed acinclude.m4 --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 +++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300 @@ -238,10 +238,32 @@ AC_DEFUN([CHECK_LIBVIRT], [ PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + AC_SUBST([LIBVIRT_CFLAGS]) + AC_SUBST([LIBVIRT_LIBS]) CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" ]) +AC_DEFUN([CHECK_LIBUUID], + [ + PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2], + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) + if test "$LIBUUID_FOUND" = "no" ; then + PKG_CHECK_MODULES([LIBUUID], [uuid], + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) + if test "$LIBUUID_FOUND" = "no" ; then + AC_MSG_ERROR([libuuid development files required]) + else + LIBUUID_INCLUDEDIR=$(pkg-config --variable=includedir uuid) + LIBUUID_CFLAGS+=" -I$LIBUUID_INCLUDEDIR/uuid " + fi + fi + AC_SUBST([LIBUUID_CFLAGS]) + AC_SUBST([LIBUUID_LIBS]) + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" + ]) + # A convenience macro that spits out a fail message for a particular test # # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) diff -r 8b428df21c36 -r 845daca07eed configure.ac --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 +++ b/configure.ac Mon May 09 17:12:53 2011 -0300 @@ -148,10 +148,14 @@ # Check for presense of a CIM server (this macro is defined in acinclude.m4) CHECK_CIMSERVER +# Check pkg-config program +PKG_PROG_PKG_CONFIG + # Check for presence of libraries CHECK_LIBVIRT CHECK_LIBXML2 CHECK_LIBCU +CHECK_LIBUUID CFLAGS_STRICT="-Werror" diff -r 8b428df21c36 -r 845daca07eed libxkutil/Makefile.am --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300 @@ -1,7 +1,6 @@ # Copyright IBM Corp. 2007 SUBDIRS = tests - CFLAGS += $(CFLAGS_STRICT) noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ @@ -9,14 +8,14 @@ lib_LTLIBRARIES = libxkutil.la -AM_LDFLAGS = -lvirt -luuid - libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ xmlgen.c infostore.c pool_parsing.c +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ + @LIBUUID_LIBS@ + noinst_PROGRAMS = xml_parse_test xml_parse_test_SOURCES = xml_parse_test.c -xml_parse_test_LDADD = -lvirt -xml_parse_test_LDFLAGS = libxkutil.la -xml_parse_test_DEPENDENCIES = libxkutil.la +xml_parse_test_LDADD = libxkutil.la \ + @LIBVIRT_LIBS@ diff -r 8b428df21c36 -r 845daca07eed libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300 @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include From eblima at linux.vnet.ibm.com Fri May 13 14:36:12 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:12 -0300 Subject: [Libvirt-cim] [PATCH 0 of 5] libcmpiutil: "Cosmetics" Message-ID: This is a series of simple, straightforward patches intended to cleanup the libcmpiutil source tree. Comments are welcome. Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Fri May 13 14:36:15 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:15 -0300 Subject: [Libvirt-cim] [PATCH 3 of 5] libcmpituil: Configure tweaks In-Reply-To: References: Message-ID: <41e3fb2222eeeaea0cff.1305297375@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296777 10800 # Node ID 41e3fb2222eeeaea0cffe5d65371541c0b34d746 # Parent d3435ce63194d7e65bf005ac69a857284a300094 libcmpituil: Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Check for pkg-config program diff -r d3435ce63194 -r 41e3fb2222ee acinclude.m4 --- a/acinclude.m4 Fri May 13 11:21:55 2011 -0300 +++ b/acinclude.m4 Fri May 13 11:26:17 2011 -0300 @@ -42,6 +42,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -61,13 +62,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break - fi + else + AC_MSG_RESULT(no) + fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI header files.) fi ] ) diff -r d3435ce63194 -r 41e3fb2222ee configure.ac --- a/configure.ac Fri May 13 11:21:55 2011 -0300 +++ b/configure.ac Fri May 13 11:26:17 2011 -0300 @@ -30,7 +30,9 @@ AC_CONFIG_FILES([Makefile tools/Makefile]) +# Use silent-rules if possible AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC @@ -51,6 +53,8 @@ AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +# Check for pkg-config program +PKG_PROG_PKG_CONFIG CHECK_LIBXML2 if test x${eoparser} = xyes; then From eblima at linux.vnet.ibm.com Fri May 13 14:36:13 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:13 -0300 Subject: [Libvirt-cim] [PATCH 1 of 5] libcmpiutil: Remove warnings In-Reply-To: References: Message-ID: <781e3d4d2d52597a8304.1305297373@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296021 10800 # Node ID 781e3d4d2d52597a8304b09511cf5033af8bdf62 # Parent f86d75144f5a932e886153584d1d7e084f9d1131 libcmpiutil: Remove warnings diff -r f86d75144f5a -r 781e3d4d2d52 eo_util_lexer.l --- a/eo_util_lexer.l Mon Jan 24 10:42:16 2011 -0500 +++ b/eo_util_lexer.l Fri May 13 11:13:41 2011 -0300 @@ -17,6 +17,8 @@ #ifndef YY_FLEX_LEX_COMPAT int eolineno = 1; #endif + +void eo_parse_error(char *errmsg); %} DIGIT ([0-9]) diff -r f86d75144f5a -r 781e3d4d2d52 eo_util_parser.y --- a/eo_util_parser.y Mon Jan 24 10:42:16 2011 -0500 +++ b/eo_util_parser.y Fri May 13 11:13:41 2011 -0300 @@ -118,7 +118,6 @@ | PROPERTYNAME '=' INTEGER ';' { EOTRACE("propertyname = %s\n", $1); - int rc; CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" "\tvalue = %lld\n", t, $3); From eblima at linux.vnet.ibm.com Fri May 13 14:36:14 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:14 -0300 Subject: [Libvirt-cim] [PATCH 2 of 5] libcmpiutil: Cleanup includes In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296515 10800 # Node ID d3435ce63194d7e65bf005ac69a857284a300094 # Parent 781e3d4d2d52597a8304b09511cf5033af8bdf62 libcmpiutil: Cleanup includes This is a cosmetic patch removing some unecessary includes and 'standardizing' includes in the source code following the simple rules: 1) Internal includes (provided by libcmpiutil) are done with "" e.g. #include "libcmpiutil.h" 2) External includes (provided by other projects) are done with <> e.g. #include diff -r 781e3d4d2d52 -r d3435ce63194 args_util.c --- a/args_util.c Fri May 13 11:13:41 2011 -0300 +++ b/args_util.c Fri May 13 11:21:55 2011 -0300 @@ -24,8 +24,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff -r 781e3d4d2d52 -r d3435ce63194 debug_util.c --- a/debug_util.c Fri May 13 11:13:41 2011 -0300 +++ b/debug_util.c Fri May 13 11:21:55 2011 -0300 @@ -24,10 +24,6 @@ #include #include -#include -#include -#include - #include "libcmpiutil.h" static int log_init = 0; diff -r 781e3d4d2d52 -r d3435ce63194 eo_parser.c --- a/eo_parser.c Fri May 13 11:13:41 2011 -0300 +++ b/eo_parser.c Fri May 13 11:21:55 2011 -0300 @@ -27,7 +27,7 @@ #include #include -#include "cmpidt.h" +#include #include "libcmpiutil.h" #include "eo_util_parser.h" diff -r 781e3d4d2d52 -r d3435ce63194 eo_parser_xml.c --- a/eo_parser_xml.c Fri May 13 11:13:41 2011 -0300 +++ b/eo_parser_xml.c Fri May 13 11:21:55 2011 -0300 @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff -r 781e3d4d2d52 -r d3435ce63194 eo_util_lexer.l --- a/eo_util_lexer.l Fri May 13 11:13:41 2011 -0300 +++ b/eo_util_lexer.l Fri May 13 11:21:55 2011 -0300 @@ -11,7 +11,7 @@ /* DEFINITIONS SECTION */ %{ -#include "cmpidt.h" +#include #include #include "eo_util_parser.h" #ifndef YY_FLEX_LEX_COMPAT diff -r 781e3d4d2d52 -r d3435ce63194 eo_util_parser.y --- a/eo_util_parser.y Fri May 13 11:13:41 2011 -0300 +++ b/eo_util_parser.y Fri May 13 11:21:55 2011 -0300 @@ -13,8 +13,8 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" +#include +#include #include "eo_parser_xml.h" diff -r 781e3d4d2d52 -r d3435ce63194 inst_list.c --- a/inst_list.c Fri May 13 11:13:41 2011 -0300 +++ b/inst_list.c Fri May 13 11:21:55 2011 -0300 @@ -20,9 +20,7 @@ */ #include -#include - -#include +#include "libcmpiutil.h" static int resize(struct inst_list *list, int newmax) { diff -r 781e3d4d2d52 -r d3435ce63194 instance_util.c --- a/instance_util.c Fri May 13 11:13:41 2011 -0300 +++ b/instance_util.c Fri May 13 11:21:55 2011 -0300 @@ -18,9 +18,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include +#include + #include "libcmpiutil.h" unsigned int cu_return_instances(const CMPIResult *results, diff -r 781e3d4d2d52 -r d3435ce63194 libcmpiutil.h --- a/libcmpiutil.h Fri May 13 11:13:41 2011 -0300 +++ b/libcmpiutil.h Fri May 13 11:21:55 2011 -0300 @@ -12,12 +12,8 @@ #include #include -#include -#include #include -#include -#include #define CLASSNAME(op) (CMGetCharPtr(CMGetClassName(op, NULL))) #define NAMESPACE(op) (CMGetCharPtr(CMGetNameSpace(op, NULL))) diff -r 781e3d4d2d52 -r d3435ce63194 std_association.c --- a/std_association.c Fri May 13 11:13:41 2011 -0300 +++ b/std_association.c Fri May 13 11:21:55 2011 -0300 @@ -22,10 +22,6 @@ */ #include -#include -#include -#include - #include "libcmpiutil.h" #include "std_association.h" diff -r 781e3d4d2d52 -r d3435ce63194 std_association.h --- a/std_association.h Fri May 13 11:13:41 2011 -0300 +++ b/std_association.h Fri May 13 11:21:55 2011 -0300 @@ -23,6 +23,7 @@ #define __STD_ASSOCIATION_H #include +#include struct std_assoc; struct std_assoc_info; diff -r 781e3d4d2d52 -r d3435ce63194 std_indication.c --- a/std_indication.c Fri May 13 11:13:41 2011 -0300 +++ b/std_indication.c Fri May 13 11:21:55 2011 -0300 @@ -20,12 +20,9 @@ */ #include #include +#include -#include -#include -#include - -#include +#include "libcmpiutil.h" #define STREQ(a, b) (strcmp(a, b) == 0) #define STREQC(a, b) (strcasecmp(a, b) == 0) diff -r 781e3d4d2d52 -r d3435ce63194 std_indication.h --- a/std_indication.h Fri May 13 11:13:41 2011 -0300 +++ b/std_indication.h Fri May 13 11:21:55 2011 -0300 @@ -21,15 +21,10 @@ #ifndef __STD_INDICATION_H #define __STD_INDICATION_H +#include + #include #include -#include -#include - -#include "config.h" - -#include "libcmpiutil.h" -#include "std_invokemethod.h" #ifdef CMPI_EI_VOID # define _EI_RTYPE void diff -r 781e3d4d2d52 -r d3435ce63194 std_invokemethod.c --- a/std_invokemethod.c Fri May 13 11:13:41 2011 -0300 +++ b/std_invokemethod.c Fri May 13 11:21:55 2011 -0300 @@ -21,10 +21,6 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" - #include "libcmpiutil.h" #include "std_invokemethod.h" diff -r 781e3d4d2d52 -r d3435ce63194 std_invokemethod.h --- a/std_invokemethod.h Fri May 13 11:13:41 2011 -0300 +++ b/std_invokemethod.h Fri May 13 11:21:55 2011 -0300 @@ -21,9 +21,8 @@ #ifndef __STD_INVOKEMETHOD_H #define __STD_INVOKEMETHOD_H -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" +#include +#include typedef CMPIStatus (*method_handler_fn)(CMPIMethodMI *self, const CMPIContext *context, From eblima at linux.vnet.ibm.com Fri May 13 14:36:17 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:17 -0300 Subject: [Libvirt-cim] [PATCH 5 of 5] libcmpiutil: Remove trailing whitespaces In-Reply-To: References: Message-ID: <8c6a975ed5215be42c41.1305297377@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305297352 10800 # Node ID 8c6a975ed5215be42c41c55205a825ddc6088f75 # Parent 084cabbe8cbcd78acdd4c985f8e5dd6c8950c9b1 libcmpiutil: Remove trailing whitespaces diff -r 084cabbe8cbc -r 8c6a975ed521 Makefile.am --- a/Makefile.am Fri May 13 11:26:46 2011 -0300 +++ b/Makefile.am Fri May 13 11:35:52 2011 -0300 @@ -39,7 +39,7 @@ BUILT_SOURCES = eo_util_lexer.c eo_util_parser.c eo_util_parser.h endif -lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la +lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la docs: if found_doxygen diff -r 084cabbe8cbc -r 8c6a975ed521 acinclude.m4 --- a/acinclude.m4 Fri May 13 11:26:46 2011 -0300 +++ b/acinclude.m4 Fri May 13 11:35:52 2011 -0300 @@ -59,7 +59,7 @@ if test "$have_CMPI" == "yes"; then dnl Found it AC_MSG_RESULT(yes) - dnl Save the new -I parameter + dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break else @@ -67,8 +67,8 @@ fi CPPFLAGS=$_cppflags done - fi - CPPFLAGS="$CMPI_CPP_FLAGS" + fi + CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then AC_MSG_ERROR(Cannot find CMPI header files.) fi @@ -100,7 +100,7 @@ # AC_DEFUN([CHECK_IND_VOID], [ AH_TEMPLATE([CMPI_EI_VOID], - [Defined if return type of EnableIndications + [Defined if return type of EnableIndications should be void]) AC_MSG_CHECKING([return type for indications]) CFLAGS_TMP=$CFLAGS @@ -110,7 +110,7 @@ static void ei(CMPIIndicationMI *mi, const CMPIContext *c) { return; } - ],[ + ],[ struct _CMPIIndicationMIFT ft; ft.enableIndications = ei; return 0; diff -r 084cabbe8cbc -r 8c6a975ed521 args_util.c --- a/args_util.c Fri May 13 11:26:46 2011 -0300 +++ b/args_util.c Fri May 13 11:35:52 2011 -0300 @@ -37,10 +37,10 @@ CMPIData data; CMPIStatus s; const char *value; - + data = CMGetKey(reference, key, &s); - if ((s.rc != CMPI_RC_OK) || - CMIsNullValue(data) || + if ((s.rc != CMPI_RC_OK) || + CMIsNullValue(data) || CMIsNullObject(data.value.string)) return CMPI_RC_ERR_FAILED; @@ -96,7 +96,7 @@ if ((s.rc != CMPI_RC_OK) || (CMIsNullValue(argdata))) return CMPI_RC_ERR_INVALID_PARAMETER; - if ((argdata.type != CMPI_string) || + if ((argdata.type != CMPI_string) || CMIsNullObject(argdata.value.string)) return CMPI_RC_ERR_TYPE_MISMATCH; @@ -150,7 +150,7 @@ { CMPIData argdata; CMPIStatus s; - + argdata = CMGetArg(args, name, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullValue(argdata)) return CMPI_RC_ERR_INVALID_PARAMETER; @@ -221,7 +221,7 @@ const char *prop_val; *target = NULL; - + REQUIRE_PROPERTY_DEFINED(inst, prop, value, &s); if (value.type != CMPI_string) diff -r 084cabbe8cbc -r 8c6a975ed521 configure.ac --- a/configure.ac Fri May 13 11:26:46 2011 -0300 +++ b/configure.ac Fri May 13 11:35:52 2011 -0300 @@ -51,7 +51,7 @@ [eoparser=${enableval}], [eoparser=yes]) -AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) # Check for pkg-config program PKG_PROG_PKG_CONFIG diff -r 084cabbe8cbc -r 8c6a975ed521 debug_util.c --- a/debug_util.c Fri May 13 11:26:46 2011 -0300 +++ b/debug_util.c Fri May 13 11:35:52 2011 -0300 @@ -51,7 +51,7 @@ if (log != NULL) vfprintf(log, fmt, ap); - + va_end(ap); } diff -r 084cabbe8cbc -r 8c6a975ed521 doc/doxygen.conf --- a/doc/doxygen.conf Fri May 13 11:26:46 2011 -0300 +++ b/doc/doxygen.conf Fri May 13 11:35:52 2011 -0300 @@ -14,207 +14,207 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libcmpiutil -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 1 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member +# If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES @@ -223,327 +223,327 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = . ./doc/mainpage -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py #FILE_PATTERNS = *.c *.h doc/mainpage -FILE_PATTERNS = +FILE_PATTERNS = -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -552,32 +552,32 @@ # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -589,16 +589,16 @@ REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -607,133 +607,133 @@ # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 @@ -742,74 +742,74 @@ # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -818,68 +818,68 @@ # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -888,33 +888,33 @@ # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -923,10 +923,10 @@ # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -935,319 +935,319 @@ # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff -r 084cabbe8cbc -r 8c6a975ed521 doc/mainpage --- a/doc/mainpage Fri May 13 11:26:46 2011 -0300 +++ b/doc/mainpage Fri May 13 11:35:52 2011 -0300 @@ -2,5 +2,5 @@ \mainpage Documentation for libcmpiutil Browse the interface headers in the "Files" tab above - + */ diff -r 084cabbe8cbc -r 8c6a975ed521 eo_parser.c --- a/eo_parser.c Fri May 13 11:26:46 2011 -0300 +++ b/eo_parser.c Fri May 13 11:35:52 2011 -0300 @@ -115,16 +115,16 @@ CMPIStatus s; uint64_t unsigned_val = 0; int64_t signed_val = 0; - + switch(type) { case CMPI_uint64: case CMPI_uint32: case CMPI_uint16: case CMPI_uint8: unsigned_val = (uint64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(unsigned_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(unsigned_val), type); break; case CMPI_sint64: @@ -133,9 +133,9 @@ case CMPI_sint8: default: signed_val = (int64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(signed_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(signed_val), type); } @@ -151,17 +151,17 @@ { if (_set_int_prop(value, prop, CMPI_uint64, inst) == 1) return CMPI_uint64; - else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) return CMPI_uint32; - else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) return CMPI_uint16; else if (_set_int_prop(value, prop, CMPI_uint8, inst) == 1) return CMPI_uint8; else if (_set_int_prop(value, prop, CMPI_sint64, inst) == 1) return CMPI_sint64; - else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) return CMPI_sint32; - else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) return CMPI_sint16; else _set_int_prop(value, prop, CMPI_sint8, inst); @@ -176,7 +176,7 @@ { CMPIString *cm_str; CMPIStatus s = {CMPI_RC_OK, NULL}; - + cm_str = CMNewString(broker, str, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(cm_str)) { CU_DEBUG("Error creating CMPIString"); diff -r 084cabbe8cbc -r 8c6a975ed521 eo_util_lexer.l --- a/eo_util_lexer.l Fri May 13 11:26:46 2011 -0300 +++ b/eo_util_lexer.l Fri May 13 11:35:52 2011 -0300 @@ -35,11 +35,11 @@ QUOTEDTEXT (\"[^"\n]*["\n]) SINGLEQUOTEDTEXT (\'[^'\n]*['\n]) FILENAME ([A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*) -PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) -HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) +PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) +HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) IPADDR ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) - /* Special mode to read CLASSNAME after reading INSTANCE OF, + /* Special mode to read CLASSNAME after reading INSTANCE OF, * otherwise cannot distinguish this token from a PROPERTYNAME */ %x READCLASSNAME @@ -143,7 +143,7 @@ void eo_parse_error(char *errmsg) { - fprintf(stderr, "error line %d: %s in '%s'\n", + fprintf(stderr, "error line %d: %s in '%s'\n", eolineno, errmsg, eo_parse_text); } diff -r 084cabbe8cbc -r 8c6a975ed521 eo_util_parser.y --- a/eo_util_parser.y Fri May 13 11:26:46 2011 -0300 +++ b/eo_util_parser.y Fri May 13 11:35:52 2011 -0300 @@ -117,10 +117,10 @@ | PROPERTYNAME '=' INTEGER ';' { - EOTRACE("propertyname = %s\n", $1); + EOTRACE("propertyname = %s\n", $1); CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" - "\tvalue = %lld\n", t, $3); + "\tvalue = %lld\n", t, $3); free($1); } @@ -133,7 +133,7 @@ CMSetProperty(*_INSTANCE, $1, &($3), CMPI_boolean); free($1); } - | PROPERTYNAME '=' OPENBRACKET + | PROPERTYNAME '=' OPENBRACKET { EOTRACE("propertyname = %s\n" "\ttype = CMPI_charsA\n", @@ -142,8 +142,8 @@ stringarraysize = 0; stringarraypropname = $1; } - arrayofstrings CLOSEBRACKET ';' - + arrayofstrings CLOSEBRACKET ';' + | PROPERTYNAME '=' CIMNULL ';' { EOTRACE("propertyname = %s\n" @@ -152,38 +152,38 @@ } ; -arrayofstrings: STRING +arrayofstrings: STRING { - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); stringarraysize++; - stringarray = (char **)realloc(stringarray, - sizeof(char *) * + stringarray = (char **)realloc(stringarray, + sizeof(char *) * stringarraysize); stringarray[stringarraysize-1] = $1; } COMMA arrayofstrings - + | STRING { CMPIArray *arr; CMPICount i; CMPIStatus s = {CMPI_RC_OK, NULL}; - - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); - + stringarraysize++; - arr = CMNewArray(_BROKER, - stringarraysize, - CMPI_string, + arr = CMNewArray(_BROKER, + stringarraysize, + CMPI_string, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(arr)) { EOTRACE("Error creating array\n"); @@ -200,19 +200,19 @@ if (s.rc != CMPI_RC_OK) goto str_arr_out; } - - s = ins_chars_into_cmstr_arr(_BROKER, - arr, + + s = ins_chars_into_cmstr_arr(_BROKER, + arr, stringarraysize - 1, $1); if (s.rc != CMPI_RC_OK) goto str_arr_out; - CMSetProperty(*_INSTANCE, + CMSetProperty(*_INSTANCE, stringarraypropname, &arr, CMPI_stringA); - + str_arr_out: free(stringarraypropname); for (i = 0; i < stringarraysize - 1; i++) @@ -220,9 +220,9 @@ free($1); if (s.rc != CMPI_RC_OK) { - return RC_ARR_CREAT_FAILED; + return RC_ARR_CREAT_FAILED; } - + } ; diff -r 084cabbe8cbc -r 8c6a975ed521 instance_util.c --- a/instance_util.c Fri May 13 11:26:46 2011 -0300 +++ b/instance_util.c Fri May 13 11:35:52 2011 -0300 @@ -92,15 +92,15 @@ { const char *ref_cn; const char *op_cn; - + ref_cn = CLASSNAME(ref); if (ref_cn == NULL) return false; - + op_cn = CLASSNAME(op); if (op_cn == NULL) return false; - + return STREQC(op_cn, ref_cn); } @@ -108,7 +108,7 @@ const CMPIInstance *inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIObjectPath *op; + CMPIObjectPath *op; const char *prop = NULL; int i; int count; @@ -119,14 +119,14 @@ if (!_compare_classname(ref, op)) return "CreationClassName"; - + count = CMGetKeyCount(op, &s); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Unable to get key count"); return NULL; } CU_DEBUG("Number of keys: %i", count); - + for (i = 0; i < count; i++) { CMPIData kd, pd; CMPIString *str; @@ -163,14 +163,14 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; const char *prop; - + prop = cu_compare_ref(ref, inst); if (prop != NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", prop); } - + return s; } @@ -182,7 +182,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; if (src_name == NULL) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No property name given"); goto out; @@ -193,7 +193,7 @@ data = CMGetProperty(src_inst, src_name, &s); if (s.rc != CMPI_RC_OK || CMIsNullValue(data)) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Copy failed. Could not get prop '%s'.", src_name); goto out; @@ -202,7 +202,7 @@ CMSetProperty(dest_inst, dest_name, &(data.value), data.type); out: - return s; + return s; } CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -222,7 +222,7 @@ "Could not get objectpath from instance"); goto out; } - + dest = CMNewInstance(broker, ref, s); prop_count = CMGetPropertyCount(src, s); @@ -242,8 +242,8 @@ if (s->rc != CMPI_RC_OK) { goto out; } - - *s = CMSetProperty(dest, prop_name, + + *s = CMSetProperty(dest, prop_name, &(data.value), data.type); if (s->rc != CMPI_RC_OK) { goto out; @@ -302,7 +302,7 @@ ref = CMGetObjectPath(inst, NULL); if (CMIsNullObject(ref)) goto out; - + ret = CLASSNAME(ref); out: diff -r 084cabbe8cbc -r 8c6a975ed521 libcmpiutil.h --- a/libcmpiutil.h Fri May 13 11:26:46 2011 -0300 +++ b/libcmpiutil.h Fri May 13 11:35:52 2011 -0300 @@ -44,7 +44,7 @@ #define CU_STRINGIFY(x) _CU_STRINGIFY(x) /** - * Dispatch macro for debug_print, fills in the function name and line number + * Dispatch macro for debug_print, fills in the function name and line number * of caller. */ #define CU_DEBUG(fmt, args...) { \ @@ -60,7 +60,7 @@ void debug_print(char *fmt, ...); /** - * Copies a property from one CMPIInstance to another. If dest_name is NULL, + * Copies a property from one CMPIInstance to another. If dest_name is NULL, * it is assumed to be the same as src_name. * * @param broker CIM broker, needed for status calls @@ -69,7 +69,7 @@ * @param src_name Name of property to be copied from src_inst * @param dest_name Name of property to be copied to dest_inst */ -CMPIStatus cu_copy_prop(const CMPIBroker *broker, +CMPIStatus cu_copy_prop(const CMPIBroker *broker, CMPIInstance *src_inst, CMPIInstance *dest_inst, char *src_name, char *dest_name); @@ -167,7 +167,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIStatus cu_merge_instances(CMPIInstance *src, @@ -178,7 +178,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -226,8 +226,8 @@ * @param prop The property name * @param target A pointer to a CMPIarray that will be set * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not an array, * - CMPI_RC_ERROR otherwise @@ -243,8 +243,8 @@ * @param prop The property name * @param target A pointer to a char* that will be set to a malloc'd string * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a string, * - CMPI_RC_ERROR otherwise @@ -259,8 +259,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a bool that will reflect the property status - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a boolean, * - CMPI_RC_ERROR otherwise @@ -291,8 +291,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint32_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint32, * - CMPI_RC_ERROR otherwise @@ -307,8 +307,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint64_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint64, * - CMPI_RC_ERROR otherwise @@ -425,7 +425,7 @@ /** * Validate a client given reference against the system instance. - * This is done by comparing the key values of the reference + * This is done by comparing the key values of the reference * against the key properties found in the system instance. * * @param broker A pointer to the current broker @@ -440,7 +440,7 @@ const CMPIInstance *inst); /** - * Returns the classname from an instance without forcing user to get + * Returns the classname from an instance without forcing user to get * ObjectPath first. * * @param inst Instance to examine diff -r 084cabbe8cbc -r 8c6a975ed521 libcmpiutil.spec.in --- a/libcmpiutil.spec.in Fri May 13 11:26:46 2011 -0300 +++ b/libcmpiutil.spec.in Fri May 13 11:35:52 2011 -0300 @@ -20,7 +20,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %package devel Summary: Libraries, includes, etc. to use the CMPI utility library @@ -34,7 +34,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %prep %setup -q @@ -58,7 +58,7 @@ %postun -p /sbin/ldconfig -%files +%files %defattr(-, root, root, -) %doc doc/doxygen.conf doc/mainpage README COPYING diff -r 084cabbe8cbc -r 8c6a975ed521 std_association.c --- a/std_association.c Fri May 13 11:26:46 2011 -0300 +++ b/std_association.c Fri May 13 11:35:52 2011 -0300 @@ -68,7 +68,7 @@ if (comp_class_list == NULL) return true; - + for (i = 0; comp_class_list[i]; i++) { comp_class = comp_class_list[i]; rop = CMNewObjectPath(broker, ns, comp_class, NULL); @@ -89,10 +89,10 @@ for (i = 0; ptr->source_class[i]; i++) { source_class = ptr->source_class[i]; - - if (CMClassPathIsA(broker, - ref, - source_class, + + if (CMClassPathIsA(broker, + ref, + source_class, NULL)) return true; } @@ -151,9 +151,9 @@ if (!match_source_class(ctx->brkr, ref, ptr)) { CU_DEBUG("Source class doesn't match"); - continue; + continue; } - + if (!ptr) { CU_DEBUG("Invalid pointer"); continue; @@ -162,50 +162,50 @@ if (info->assoc_class) { CU_DEBUG("Check client's assocClass: '%s'", info->assoc_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), + + rc = match_class(ctx->brkr, + NAMESPACE(ref), info->assoc_class, ptr->assoc_class); - + if (!rc) { CU_DEBUG("AssocClass not valid."); continue; } CU_DEBUG("AssocClass valid."); } - + if (info->result_class) { CU_DEBUG("Check client's resultClass: '%s'", info->result_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), - info->result_class, + + rc = match_class(ctx->brkr, + NAMESPACE(ref), + info->result_class, ptr->target_class); - + if (!rc) { CU_DEBUG("ResultClass not valid."); continue; } CU_DEBUG("ResultClass valid."); } - + if (info->role) { CU_DEBUG("Check client's role: '%s'", info->role); - + if (!STREQC(info->role, ptr->source_prop)) { CU_DEBUG("Invalid role"); continue; } CU_DEBUG("Role valid."); } - + if (info->result_role) { CU_DEBUG("Check client's resultRole: '%s'", info->result_role); - + if (!STREQC(info->result_role, ptr->target_prop)) { CU_DEBUG("ResultRole not valid."); continue; @@ -216,9 +216,9 @@ goto out; } - CU_DEBUG("No valid handler found"); + CU_DEBUG("No valid handler found"); ptr = NULL; - + out: return ptr; } @@ -240,11 +240,11 @@ for (i = 0; i < tmp_list.cur; i++) { CMPIInstance *refinst; - + refinst = handler->make_ref(ref, tmp_list.list[i], info, handler); if (refinst == NULL) continue; - + inst_list_add(list, refinst); } @@ -271,7 +271,7 @@ CU_DEBUG("filter_results did not return CMPI_RC_OK."); return s; } - + return s; } @@ -377,7 +377,7 @@ info, ref, &list); - + if (s.rc != CMPI_RC_OK) { CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); goto out; diff -r 084cabbe8cbc -r 8c6a975ed521 std_association.h --- a/std_association.h Fri May 13 11:26:46 2011 -0300 +++ b/std_association.h Fri May 13 11:35:52 2011 -0300 @@ -41,18 +41,18 @@ * std_assoc is the definition that the developer puts in their source file. It * defines an association relationship between a set of source and target * classes, through a named (set of) association classes and the function - * handler which does the work. - * It must be registered using the macro STDA_AssocMIStub. + * handler which does the work. + * It must be registered using the macro STDA_AssocMIStub. */ struct std_assoc { - /* Defines the list of possible classes that can be passed to the + /* Defines the list of possible classes that can be passed to the association for this case */ char **source_class; - - /* Defines the property of the association class that refers + + /* Defines the property of the association class that refers to the input (source class) of this case. This must match - that of the schema, and is used for automatic generation of + that of the schema, and is used for automatic generation of the reference object in the References() or ReferenceNames() operation */ char *source_prop; @@ -63,20 +63,20 @@ /* Same as source_prop, applied for target */ char *target_prop; - + /* Defines the list of association classes which are implemented by this handler */ char **assoc_class; /* Function handler responsible for doing the association and returning the list of target instances of the association. - The handler function receives the reference of the source - class of the association and must map it to a list of + The handler function receives the reference of the source + class of the association and must map it to a list of CMPIInstance objects (targets of the association). */ assoc_handler_t handler; /* Function handler responsible for creating an instance of the - association class. + association class. The handler function receives the source object path, and the target instance, so it can create the reference which is returned by the function. */ diff -r 084cabbe8cbc -r 8c6a975ed521 std_indication.c --- a/std_indication.c Fri May 13 11:26:46 2011 -0300 +++ b/std_indication.c Fri May 13 11:35:52 2011 -0300 @@ -49,7 +49,7 @@ break; } } - + if (filter == NULL) CU_DEBUG("get_ind_filter: failed to find %s", ind_name); @@ -76,7 +76,7 @@ "No std_ind_filter for %s", ind_name); goto out; } - + ret = filter->active; if (!ret) CU_DEBUG("Indication '%s' not in active filter", ind_name); @@ -101,12 +101,12 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; s = CMSetObjectPath(ind, ref); - if (s.rc != CMPI_RC_OK) + if (s.rc != CMPI_RC_OK) return s; CBDeliverIndication(broker, - context, - NAMESPACE(ref), + context, + NAMESPACE(ref), ind); return s; } @@ -209,7 +209,7 @@ "Provider has no indication '%s'", ind_name); goto out; } - + filter->active = state; out: @@ -226,7 +226,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; struct std_indication_ctx *_ctx; const char *cn = NULL; - + _ctx = (struct std_indication_ctx *)mi->hdl; cn = CLASSNAME(op); s = stdi_set_ind_filter_state(_ctx, cn, true); @@ -397,7 +397,7 @@ return s; CBInvokeMethod(broker, context, op, method, argsin, argsout, &s); - + return s; } diff -r 084cabbe8cbc -r 8c6a975ed521 std_instance.h --- a/std_instance.h Fri May 13 11:26:46 2011 -0300 +++ b/std_instance.h Fri May 13 11:35:52 2011 -0300 @@ -24,11 +24,11 @@ #define __STD_INSTANCE_H /** - * Generates the function table and initialization stub for an + * Generates the function table and initialization stub for an * instance provider. - * @param pfx The prefix for all mandatory association provider + * @param pfx The prefix for all mandatory association provider * functions. - * @param pn The provider name under which this provider is + * @param pn The provider name under which this provider is * registered. * @param broker The CMPIBroker pointer. * @param hook Perform additional initialization functions. diff -r 084cabbe8cbc -r 8c6a975ed521 std_invokemethod.c --- a/std_invokemethod.c Fri May 13 11:26:46 2011 -0300 +++ b/std_invokemethod.c Fri May 13 11:35:52 2011 -0300 @@ -70,7 +70,7 @@ return 0; } - return 1; + return 1; } static int parse_eo_array(CMPIArray *strings_in, @@ -168,9 +168,9 @@ return 1; } -static int validate_arg_type(struct method_arg *arg, +static int validate_arg_type(struct method_arg *arg, const CMPIArgs *args, - const CMPIBroker *broker, + const CMPIBroker *broker, const char *ns, CMPIArgs *new_args, CMPIStatus *s) @@ -228,7 +228,7 @@ return 1; } -static int validate_args(struct method_handler *h, +static int validate_args(struct method_handler *h, const CMPIArgs **args, const CMPIObjectPath *ref, const CMPIBroker *broker, @@ -243,10 +243,10 @@ int ret; struct method_arg *arg = &h->args[i]; - ret = validate_arg_type(arg, - *args, - broker, - NAMESPACE(ref), + ret = validate_arg_type(arg, + *args, + broker, + NAMESPACE(ref), new_args, s); if (!ret) @@ -288,10 +288,10 @@ goto exit; } - ret = validate_args(h, - &argsin, + ret = validate_args(h, + &argsin, reference, - ctx->broker, + ctx->broker, &s); if (!ret) goto exit; @@ -302,7 +302,7 @@ exit: CMReturnDone(results); - return s; + return s; } CMPIStatus _std_cleanup(CMPIMethodMI *self, diff -r 084cabbe8cbc -r 8c6a975ed521 tools/indication_tester.py --- a/tools/indication_tester.py Fri May 13 11:26:46 2011 -0300 +++ b/tools/indication_tester.py Fri May 13 11:35:52 2011 -0300 @@ -14,264 +14,264 @@ def filter_xml(name, type, ns, sysname): return """ - - - - - - - - - - + + + + + + + + + + - - CIM_ComputerSystem - - - %s - - - CIM_IndicationFilter - - - %sFilter - - - SELECT * FROM %s - - - - WQL - - - %s - - - - - - + + CIM_ComputerSystem + + + %s + + + CIM_IndicationFilter + + + %sFilter + + + SELECT * FROM %s + + + + WQL + + + %s + + + + + + """ % (sysname, name, type, ns) def handler_xml(name, port, sysname): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_IndicationHandlerCIMXML - - - %sHandler - - - http://localhost:%i - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_IndicationHandlerCIMXML + + + %sHandler + + + http://localhost:%i + + + + + + """ % (sysname, name, port) def subscription_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - - %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - 2 - - - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + + %s + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + 2 + + + + + + """ % (sysname, name, sysname, name) def delete_inst_xml(name, type, sysname, inst_name): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_Indication%s - - - %s - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_Indication%s + + + %s + + + + + + ; """ % (type, sysname, type, inst_name); def delete_sub_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - - - - + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + + + + ; """ % (sysname, name, sysname, name) @@ -304,8 +304,8 @@ self.ns = ns self.sysname = sysname - self.port = 8000 + port - self.server = BaseHTTPServer.HTTPServer(('', self.port), + self.port = 8000 + port + self.server = BaseHTTPServer.HTTPServer(('', self.port), CIMSocketHandler) self.server.print_ind = print_ind self.server.indications = [] @@ -319,14 +319,14 @@ "CIMMethod" : method, "CIMObject" : "root/PG_Interop", "Content-Type" : 'application/xml; charset="utf-8"'} - + if auth_hdr: headers["Authorization"] = "Basic %s" % auth_hdr conn.request("POST", "/cimom", body, headers) resp = conn.getresponse() if not resp.getheader("content-length"): - raise Exception("Request Failed: %d %s" % + raise Exception("Request Failed: %d %s" % (resp.status, resp.reason)) resp.read() @@ -380,11 +380,11 @@ print "DeleteHandler:\n%s\n" % del_handler_str print "CreateSubscription:\n%s\n" % subscript_str print "DeleteSubscription:\n%s\n" % del_subscript_str - + def main(): usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" parser = OptionParser(usage) - + parser.add_option("-u", "--url", dest="url", default="localhost:5988", help="URL of CIMOM to connect to (host:port)") parser.add_option("-N", "--ns", dest="ns", default="root/virt", @@ -410,17 +410,17 @@ if len(args) == 0: print "Fatal: no indication type provided." sys.exit(1) - + if options.username: auth = (options.username, options.password) else: auth = None - + if ":" in options.url: (sysname, port) = options.url.split(":") else: sysname = options.url - + if options.dump: dump_xml(options.name, args[0], options.ns, sysname) sys.exit(0) From eblima at linux.vnet.ibm.com Fri May 13 14:36:16 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 11:36:16 -0300 Subject: [Libvirt-cim] [PATCH 4 of 5] libcmpiutil: Update .hgignore In-Reply-To: References: Message-ID: <084cabbe8cbcd78acdd4.1305297376@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296806 10800 # Node ID 084cabbe8cbcd78acdd4c985f8e5dd6c8950c9b1 # Parent 41e3fb2222eeeaea0cffe5d65371541c0b34d746 libcmpiutil: Update .hgignore diff -r 41e3fb2222ee -r 084cabbe8cbc .hgignore --- a/.hgignore Fri May 13 11:26:17 2011 -0300 +++ b/.hgignore Fri May 13 11:26:46 2011 -0300 @@ -18,3 +18,8 @@ .*~$ ^\.libs/.* .*\.la$ +.*\.pc$ +.*\.spec$ +ylwrap +.*\.tar.bz2$ +.*\.tar.gz$ From snmishra at us.ibm.com Fri May 13 14:54:32 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Fri, 13 May 2011 07:54:32 -0700 Subject: [Libvirt-cim] [PATCH] Fix connection leaks Message-ID: # HG changeset patch # User Sharad Mishra # Date 1305298464 25200 # Node ID d0ccdb5447c796123c0175873c6d108a77dc1e39 # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 Fix connection leaks. libvirt-cim had few connection leaks which were causing it to crash. Signed-off-by: Sharad Mishra diff -r 8b428df21c36 -r d0ccdb5447c7 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/pool_parsing.c Fri May 13 07:54:24 2011 -0700 @@ -453,6 +453,7 @@ CU_DEBUG("Unable to refresh storage " "pool"); } + virStoragePoolFree(pool_ptr); ret = 1; } diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_AllocationCapabilities.c Fri May 13 07:54:24 2011 -0700 @@ -79,7 +79,6 @@ const char *id, struct inst_list *list) { - virConnectPtr conn = NULL; CMPIInstance *alloc_cap_inst; struct inst_list device_pool_list; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -91,15 +90,6 @@ if (!provider_is_responsible(broker, ref, &s)) goto out; - conn = connect_by_classname(broker, CLASSNAME(ref), &s); - if (conn == NULL) { - if (id) - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "Instance not found."); - goto out; - } - s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, @@ -141,7 +131,6 @@ } out: - virConnectClose(conn); inst_list_free(&device_pool_list); return s; diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystem.c Fri May 13 07:54:24 2011 -0700 @@ -938,12 +938,12 @@ goto out; } - dom = virDomainLookupByName(conn, + virDomainPtr dom2 = virDomainLookupByName(conn, virDomainGetName(dom)); - if (dom == NULL) { - dom = virDomainDefineXML(conn, xml); - if (dom == NULL) { + if (dom2 == NULL) { + dom2 = virDomainDefineXML(conn, xml); + if (dom2 == NULL) { CU_DEBUG("Failed to define domain from XML"); virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -953,10 +953,10 @@ } } - if (!domain_online(dom)) + if (!domain_online(dom2)) CU_DEBUG("Guest is now offline"); - ret = virDomainCreate(dom); + ret = virDomainCreate(dom2); if (ret != 0) virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -965,6 +965,8 @@ out: free(xml); + virDomainFree(dom2); + virConnectClose(conn); return s; } diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystemIndication.c Fri May 13 07:54:24 2011 -0700 @@ -422,7 +422,6 @@ } static bool async_ind(CMPIContext *context, - virConnectPtr conn, int ind_type, struct dom_xml prev_dom, char *prefix, @@ -557,7 +556,7 @@ for (i = 0; i < cur_count; i++) { res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); if (!res) - async_ind(context, conn, CS_CREATED, + async_ind(context, CS_CREATED, cur_xml[i], prefix, args); } @@ -565,14 +564,14 @@ for (i = 0; i < prev_count; i++) { res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); if (!res) - async_ind(context, conn, CS_DELETED, + async_ind(context, CS_DELETED, prev_xml[i], prefix, args); } for (i = 0; i < prev_count; i++) { res = dom_changed(prev_xml[i], cur_xml, cur_count); if (res) { - async_ind(context, conn, CS_MODIFIED, + async_ind(context, CS_MODIFIED, prev_xml[i], prefix, args); } diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_DevicePool.c Fri May 13 07:54:24 2011 -0700 @@ -451,8 +451,8 @@ free(host); free(dev); + virDomainFree(dom); virConnectClose(conn); - virDomainFree(dom); return pool; } diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Fri May 13 07:54:24 2011 -0700 @@ -1511,6 +1511,7 @@ out: CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); + virConnectClose(job->conn); return s; } From eblima at linux.vnet.ibm.com Fri May 13 18:06:38 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:38 -0300 Subject: [Libvirt-cim] [PATCH 3 of 5] libcmpituil: Configure tweaks In-Reply-To: References: Message-ID: <70fd1aebbcfdd4f45be2.1305309998@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296777 10800 # Node ID 70fd1aebbcfdd4f45be23f8fc6c4ad0205536780 # Parent e2e995eb15d1f32f1ed723509461978efad518ee libcmpituil: Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Check for pkg-config program Signed-off-by: Eduardo Lima (Etrunko) diff -r e2e995eb15d1 -r 70fd1aebbcfd acinclude.m4 --- a/acinclude.m4 Fri May 13 11:21:55 2011 -0300 +++ b/acinclude.m4 Fri May 13 11:26:17 2011 -0300 @@ -42,6 +42,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -61,13 +62,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break - fi + else + AC_MSG_RESULT(no) + fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI header files.) fi ] ) diff -r e2e995eb15d1 -r 70fd1aebbcfd configure.ac --- a/configure.ac Fri May 13 11:21:55 2011 -0300 +++ b/configure.ac Fri May 13 11:26:17 2011 -0300 @@ -30,7 +30,9 @@ AC_CONFIG_FILES([Makefile tools/Makefile]) +# Use silent-rules if possible AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC @@ -51,6 +53,8 @@ AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +# Check for pkg-config program +PKG_PROG_PKG_CONFIG CHECK_LIBXML2 if test x${eoparser} = xyes; then From eblima at linux.vnet.ibm.com Fri May 13 18:06:39 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:39 -0300 Subject: [Libvirt-cim] [PATCH 4 of 5] libcmpiutil: Update .hgignore In-Reply-To: References: Message-ID: <2eaa0dc82a4c77aab09b.1305309999@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296806 10800 # Node ID 2eaa0dc82a4c77aab09bb22bafdbfb6853f5d924 # Parent 70fd1aebbcfdd4f45be23f8fc6c4ad0205536780 libcmpiutil: Update .hgignore Signed-off-by: Eduardo Lima (Etrunko) diff -r 70fd1aebbcfd -r 2eaa0dc82a4c .hgignore --- a/.hgignore Fri May 13 11:26:17 2011 -0300 +++ b/.hgignore Fri May 13 11:26:46 2011 -0300 @@ -18,3 +18,8 @@ .*~$ ^\.libs/.* .*\.la$ +.*\.pc$ +.*\.spec$ +ylwrap +.*\.tar.bz2$ +.*\.tar.gz$ From eblima at linux.vnet.ibm.com Fri May 13 18:06:37 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:37 -0300 Subject: [Libvirt-cim] [PATCH 2 of 5] libcmpiutil: Cleanup includes In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296515 10800 # Node ID e2e995eb15d1f32f1ed723509461978efad518ee # Parent f92b5e72f469539bfdf449dbdb827075b3257cc5 libcmpiutil: Cleanup includes This is a cosmetic patch removing some unecessary includes and 'standardizing' includes in the source code following the simple rules: 1) Internal includes (provided by libcmpiutil) are done with "" e.g. #include "libcmpiutil.h" 2) External includes (provided by other projects) are done with <> e.g. #include Signed-off-by: Eduardo Lima (Etrunko) diff -r f92b5e72f469 -r e2e995eb15d1 args_util.c --- a/args_util.c Fri May 13 11:13:41 2011 -0300 +++ b/args_util.c Fri May 13 11:21:55 2011 -0300 @@ -24,8 +24,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff -r f92b5e72f469 -r e2e995eb15d1 debug_util.c --- a/debug_util.c Fri May 13 11:13:41 2011 -0300 +++ b/debug_util.c Fri May 13 11:21:55 2011 -0300 @@ -24,10 +24,6 @@ #include #include -#include -#include -#include - #include "libcmpiutil.h" static int log_init = 0; diff -r f92b5e72f469 -r e2e995eb15d1 eo_parser.c --- a/eo_parser.c Fri May 13 11:13:41 2011 -0300 +++ b/eo_parser.c Fri May 13 11:21:55 2011 -0300 @@ -27,7 +27,7 @@ #include #include -#include "cmpidt.h" +#include #include "libcmpiutil.h" #include "eo_util_parser.h" diff -r f92b5e72f469 -r e2e995eb15d1 eo_parser_xml.c --- a/eo_parser_xml.c Fri May 13 11:13:41 2011 -0300 +++ b/eo_parser_xml.c Fri May 13 11:21:55 2011 -0300 @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff -r f92b5e72f469 -r e2e995eb15d1 eo_util_lexer.l --- a/eo_util_lexer.l Fri May 13 11:13:41 2011 -0300 +++ b/eo_util_lexer.l Fri May 13 11:21:55 2011 -0300 @@ -11,7 +11,7 @@ /* DEFINITIONS SECTION */ %{ -#include "cmpidt.h" +#include #include #include "eo_util_parser.h" #ifndef YY_FLEX_LEX_COMPAT diff -r f92b5e72f469 -r e2e995eb15d1 eo_util_parser.y --- a/eo_util_parser.y Fri May 13 11:13:41 2011 -0300 +++ b/eo_util_parser.y Fri May 13 11:21:55 2011 -0300 @@ -13,8 +13,8 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" +#include +#include #include "eo_parser_xml.h" diff -r f92b5e72f469 -r e2e995eb15d1 inst_list.c --- a/inst_list.c Fri May 13 11:13:41 2011 -0300 +++ b/inst_list.c Fri May 13 11:21:55 2011 -0300 @@ -20,9 +20,7 @@ */ #include -#include - -#include +#include "libcmpiutil.h" static int resize(struct inst_list *list, int newmax) { diff -r f92b5e72f469 -r e2e995eb15d1 instance_util.c --- a/instance_util.c Fri May 13 11:13:41 2011 -0300 +++ b/instance_util.c Fri May 13 11:21:55 2011 -0300 @@ -18,9 +18,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include +#include + #include "libcmpiutil.h" unsigned int cu_return_instances(const CMPIResult *results, diff -r f92b5e72f469 -r e2e995eb15d1 libcmpiutil.h --- a/libcmpiutil.h Fri May 13 11:13:41 2011 -0300 +++ b/libcmpiutil.h Fri May 13 11:21:55 2011 -0300 @@ -12,12 +12,8 @@ #include #include -#include -#include #include -#include -#include #define CLASSNAME(op) (CMGetCharPtr(CMGetClassName(op, NULL))) #define NAMESPACE(op) (CMGetCharPtr(CMGetNameSpace(op, NULL))) diff -r f92b5e72f469 -r e2e995eb15d1 std_association.c --- a/std_association.c Fri May 13 11:13:41 2011 -0300 +++ b/std_association.c Fri May 13 11:21:55 2011 -0300 @@ -22,10 +22,6 @@ */ #include -#include -#include -#include - #include "libcmpiutil.h" #include "std_association.h" diff -r f92b5e72f469 -r e2e995eb15d1 std_association.h --- a/std_association.h Fri May 13 11:13:41 2011 -0300 +++ b/std_association.h Fri May 13 11:21:55 2011 -0300 @@ -23,6 +23,7 @@ #define __STD_ASSOCIATION_H #include +#include struct std_assoc; struct std_assoc_info; diff -r f92b5e72f469 -r e2e995eb15d1 std_indication.c --- a/std_indication.c Fri May 13 11:13:41 2011 -0300 +++ b/std_indication.c Fri May 13 11:21:55 2011 -0300 @@ -20,12 +20,9 @@ */ #include #include +#include -#include -#include -#include - -#include +#include "libcmpiutil.h" #define STREQ(a, b) (strcmp(a, b) == 0) #define STREQC(a, b) (strcasecmp(a, b) == 0) diff -r f92b5e72f469 -r e2e995eb15d1 std_indication.h --- a/std_indication.h Fri May 13 11:13:41 2011 -0300 +++ b/std_indication.h Fri May 13 11:21:55 2011 -0300 @@ -21,15 +21,10 @@ #ifndef __STD_INDICATION_H #define __STD_INDICATION_H +#include + #include #include -#include -#include - -#include "config.h" - -#include "libcmpiutil.h" -#include "std_invokemethod.h" #ifdef CMPI_EI_VOID # define _EI_RTYPE void diff -r f92b5e72f469 -r e2e995eb15d1 std_invokemethod.c --- a/std_invokemethod.c Fri May 13 11:13:41 2011 -0300 +++ b/std_invokemethod.c Fri May 13 11:21:55 2011 -0300 @@ -21,10 +21,6 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" - #include "libcmpiutil.h" #include "std_invokemethod.h" diff -r f92b5e72f469 -r e2e995eb15d1 std_invokemethod.h --- a/std_invokemethod.h Fri May 13 11:13:41 2011 -0300 +++ b/std_invokemethod.h Fri May 13 11:21:55 2011 -0300 @@ -21,9 +21,8 @@ #ifndef __STD_INVOKEMETHOD_H #define __STD_INVOKEMETHOD_H -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" +#include +#include typedef CMPIStatus (*method_handler_fn)(CMPIMethodMI *self, const CMPIContext *context, From eblima at linux.vnet.ibm.com Fri May 13 18:06:36 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:36 -0300 Subject: [Libvirt-cim] [PATCH 1 of 5] libcmpiutil: Remove warnings In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296021 10800 # Node ID f92b5e72f469539bfdf449dbdb827075b3257cc5 # Parent f86d75144f5a932e886153584d1d7e084f9d1131 libcmpiutil: Remove warnings Signed-off-by: Eduardo Lima (Etrunko) diff -r f86d75144f5a -r f92b5e72f469 eo_util_lexer.l --- a/eo_util_lexer.l Mon Jan 24 10:42:16 2011 -0500 +++ b/eo_util_lexer.l Fri May 13 11:13:41 2011 -0300 @@ -17,6 +17,8 @@ #ifndef YY_FLEX_LEX_COMPAT int eolineno = 1; #endif + +void eo_parse_error(char *errmsg); %} DIGIT ([0-9]) diff -r f86d75144f5a -r f92b5e72f469 eo_util_parser.y --- a/eo_util_parser.y Mon Jan 24 10:42:16 2011 -0500 +++ b/eo_util_parser.y Fri May 13 11:13:41 2011 -0300 @@ -118,7 +118,6 @@ | PROPERTYNAME '=' INTEGER ';' { EOTRACE("propertyname = %s\n", $1); - int rc; CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" "\tvalue = %lld\n", t, $3); From eblima at linux.vnet.ibm.com Fri May 13 18:06:40 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:40 -0300 Subject: [Libvirt-cim] [PATCH 5 of 5] libcmpiutil: Remove trailing whitespaces In-Reply-To: References: Message-ID: <494b4a905c638e06cdd1.1305310000@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305297352 10800 # Node ID 494b4a905c638e06cdd1599728db8645f01b1b9d # Parent 2eaa0dc82a4c77aab09bb22bafdbfb6853f5d924 libcmpiutil: Remove trailing whitespaces Signed-off-by: Eduardo Lima (Etrunko) diff -r 2eaa0dc82a4c -r 494b4a905c63 Makefile.am --- a/Makefile.am Fri May 13 11:26:46 2011 -0300 +++ b/Makefile.am Fri May 13 11:35:52 2011 -0300 @@ -39,7 +39,7 @@ BUILT_SOURCES = eo_util_lexer.c eo_util_parser.c eo_util_parser.h endif -lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la +lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la docs: if found_doxygen diff -r 2eaa0dc82a4c -r 494b4a905c63 acinclude.m4 --- a/acinclude.m4 Fri May 13 11:26:46 2011 -0300 +++ b/acinclude.m4 Fri May 13 11:35:52 2011 -0300 @@ -59,7 +59,7 @@ if test "$have_CMPI" == "yes"; then dnl Found it AC_MSG_RESULT(yes) - dnl Save the new -I parameter + dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break else @@ -67,8 +67,8 @@ fi CPPFLAGS=$_cppflags done - fi - CPPFLAGS="$CMPI_CPP_FLAGS" + fi + CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then AC_MSG_ERROR(Cannot find CMPI header files.) fi @@ -100,7 +100,7 @@ # AC_DEFUN([CHECK_IND_VOID], [ AH_TEMPLATE([CMPI_EI_VOID], - [Defined if return type of EnableIndications + [Defined if return type of EnableIndications should be void]) AC_MSG_CHECKING([return type for indications]) CFLAGS_TMP=$CFLAGS @@ -110,7 +110,7 @@ static void ei(CMPIIndicationMI *mi, const CMPIContext *c) { return; } - ],[ + ],[ struct _CMPIIndicationMIFT ft; ft.enableIndications = ei; return 0; diff -r 2eaa0dc82a4c -r 494b4a905c63 args_util.c --- a/args_util.c Fri May 13 11:26:46 2011 -0300 +++ b/args_util.c Fri May 13 11:35:52 2011 -0300 @@ -37,10 +37,10 @@ CMPIData data; CMPIStatus s; const char *value; - + data = CMGetKey(reference, key, &s); - if ((s.rc != CMPI_RC_OK) || - CMIsNullValue(data) || + if ((s.rc != CMPI_RC_OK) || + CMIsNullValue(data) || CMIsNullObject(data.value.string)) return CMPI_RC_ERR_FAILED; @@ -96,7 +96,7 @@ if ((s.rc != CMPI_RC_OK) || (CMIsNullValue(argdata))) return CMPI_RC_ERR_INVALID_PARAMETER; - if ((argdata.type != CMPI_string) || + if ((argdata.type != CMPI_string) || CMIsNullObject(argdata.value.string)) return CMPI_RC_ERR_TYPE_MISMATCH; @@ -150,7 +150,7 @@ { CMPIData argdata; CMPIStatus s; - + argdata = CMGetArg(args, name, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullValue(argdata)) return CMPI_RC_ERR_INVALID_PARAMETER; @@ -221,7 +221,7 @@ const char *prop_val; *target = NULL; - + REQUIRE_PROPERTY_DEFINED(inst, prop, value, &s); if (value.type != CMPI_string) diff -r 2eaa0dc82a4c -r 494b4a905c63 configure.ac --- a/configure.ac Fri May 13 11:26:46 2011 -0300 +++ b/configure.ac Fri May 13 11:35:52 2011 -0300 @@ -51,7 +51,7 @@ [eoparser=${enableval}], [eoparser=yes]) -AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) # Check for pkg-config program PKG_PROG_PKG_CONFIG diff -r 2eaa0dc82a4c -r 494b4a905c63 debug_util.c --- a/debug_util.c Fri May 13 11:26:46 2011 -0300 +++ b/debug_util.c Fri May 13 11:35:52 2011 -0300 @@ -51,7 +51,7 @@ if (log != NULL) vfprintf(log, fmt, ap); - + va_end(ap); } diff -r 2eaa0dc82a4c -r 494b4a905c63 doc/doxygen.conf --- a/doc/doxygen.conf Fri May 13 11:26:46 2011 -0300 +++ b/doc/doxygen.conf Fri May 13 11:35:52 2011 -0300 @@ -14,207 +14,207 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libcmpiutil -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 1 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member +# If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES @@ -223,327 +223,327 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = . ./doc/mainpage -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py #FILE_PATTERNS = *.c *.h doc/mainpage -FILE_PATTERNS = +FILE_PATTERNS = -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -552,32 +552,32 @@ # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -589,16 +589,16 @@ REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -607,133 +607,133 @@ # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 @@ -742,74 +742,74 @@ # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -818,68 +818,68 @@ # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -888,33 +888,33 @@ # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -923,10 +923,10 @@ # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -935,319 +935,319 @@ # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff -r 2eaa0dc82a4c -r 494b4a905c63 doc/mainpage --- a/doc/mainpage Fri May 13 11:26:46 2011 -0300 +++ b/doc/mainpage Fri May 13 11:35:52 2011 -0300 @@ -2,5 +2,5 @@ \mainpage Documentation for libcmpiutil Browse the interface headers in the "Files" tab above - + */ diff -r 2eaa0dc82a4c -r 494b4a905c63 eo_parser.c --- a/eo_parser.c Fri May 13 11:26:46 2011 -0300 +++ b/eo_parser.c Fri May 13 11:35:52 2011 -0300 @@ -115,16 +115,16 @@ CMPIStatus s; uint64_t unsigned_val = 0; int64_t signed_val = 0; - + switch(type) { case CMPI_uint64: case CMPI_uint32: case CMPI_uint16: case CMPI_uint8: unsigned_val = (uint64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(unsigned_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(unsigned_val), type); break; case CMPI_sint64: @@ -133,9 +133,9 @@ case CMPI_sint8: default: signed_val = (int64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(signed_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(signed_val), type); } @@ -151,17 +151,17 @@ { if (_set_int_prop(value, prop, CMPI_uint64, inst) == 1) return CMPI_uint64; - else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) return CMPI_uint32; - else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) return CMPI_uint16; else if (_set_int_prop(value, prop, CMPI_uint8, inst) == 1) return CMPI_uint8; else if (_set_int_prop(value, prop, CMPI_sint64, inst) == 1) return CMPI_sint64; - else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) return CMPI_sint32; - else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) return CMPI_sint16; else _set_int_prop(value, prop, CMPI_sint8, inst); @@ -176,7 +176,7 @@ { CMPIString *cm_str; CMPIStatus s = {CMPI_RC_OK, NULL}; - + cm_str = CMNewString(broker, str, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(cm_str)) { CU_DEBUG("Error creating CMPIString"); diff -r 2eaa0dc82a4c -r 494b4a905c63 eo_util_lexer.l --- a/eo_util_lexer.l Fri May 13 11:26:46 2011 -0300 +++ b/eo_util_lexer.l Fri May 13 11:35:52 2011 -0300 @@ -35,11 +35,11 @@ QUOTEDTEXT (\"[^"\n]*["\n]) SINGLEQUOTEDTEXT (\'[^'\n]*['\n]) FILENAME ([A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*) -PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) -HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) +PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) +HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) IPADDR ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) - /* Special mode to read CLASSNAME after reading INSTANCE OF, + /* Special mode to read CLASSNAME after reading INSTANCE OF, * otherwise cannot distinguish this token from a PROPERTYNAME */ %x READCLASSNAME @@ -143,7 +143,7 @@ void eo_parse_error(char *errmsg) { - fprintf(stderr, "error line %d: %s in '%s'\n", + fprintf(stderr, "error line %d: %s in '%s'\n", eolineno, errmsg, eo_parse_text); } diff -r 2eaa0dc82a4c -r 494b4a905c63 eo_util_parser.y --- a/eo_util_parser.y Fri May 13 11:26:46 2011 -0300 +++ b/eo_util_parser.y Fri May 13 11:35:52 2011 -0300 @@ -117,10 +117,10 @@ | PROPERTYNAME '=' INTEGER ';' { - EOTRACE("propertyname = %s\n", $1); + EOTRACE("propertyname = %s\n", $1); CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" - "\tvalue = %lld\n", t, $3); + "\tvalue = %lld\n", t, $3); free($1); } @@ -133,7 +133,7 @@ CMSetProperty(*_INSTANCE, $1, &($3), CMPI_boolean); free($1); } - | PROPERTYNAME '=' OPENBRACKET + | PROPERTYNAME '=' OPENBRACKET { EOTRACE("propertyname = %s\n" "\ttype = CMPI_charsA\n", @@ -142,8 +142,8 @@ stringarraysize = 0; stringarraypropname = $1; } - arrayofstrings CLOSEBRACKET ';' - + arrayofstrings CLOSEBRACKET ';' + | PROPERTYNAME '=' CIMNULL ';' { EOTRACE("propertyname = %s\n" @@ -152,38 +152,38 @@ } ; -arrayofstrings: STRING +arrayofstrings: STRING { - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); stringarraysize++; - stringarray = (char **)realloc(stringarray, - sizeof(char *) * + stringarray = (char **)realloc(stringarray, + sizeof(char *) * stringarraysize); stringarray[stringarraysize-1] = $1; } COMMA arrayofstrings - + | STRING { CMPIArray *arr; CMPICount i; CMPIStatus s = {CMPI_RC_OK, NULL}; - - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); - + stringarraysize++; - arr = CMNewArray(_BROKER, - stringarraysize, - CMPI_string, + arr = CMNewArray(_BROKER, + stringarraysize, + CMPI_string, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(arr)) { EOTRACE("Error creating array\n"); @@ -200,19 +200,19 @@ if (s.rc != CMPI_RC_OK) goto str_arr_out; } - - s = ins_chars_into_cmstr_arr(_BROKER, - arr, + + s = ins_chars_into_cmstr_arr(_BROKER, + arr, stringarraysize - 1, $1); if (s.rc != CMPI_RC_OK) goto str_arr_out; - CMSetProperty(*_INSTANCE, + CMSetProperty(*_INSTANCE, stringarraypropname, &arr, CMPI_stringA); - + str_arr_out: free(stringarraypropname); for (i = 0; i < stringarraysize - 1; i++) @@ -220,9 +220,9 @@ free($1); if (s.rc != CMPI_RC_OK) { - return RC_ARR_CREAT_FAILED; + return RC_ARR_CREAT_FAILED; } - + } ; diff -r 2eaa0dc82a4c -r 494b4a905c63 instance_util.c --- a/instance_util.c Fri May 13 11:26:46 2011 -0300 +++ b/instance_util.c Fri May 13 11:35:52 2011 -0300 @@ -92,15 +92,15 @@ { const char *ref_cn; const char *op_cn; - + ref_cn = CLASSNAME(ref); if (ref_cn == NULL) return false; - + op_cn = CLASSNAME(op); if (op_cn == NULL) return false; - + return STREQC(op_cn, ref_cn); } @@ -108,7 +108,7 @@ const CMPIInstance *inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIObjectPath *op; + CMPIObjectPath *op; const char *prop = NULL; int i; int count; @@ -119,14 +119,14 @@ if (!_compare_classname(ref, op)) return "CreationClassName"; - + count = CMGetKeyCount(op, &s); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Unable to get key count"); return NULL; } CU_DEBUG("Number of keys: %i", count); - + for (i = 0; i < count; i++) { CMPIData kd, pd; CMPIString *str; @@ -163,14 +163,14 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; const char *prop; - + prop = cu_compare_ref(ref, inst); if (prop != NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", prop); } - + return s; } @@ -182,7 +182,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; if (src_name == NULL) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No property name given"); goto out; @@ -193,7 +193,7 @@ data = CMGetProperty(src_inst, src_name, &s); if (s.rc != CMPI_RC_OK || CMIsNullValue(data)) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Copy failed. Could not get prop '%s'.", src_name); goto out; @@ -202,7 +202,7 @@ CMSetProperty(dest_inst, dest_name, &(data.value), data.type); out: - return s; + return s; } CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -222,7 +222,7 @@ "Could not get objectpath from instance"); goto out; } - + dest = CMNewInstance(broker, ref, s); prop_count = CMGetPropertyCount(src, s); @@ -242,8 +242,8 @@ if (s->rc != CMPI_RC_OK) { goto out; } - - *s = CMSetProperty(dest, prop_name, + + *s = CMSetProperty(dest, prop_name, &(data.value), data.type); if (s->rc != CMPI_RC_OK) { goto out; @@ -302,7 +302,7 @@ ref = CMGetObjectPath(inst, NULL); if (CMIsNullObject(ref)) goto out; - + ret = CLASSNAME(ref); out: diff -r 2eaa0dc82a4c -r 494b4a905c63 libcmpiutil.h --- a/libcmpiutil.h Fri May 13 11:26:46 2011 -0300 +++ b/libcmpiutil.h Fri May 13 11:35:52 2011 -0300 @@ -44,7 +44,7 @@ #define CU_STRINGIFY(x) _CU_STRINGIFY(x) /** - * Dispatch macro for debug_print, fills in the function name and line number + * Dispatch macro for debug_print, fills in the function name and line number * of caller. */ #define CU_DEBUG(fmt, args...) { \ @@ -60,7 +60,7 @@ void debug_print(char *fmt, ...); /** - * Copies a property from one CMPIInstance to another. If dest_name is NULL, + * Copies a property from one CMPIInstance to another. If dest_name is NULL, * it is assumed to be the same as src_name. * * @param broker CIM broker, needed for status calls @@ -69,7 +69,7 @@ * @param src_name Name of property to be copied from src_inst * @param dest_name Name of property to be copied to dest_inst */ -CMPIStatus cu_copy_prop(const CMPIBroker *broker, +CMPIStatus cu_copy_prop(const CMPIBroker *broker, CMPIInstance *src_inst, CMPIInstance *dest_inst, char *src_name, char *dest_name); @@ -167,7 +167,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIStatus cu_merge_instances(CMPIInstance *src, @@ -178,7 +178,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -226,8 +226,8 @@ * @param prop The property name * @param target A pointer to a CMPIarray that will be set * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not an array, * - CMPI_RC_ERROR otherwise @@ -243,8 +243,8 @@ * @param prop The property name * @param target A pointer to a char* that will be set to a malloc'd string * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a string, * - CMPI_RC_ERROR otherwise @@ -259,8 +259,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a bool that will reflect the property status - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a boolean, * - CMPI_RC_ERROR otherwise @@ -291,8 +291,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint32_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint32, * - CMPI_RC_ERROR otherwise @@ -307,8 +307,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint64_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint64, * - CMPI_RC_ERROR otherwise @@ -425,7 +425,7 @@ /** * Validate a client given reference against the system instance. - * This is done by comparing the key values of the reference + * This is done by comparing the key values of the reference * against the key properties found in the system instance. * * @param broker A pointer to the current broker @@ -440,7 +440,7 @@ const CMPIInstance *inst); /** - * Returns the classname from an instance without forcing user to get + * Returns the classname from an instance without forcing user to get * ObjectPath first. * * @param inst Instance to examine diff -r 2eaa0dc82a4c -r 494b4a905c63 libcmpiutil.spec.in --- a/libcmpiutil.spec.in Fri May 13 11:26:46 2011 -0300 +++ b/libcmpiutil.spec.in Fri May 13 11:35:52 2011 -0300 @@ -20,7 +20,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %package devel Summary: Libraries, includes, etc. to use the CMPI utility library @@ -34,7 +34,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %prep %setup -q @@ -58,7 +58,7 @@ %postun -p /sbin/ldconfig -%files +%files %defattr(-, root, root, -) %doc doc/doxygen.conf doc/mainpage README COPYING diff -r 2eaa0dc82a4c -r 494b4a905c63 std_association.c --- a/std_association.c Fri May 13 11:26:46 2011 -0300 +++ b/std_association.c Fri May 13 11:35:52 2011 -0300 @@ -68,7 +68,7 @@ if (comp_class_list == NULL) return true; - + for (i = 0; comp_class_list[i]; i++) { comp_class = comp_class_list[i]; rop = CMNewObjectPath(broker, ns, comp_class, NULL); @@ -89,10 +89,10 @@ for (i = 0; ptr->source_class[i]; i++) { source_class = ptr->source_class[i]; - - if (CMClassPathIsA(broker, - ref, - source_class, + + if (CMClassPathIsA(broker, + ref, + source_class, NULL)) return true; } @@ -151,9 +151,9 @@ if (!match_source_class(ctx->brkr, ref, ptr)) { CU_DEBUG("Source class doesn't match"); - continue; + continue; } - + if (!ptr) { CU_DEBUG("Invalid pointer"); continue; @@ -162,50 +162,50 @@ if (info->assoc_class) { CU_DEBUG("Check client's assocClass: '%s'", info->assoc_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), + + rc = match_class(ctx->brkr, + NAMESPACE(ref), info->assoc_class, ptr->assoc_class); - + if (!rc) { CU_DEBUG("AssocClass not valid."); continue; } CU_DEBUG("AssocClass valid."); } - + if (info->result_class) { CU_DEBUG("Check client's resultClass: '%s'", info->result_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), - info->result_class, + + rc = match_class(ctx->brkr, + NAMESPACE(ref), + info->result_class, ptr->target_class); - + if (!rc) { CU_DEBUG("ResultClass not valid."); continue; } CU_DEBUG("ResultClass valid."); } - + if (info->role) { CU_DEBUG("Check client's role: '%s'", info->role); - + if (!STREQC(info->role, ptr->source_prop)) { CU_DEBUG("Invalid role"); continue; } CU_DEBUG("Role valid."); } - + if (info->result_role) { CU_DEBUG("Check client's resultRole: '%s'", info->result_role); - + if (!STREQC(info->result_role, ptr->target_prop)) { CU_DEBUG("ResultRole not valid."); continue; @@ -216,9 +216,9 @@ goto out; } - CU_DEBUG("No valid handler found"); + CU_DEBUG("No valid handler found"); ptr = NULL; - + out: return ptr; } @@ -240,11 +240,11 @@ for (i = 0; i < tmp_list.cur; i++) { CMPIInstance *refinst; - + refinst = handler->make_ref(ref, tmp_list.list[i], info, handler); if (refinst == NULL) continue; - + inst_list_add(list, refinst); } @@ -271,7 +271,7 @@ CU_DEBUG("filter_results did not return CMPI_RC_OK."); return s; } - + return s; } @@ -377,7 +377,7 @@ info, ref, &list); - + if (s.rc != CMPI_RC_OK) { CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); goto out; diff -r 2eaa0dc82a4c -r 494b4a905c63 std_association.h --- a/std_association.h Fri May 13 11:26:46 2011 -0300 +++ b/std_association.h Fri May 13 11:35:52 2011 -0300 @@ -41,18 +41,18 @@ * std_assoc is the definition that the developer puts in their source file. It * defines an association relationship between a set of source and target * classes, through a named (set of) association classes and the function - * handler which does the work. - * It must be registered using the macro STDA_AssocMIStub. + * handler which does the work. + * It must be registered using the macro STDA_AssocMIStub. */ struct std_assoc { - /* Defines the list of possible classes that can be passed to the + /* Defines the list of possible classes that can be passed to the association for this case */ char **source_class; - - /* Defines the property of the association class that refers + + /* Defines the property of the association class that refers to the input (source class) of this case. This must match - that of the schema, and is used for automatic generation of + that of the schema, and is used for automatic generation of the reference object in the References() or ReferenceNames() operation */ char *source_prop; @@ -63,20 +63,20 @@ /* Same as source_prop, applied for target */ char *target_prop; - + /* Defines the list of association classes which are implemented by this handler */ char **assoc_class; /* Function handler responsible for doing the association and returning the list of target instances of the association. - The handler function receives the reference of the source - class of the association and must map it to a list of + The handler function receives the reference of the source + class of the association and must map it to a list of CMPIInstance objects (targets of the association). */ assoc_handler_t handler; /* Function handler responsible for creating an instance of the - association class. + association class. The handler function receives the source object path, and the target instance, so it can create the reference which is returned by the function. */ diff -r 2eaa0dc82a4c -r 494b4a905c63 std_indication.c --- a/std_indication.c Fri May 13 11:26:46 2011 -0300 +++ b/std_indication.c Fri May 13 11:35:52 2011 -0300 @@ -49,7 +49,7 @@ break; } } - + if (filter == NULL) CU_DEBUG("get_ind_filter: failed to find %s", ind_name); @@ -76,7 +76,7 @@ "No std_ind_filter for %s", ind_name); goto out; } - + ret = filter->active; if (!ret) CU_DEBUG("Indication '%s' not in active filter", ind_name); @@ -101,12 +101,12 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; s = CMSetObjectPath(ind, ref); - if (s.rc != CMPI_RC_OK) + if (s.rc != CMPI_RC_OK) return s; CBDeliverIndication(broker, - context, - NAMESPACE(ref), + context, + NAMESPACE(ref), ind); return s; } @@ -209,7 +209,7 @@ "Provider has no indication '%s'", ind_name); goto out; } - + filter->active = state; out: @@ -226,7 +226,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; struct std_indication_ctx *_ctx; const char *cn = NULL; - + _ctx = (struct std_indication_ctx *)mi->hdl; cn = CLASSNAME(op); s = stdi_set_ind_filter_state(_ctx, cn, true); @@ -397,7 +397,7 @@ return s; CBInvokeMethod(broker, context, op, method, argsin, argsout, &s); - + return s; } diff -r 2eaa0dc82a4c -r 494b4a905c63 std_instance.h --- a/std_instance.h Fri May 13 11:26:46 2011 -0300 +++ b/std_instance.h Fri May 13 11:35:52 2011 -0300 @@ -24,11 +24,11 @@ #define __STD_INSTANCE_H /** - * Generates the function table and initialization stub for an + * Generates the function table and initialization stub for an * instance provider. - * @param pfx The prefix for all mandatory association provider + * @param pfx The prefix for all mandatory association provider * functions. - * @param pn The provider name under which this provider is + * @param pn The provider name under which this provider is * registered. * @param broker The CMPIBroker pointer. * @param hook Perform additional initialization functions. diff -r 2eaa0dc82a4c -r 494b4a905c63 std_invokemethod.c --- a/std_invokemethod.c Fri May 13 11:26:46 2011 -0300 +++ b/std_invokemethod.c Fri May 13 11:35:52 2011 -0300 @@ -70,7 +70,7 @@ return 0; } - return 1; + return 1; } static int parse_eo_array(CMPIArray *strings_in, @@ -168,9 +168,9 @@ return 1; } -static int validate_arg_type(struct method_arg *arg, +static int validate_arg_type(struct method_arg *arg, const CMPIArgs *args, - const CMPIBroker *broker, + const CMPIBroker *broker, const char *ns, CMPIArgs *new_args, CMPIStatus *s) @@ -228,7 +228,7 @@ return 1; } -static int validate_args(struct method_handler *h, +static int validate_args(struct method_handler *h, const CMPIArgs **args, const CMPIObjectPath *ref, const CMPIBroker *broker, @@ -243,10 +243,10 @@ int ret; struct method_arg *arg = &h->args[i]; - ret = validate_arg_type(arg, - *args, - broker, - NAMESPACE(ref), + ret = validate_arg_type(arg, + *args, + broker, + NAMESPACE(ref), new_args, s); if (!ret) @@ -288,10 +288,10 @@ goto exit; } - ret = validate_args(h, - &argsin, + ret = validate_args(h, + &argsin, reference, - ctx->broker, + ctx->broker, &s); if (!ret) goto exit; @@ -302,7 +302,7 @@ exit: CMReturnDone(results); - return s; + return s; } CMPIStatus _std_cleanup(CMPIMethodMI *self, diff -r 2eaa0dc82a4c -r 494b4a905c63 tools/indication_tester.py --- a/tools/indication_tester.py Fri May 13 11:26:46 2011 -0300 +++ b/tools/indication_tester.py Fri May 13 11:35:52 2011 -0300 @@ -14,264 +14,264 @@ def filter_xml(name, type, ns, sysname): return """ - - - - - - - - - - + + + + + + + + + + - - CIM_ComputerSystem - - - %s - - - CIM_IndicationFilter - - - %sFilter - - - SELECT * FROM %s - - - - WQL - - - %s - - - - - - + + CIM_ComputerSystem + + + %s + + + CIM_IndicationFilter + + + %sFilter + + + SELECT * FROM %s + + + + WQL + + + %s + + + + + + """ % (sysname, name, type, ns) def handler_xml(name, port, sysname): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_IndicationHandlerCIMXML - - - %sHandler - - - http://localhost:%i - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_IndicationHandlerCIMXML + + + %sHandler + + + http://localhost:%i + + + + + + """ % (sysname, name, port) def subscription_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - - %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - 2 - - - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + + %s + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + 2 + + + + + + """ % (sysname, name, sysname, name) def delete_inst_xml(name, type, sysname, inst_name): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_Indication%s - - - %s - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_Indication%s + + + %s + + + + + + ; """ % (type, sysname, type, inst_name); def delete_sub_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - - - - + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + + + + ; """ % (sysname, name, sysname, name) @@ -304,8 +304,8 @@ self.ns = ns self.sysname = sysname - self.port = 8000 + port - self.server = BaseHTTPServer.HTTPServer(('', self.port), + self.port = 8000 + port + self.server = BaseHTTPServer.HTTPServer(('', self.port), CIMSocketHandler) self.server.print_ind = print_ind self.server.indications = [] @@ -319,14 +319,14 @@ "CIMMethod" : method, "CIMObject" : "root/PG_Interop", "Content-Type" : 'application/xml; charset="utf-8"'} - + if auth_hdr: headers["Authorization"] = "Basic %s" % auth_hdr conn.request("POST", "/cimom", body, headers) resp = conn.getresponse() if not resp.getheader("content-length"): - raise Exception("Request Failed: %d %s" % + raise Exception("Request Failed: %d %s" % (resp.status, resp.reason)) resp.read() @@ -380,11 +380,11 @@ print "DeleteHandler:\n%s\n" % del_handler_str print "CreateSubscription:\n%s\n" % subscript_str print "DeleteSubscription:\n%s\n" % del_subscript_str - + def main(): usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" parser = OptionParser(usage) - + parser.add_option("-u", "--url", dest="url", default="localhost:5988", help="URL of CIMOM to connect to (host:port)") parser.add_option("-N", "--ns", dest="ns", default="root/virt", @@ -410,17 +410,17 @@ if len(args) == 0: print "Fatal: no indication type provided." sys.exit(1) - + if options.username: auth = (options.username, options.password) else: auth = None - + if ":" in options.url: (sysname, port) = options.url.split(":") else: sysname = options.url - + if options.dump: dump_xml(options.name, args[0], options.ns, sysname) sys.exit(0) From eblima at linux.vnet.ibm.com Fri May 13 16:52:45 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 13:52:45 -0300 Subject: [Libvirt-cim] [PATCH] (#2) Configure: Check for libuuid In-Reply-To: References: <8ec3cf0d005f5325cfd4.1304972082@etrunko-t410.br.ibm.com> Message-ID: <4DCD61DD.9020805@linux.vnet.ibm.com> On 05/13/2011 11:41 AM, Sharad Mishra wrote: > Eduardo, > > Good work. Few minor issues. > All patches should have the line "Signed-off-by:" > There are a couple of lines longer than 80 characters, we need to limit > them to 79 or less. Hi Sharad, I have fixed those issues and the new version has been already sent. Hope it's all ok now. Cheers, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Fri May 13 18:58:03 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:58:03 -0300 Subject: [Libvirt-cim] [PATCH 0 of 5] libcmpiutil: "Cosmetics" In-Reply-To: References: Message-ID: <4DCD7F3B.8040301@linux.vnet.ibm.com> On 05/13/2011 11:36 AM, Eduardo Lima (Etrunko) wrote: > This is a series of simple, straightforward patches intended to cleanup the > libcmpiutil source tree. Comments are welcome. > Another patch that would go with this series is one that would fix the permissions of some source files of the project, which got the 'x' bit on. As I don't know much about mercurial, is it possible to apply a "chmod patch" which is sent by email? Or the only way to do it is to push the changes directly to the repository? Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Fri May 13 18:06:35 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 15:06:35 -0300 Subject: [Libvirt-cim] [PATCH 0 of 5] (#2) libcmpiutil: "Cosmetics" Message-ID: Second version of the series. Nothing really changed, but the "Signed-off-by" in each patch. Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Fri May 13 15:12:25 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 13 May 2011 12:12:25 -0300 Subject: [Libvirt-cim] [PATCH] --confirm Message-ID: <845daca07eed6b26555f.1305299545@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1304971973 10800 # Node ID 845daca07eed6b26555f71a7c761ec945fdc644a # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 Configure: Check for libuuid This patch introduces a macro in acinclude.m4 to check for libuuid development files and fixes the build accordingly. Changes from v1: Added specific check for libuuid version < 1.41.2 Changes from v2: Respect 80 characters limit Signed-off-by: Eduardo Lima (Etrunko) diff -r 8b428df21c36 -r 845daca07eed acinclude.m4 --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 +++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300 @@ -238,10 +238,32 @@ AC_DEFUN([CHECK_LIBVIRT], [ PKG_CHECK_MODULES([LIBVIRT], [libvirt >= 0.3.2]) + AC_SUBST([LIBVIRT_CFLAGS]) + AC_SUBST([LIBVIRT_LIBS]) CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" ]) +AC_DEFUN([CHECK_LIBUUID], + [ + PKG_CHECK_MODULES([LIBUUID], [uuid >= 1.41.2], + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) + if test "$LIBUUID_FOUND" = "no" ; then + PKG_CHECK_MODULES([LIBUUID], [uuid], + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) + if test "$LIBUUID_FOUND" = "no" ; then + AC_MSG_ERROR([libuuid development files required]) + else + LIBUUID_INCLUDEDIR=$(pkg-config --variable=includedir uuid) + LIBUUID_CFLAGS+=" -I$LIBUUID_INCLUDEDIR/uuid " + fi + fi + AC_SUBST([LIBUUID_CFLAGS]) + AC_SUBST([LIBUUID_LIBS]) + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" + ]) + # A convenience macro that spits out a fail message for a particular test # # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) diff -r 8b428df21c36 -r 845daca07eed configure.ac --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 +++ b/configure.ac Mon May 09 17:12:53 2011 -0300 @@ -148,10 +148,14 @@ # Check for presense of a CIM server (this macro is defined in acinclude.m4) CHECK_CIMSERVER +# Check pkg-config program +PKG_PROG_PKG_CONFIG + # Check for presence of libraries CHECK_LIBVIRT CHECK_LIBXML2 CHECK_LIBCU +CHECK_LIBUUID CFLAGS_STRICT="-Werror" diff -r 8b428df21c36 -r 845daca07eed libxkutil/Makefile.am --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300 @@ -1,7 +1,6 @@ # Copyright IBM Corp. 2007 SUBDIRS = tests - CFLAGS += $(CFLAGS_STRICT) noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ @@ -9,14 +8,14 @@ lib_LTLIBRARIES = libxkutil.la -AM_LDFLAGS = -lvirt -luuid - libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ xmlgen.c infostore.c pool_parsing.c +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ + @LIBUUID_LIBS@ + noinst_PROGRAMS = xml_parse_test xml_parse_test_SOURCES = xml_parse_test.c -xml_parse_test_LDADD = -lvirt -xml_parse_test_LDFLAGS = libxkutil.la -xml_parse_test_DEPENDENCIES = libxkutil.la +xml_parse_test_LDADD = libxkutil.la \ + @LIBVIRT_LIBS@ diff -r 8b428df21c36 -r 845daca07eed libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300 @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_SettingsDefineCapabilities.c --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300 @@ -26,7 +26,7 @@ #include #include #include -#include +#include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300 @@ -29,7 +29,7 @@ #include #include -#include +#include #include diff -r 8b428df21c36 -r 845daca07eed src/Virt_VirtualSystemSnapshotService.c --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300 @@ -24,7 +24,7 @@ #include #include -#include +#include #include #include From eblima at linux.vnet.ibm.com Mon May 16 17:47:47 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:47 -0300 Subject: [Libvirt-cim] [PATCH 0 of 7] (#3) libcmpiutil: "Cosmetics" Message-ID: Third version of the series, this time with two new patches: 6/7: Removes exec permission from source code files. 7/7: Shuts up automake by defining LEX_OUTPUT_ROOT in configure.ac instead of Makefile.am. Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Mon May 16 17:47:48 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:48 -0300 Subject: [Libvirt-cim] [PATCH 1 of 7] libcmpiutil: Remove warnings In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296021 10800 # Node ID f92b5e72f469539bfdf449dbdb827075b3257cc5 # Parent f86d75144f5a932e886153584d1d7e084f9d1131 libcmpiutil: Remove warnings Signed-off-by: Eduardo Lima (Etrunko) diff --git a/eo_util_lexer.l b/eo_util_lexer.l --- a/eo_util_lexer.l +++ b/eo_util_lexer.l @@ -17,6 +17,8 @@ #ifndef YY_FLEX_LEX_COMPAT int eolineno = 1; #endif + +void eo_parse_error(char *errmsg); %} DIGIT ([0-9]) diff --git a/eo_util_parser.y b/eo_util_parser.y --- a/eo_util_parser.y +++ b/eo_util_parser.y @@ -118,7 +118,6 @@ | PROPERTYNAME '=' INTEGER ';' { EOTRACE("propertyname = %s\n", $1); - int rc; CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" "\tvalue = %lld\n", t, $3); From eblima at linux.vnet.ibm.com Mon May 16 17:47:49 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:49 -0300 Subject: [Libvirt-cim] [PATCH 2 of 7] libcmpiutil: Cleanup includes In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296515 10800 # Node ID af2ffd311f1bc510a56a7018691edce7be89ad17 # Parent f92b5e72f469539bfdf449dbdb827075b3257cc5 libcmpiutil: Cleanup includes This is a cosmetic patch removing some unecessary includes and 'standardizing' includes in the source code following the simple rules: 1) Internal includes (provided by libcmpiutil) are done with "" e.g. #include "libcmpiutil.h" 2) External includes (provided by other projects) are done with <> e.g. #include Signed-off-by: Eduardo Lima (Etrunko) diff --git a/args_util.c b/args_util.c --- a/args_util.c +++ b/args_util.c @@ -24,8 +24,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff --git a/debug_util.c b/debug_util.c --- a/debug_util.c +++ b/debug_util.c @@ -24,10 +24,6 @@ #include #include -#include -#include -#include - #include "libcmpiutil.h" static int log_init = 0; diff --git a/eo_parser.c b/eo_parser.c --- a/eo_parser.c +++ b/eo_parser.c @@ -27,7 +27,7 @@ #include #include -#include "cmpidt.h" +#include #include "libcmpiutil.h" #include "eo_util_parser.h" diff --git a/eo_parser_xml.c b/eo_parser_xml.c --- a/eo_parser_xml.c +++ b/eo_parser_xml.c @@ -28,8 +28,6 @@ #include #include -#include -#include #include #include "libcmpiutil.h" diff --git a/eo_util_lexer.l b/eo_util_lexer.l --- a/eo_util_lexer.l +++ b/eo_util_lexer.l @@ -11,7 +11,7 @@ /* DEFINITIONS SECTION */ %{ -#include "cmpidt.h" +#include #include #include "eo_util_parser.h" #ifndef YY_FLEX_LEX_COMPAT diff --git a/eo_util_parser.y b/eo_util_parser.y --- a/eo_util_parser.y +++ b/eo_util_parser.y @@ -13,8 +13,8 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" +#include +#include #include "eo_parser_xml.h" diff --git a/inst_list.c b/inst_list.c --- a/inst_list.c +++ b/inst_list.c @@ -20,9 +20,7 @@ */ #include -#include - -#include +#include "libcmpiutil.h" static int resize(struct inst_list *list, int newmax) { diff --git a/instance_util.c b/instance_util.c --- a/instance_util.c +++ b/instance_util.c @@ -18,9 +18,10 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include +#include + #include "libcmpiutil.h" unsigned int cu_return_instances(const CMPIResult *results, diff --git a/libcmpiutil.h b/libcmpiutil.h --- a/libcmpiutil.h +++ b/libcmpiutil.h @@ -12,12 +12,8 @@ #include #include -#include -#include #include -#include -#include #define CLASSNAME(op) (CMGetCharPtr(CMGetClassName(op, NULL))) #define NAMESPACE(op) (CMGetCharPtr(CMGetNameSpace(op, NULL))) diff --git a/std_association.c b/std_association.c --- a/std_association.c +++ b/std_association.c @@ -22,10 +22,6 @@ */ #include -#include -#include -#include - #include "libcmpiutil.h" #include "std_association.h" diff --git a/std_association.h b/std_association.h --- a/std_association.h +++ b/std_association.h @@ -23,6 +23,7 @@ #define __STD_ASSOCIATION_H #include +#include struct std_assoc; struct std_assoc_info; diff --git a/std_indication.c b/std_indication.c --- a/std_indication.c +++ b/std_indication.c @@ -20,12 +20,9 @@ */ #include #include +#include -#include -#include -#include - -#include +#include "libcmpiutil.h" #define STREQ(a, b) (strcmp(a, b) == 0) #define STREQC(a, b) (strcasecmp(a, b) == 0) diff --git a/std_indication.h b/std_indication.h --- a/std_indication.h +++ b/std_indication.h @@ -21,15 +21,10 @@ #ifndef __STD_INDICATION_H #define __STD_INDICATION_H +#include + #include #include -#include -#include - -#include "config.h" - -#include "libcmpiutil.h" -#include "std_invokemethod.h" #ifdef CMPI_EI_VOID # define _EI_RTYPE void diff --git a/std_invokemethod.c b/std_invokemethod.c --- a/std_invokemethod.c +++ b/std_invokemethod.c @@ -21,10 +21,6 @@ #include #include -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" - #include "libcmpiutil.h" #include "std_invokemethod.h" diff --git a/std_invokemethod.h b/std_invokemethod.h --- a/std_invokemethod.h +++ b/std_invokemethod.h @@ -21,9 +21,8 @@ #ifndef __STD_INVOKEMETHOD_H #define __STD_INVOKEMETHOD_H -#include "cmpidt.h" -#include "cmpift.h" -#include "cmpimacs.h" +#include +#include typedef CMPIStatus (*method_handler_fn)(CMPIMethodMI *self, const CMPIContext *context, From eblima at linux.vnet.ibm.com Mon May 16 17:47:51 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:51 -0300 Subject: [Libvirt-cim] [PATCH 4 of 7] libcmpiutil: Update .hgignore In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296806 10800 # Node ID c24bb1e158f5fee7e5e51e42fa02790f58ce2834 # Parent 71c08398356cf6cdcef25acb7132518d8fc2a5ee libcmpiutil: Update .hgignore Signed-off-by: Eduardo Lima (Etrunko) diff --git a/.hgignore b/.hgignore --- a/.hgignore +++ b/.hgignore @@ -18,3 +18,8 @@ .*~$ ^\.libs/.* .*\.la$ +.*\.pc$ +.*\.spec$ +ylwrap +.*\.tar.bz2$ +.*\.tar.gz$ From eblima at linux.vnet.ibm.com Mon May 16 17:47:54 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:54 -0300 Subject: [Libvirt-cim] [PATCH 7 of 7] libcmpituil: Proper definition of LEX_OUTPUT_ROOT In-Reply-To: References: Message-ID: <308920f42e59be2aa8a4.1305568074@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305559378 10800 # Node ID 308920f42e59be2aa8a4055a277fed5c373a319e # Parent bd7bf41ffea870361297f8327212f3a81aca1084 libcmpituil: Proper definition of LEX_OUTPUT_ROOT Move definition from Makefile.am to configure.ac to shut up automake Signed-off-by: Eduardo Lima (Etrunko) diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -31,7 +31,6 @@ AM_YFLAGS = -d -p eo_parse_ if build_eoparser -LEX_OUTPUT_ROOT = lex.eo_parse_ libcueoparser_la_SOURCES = eo_util_parser.y eo_util_lexer.l eo_parser.c libcmpiutil_la_DEPENDENCIES += libcueoparser.la libcmpiutil_la_LIBADD += -lcueoparser diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -37,6 +37,7 @@ AC_PROG_CC AC_PROG_LEX +AC_SUBST([LEX_OUTPUT_ROOT], [lex.eo_parse_]) AC_PROG_YACC AC_C_CONST From eblima at linux.vnet.ibm.com Mon May 16 17:47:50 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:50 -0300 Subject: [Libvirt-cim] [PATCH 3 of 7] libcmpituil: Configure tweaks In-Reply-To: References: Message-ID: <71c08398356cf6cdcef2.1305568070@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305296777 10800 # Node ID 71c08398356cf6cdcef25acb7132518d8fc2a5ee # Parent af2ffd311f1bc510a56a7018691edce7be89ad17 libcmpituil: Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Check for pkg-config program Signed-off-by: Eduardo Lima (Etrunko) diff --git a/acinclude.m4 b/acinclude.m4 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -42,6 +42,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -61,13 +62,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break - fi + else + AC_MSG_RESULT(no) + fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI header files.) fi ] ) diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -30,7 +30,9 @@ AC_CONFIG_FILES([Makefile tools/Makefile]) +# Use silent-rules if possible AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) AC_PROG_CC @@ -51,6 +53,8 @@ AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +# Check for pkg-config program +PKG_PROG_PKG_CONFIG CHECK_LIBXML2 if test x${eoparser} = xyes; then From eblima at linux.vnet.ibm.com Mon May 16 17:47:53 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:53 -0300 Subject: [Libvirt-cim] [PATCH 6 of 7] libcmpiutil: Fix file permissions In-Reply-To: References: Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305568012 10800 # Node ID bd7bf41ffea870361297f8327212f3a81aca1084 # Parent 1177a2ffc8c7333a8e80c7ce743f0f10ef7da99c libcmpiutil: Fix file permissions Removing exec flag from source code files. Signed-off-by: Eduardo Lima (Etrunko) diff --git a/Makefile.am b/Makefile.am old mode 100755 new mode 100644 diff --git a/acinclude.m4 b/acinclude.m4 old mode 100755 new mode 100644 diff --git a/args_util.c b/args_util.c old mode 100755 new mode 100644 diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 diff --git a/eo_parser.c b/eo_parser.c old mode 100755 new mode 100644 diff --git a/eo_parser_xml.c b/eo_parser_xml.c old mode 100755 new mode 100644 diff --git a/eo_util_lexer.l b/eo_util_lexer.l old mode 100755 new mode 100644 diff --git a/eo_util_parser.y b/eo_util_parser.y old mode 100755 new mode 100644 diff --git a/instance_util.c b/instance_util.c old mode 100755 new mode 100644 diff --git a/libcmpiutil.h b/libcmpiutil.h old mode 100755 new mode 100644 diff --git a/libcmpiutil.spec.in b/libcmpiutil.spec.in old mode 100755 new mode 100644 diff --git a/std_association.c b/std_association.c old mode 100755 new mode 100644 diff --git a/std_association.h b/std_association.h old mode 100755 new mode 100644 diff --git a/std_indication.c b/std_indication.c old mode 100755 new mode 100644 diff --git a/std_instance.h b/std_instance.h old mode 100755 new mode 100644 diff --git a/std_invokemethod.c b/std_invokemethod.c old mode 100755 new mode 100644 From eblima at linux.vnet.ibm.com Mon May 16 17:47:52 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:47:52 -0300 Subject: [Libvirt-cim] [PATCH 5 of 7] libcmpiutil: Remove trailing whitespaces In-Reply-To: References: Message-ID: <1177a2ffc8c7333a8e80.1305568072@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305297352 10800 # Node ID 1177a2ffc8c7333a8e80c7ce743f0f10ef7da99c # Parent c24bb1e158f5fee7e5e51e42fa02790f58ce2834 libcmpiutil: Remove trailing whitespaces Signed-off-by: Eduardo Lima (Etrunko) diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -39,7 +39,7 @@ BUILT_SOURCES = eo_util_lexer.c eo_util_parser.c eo_util_parser.h endif -lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la +lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la docs: if found_doxygen diff --git a/acinclude.m4 b/acinclude.m4 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -59,7 +59,7 @@ if test "$have_CMPI" == "yes"; then dnl Found it AC_MSG_RESULT(yes) - dnl Save the new -I parameter + dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break else @@ -67,8 +67,8 @@ fi CPPFLAGS=$_cppflags done - fi - CPPFLAGS="$CMPI_CPP_FLAGS" + fi + CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then AC_MSG_ERROR(Cannot find CMPI header files.) fi @@ -100,7 +100,7 @@ # AC_DEFUN([CHECK_IND_VOID], [ AH_TEMPLATE([CMPI_EI_VOID], - [Defined if return type of EnableIndications + [Defined if return type of EnableIndications should be void]) AC_MSG_CHECKING([return type for indications]) CFLAGS_TMP=$CFLAGS @@ -110,7 +110,7 @@ static void ei(CMPIIndicationMI *mi, const CMPIContext *c) { return; } - ],[ + ],[ struct _CMPIIndicationMIFT ft; ft.enableIndications = ei; return 0; diff --git a/args_util.c b/args_util.c --- a/args_util.c +++ b/args_util.c @@ -37,10 +37,10 @@ CMPIData data; CMPIStatus s; const char *value; - + data = CMGetKey(reference, key, &s); - if ((s.rc != CMPI_RC_OK) || - CMIsNullValue(data) || + if ((s.rc != CMPI_RC_OK) || + CMIsNullValue(data) || CMIsNullObject(data.value.string)) return CMPI_RC_ERR_FAILED; @@ -96,7 +96,7 @@ if ((s.rc != CMPI_RC_OK) || (CMIsNullValue(argdata))) return CMPI_RC_ERR_INVALID_PARAMETER; - if ((argdata.type != CMPI_string) || + if ((argdata.type != CMPI_string) || CMIsNullObject(argdata.value.string)) return CMPI_RC_ERR_TYPE_MISMATCH; @@ -150,7 +150,7 @@ { CMPIData argdata; CMPIStatus s; - + argdata = CMGetArg(args, name, &s); if ((s.rc != CMPI_RC_OK) || CMIsNullValue(argdata)) return CMPI_RC_ERR_INVALID_PARAMETER; @@ -221,7 +221,7 @@ const char *prop_val; *target = NULL; - + REQUIRE_PROPERTY_DEFINED(inst, prop, value, &s); if (value.type != CMPI_string) diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -51,7 +51,7 @@ [eoparser=${enableval}], [eoparser=yes]) -AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) +AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) # Check for pkg-config program PKG_PROG_PKG_CONFIG diff --git a/debug_util.c b/debug_util.c --- a/debug_util.c +++ b/debug_util.c @@ -51,7 +51,7 @@ if (log != NULL) vfprintf(log, fmt, ap); - + va_end(ap); } diff --git a/doc/doxygen.conf b/doc/doxygen.conf --- a/doc/doxygen.conf +++ b/doc/doxygen.conf @@ -14,207 +14,207 @@ # Project related configuration options #--------------------------------------------------------------------------- -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded # by quotes) that should identify the project. PROJECT_NAME = libcmpiutil -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or +# The PROJECT_NUMBER tag can be used to enter a project or revision number. +# This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = 1 -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) +# base path where the generated documentation will be put. +# If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = doc -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create +# 4096 sub-directories (in 2 levels) under the output directory of each output +# format and will distribute the generated files over these directories. +# Enabling this option can be useful when feeding doxygen a huge amount of +# source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, +# The OUTPUT_LANGUAGE tag is used to specify the language in which all +# documentation generated by doxygen is written. Doxygen will use this +# information to generate all constant output in the proper language. +# The default language is English, other supported languages are: +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, # Swedish, and Ukrainian. OUTPUT_LANGUAGE = English -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for +# This tag can be used to specify the encoding used in the generated output. +# The encoding is not always determined by the language that is chosen, +# but also whether or not the output is meant for Windows or non-Windows users. +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES +# forces the Windows encoding (this is the default for the Windows binary), +# whereas setting the tag to NO uses a Unix-style encoding (the default for # all platforms other than Windows). USE_WINDOWS_ENCODING = NO -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will +# include brief member descriptions after the members that are listed in +# the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend +# the brief description of a member or function before the detailed description. +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" +# This tag implements a quasi-intelligent brief description abbreviator +# that is used to form the text in various listings. Each string +# in this list, if found as the leading text of the brief description, will be +# stripped from the text and the result after processing the whole list, is +# used as the annotated text. Otherwise, the brief description is used as-is. +# If left blank, the following values are used ("$name" is automatically +# replaced with the name of the entity): "The $name class" "The $name widget" +# "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" -ABBREVIATE_BRIEF = +ABBREVIATE_BRIEF = -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then +# Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all +# inherited members of a class in the documentation of that class as if those +# members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full +# path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag +# can be used to strip a user-defined part of the path. Stripping is +# only done if one of the specified strings matches the left-hand part of +# the path. The tag can be used to show relative paths in the file list. +# If left blank the directory from which doxygen is run is used as the # path to strip. -STRIP_FROM_PATH = +STRIP_FROM_PATH = -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of +# the path mentioned in the documentation of a class, which tells +# the reader which header file to include in order to use a class. +# If left blank only the name of the header file containing the class +# definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. -STRIP_FROM_INC_PATH = +STRIP_FROM_INC_PATH = -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter +# (but less readable) file names. This can be useful is your file systems # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen +# will interpret the first line (until the first dot) of a JavaDoc-style +# comment as the brief description. If set to NO, the JavaDoc +# comments will behave just like the Qt-style comments (thus requiring an # explicit @brief command for a brief description. JAVADOC_AUTOBRIEF = NO -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen +# treat a multi-line C++ special comment block (i.e. a block of //! or /// +# comments) as a brief description. This used to be the default behaviour. +# The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO -# If the DETAILS_AT_TOP tag is set to YES then Doxygen +# If the DETAILS_AT_TOP tag is set to YES then Doxygen # will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member +# If set to NO, the detailed description appears after the member # documentation. DETAILS_AT_TOP = NO -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented +# member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce +# a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO -# The TAB_SIZE tag can be used to set the number of spaces in a tab. +# The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 8 -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". +# This tag can be used to specify a number of aliases that acts +# as commands in the documentation. An alias has the form "name=value". +# For example adding "sideeffect=\par Side Effects:\n" will allow you to +# put the command \sideeffect (or @sideeffect) in the documentation, which +# will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. -ALIASES = +ALIASES = -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C +# sources only. Doxygen will then generate output that is more tailored for C. +# For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = YES -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java +# sources only. Doxygen will then generate output that is more tailored for Java. +# For instance, namespaces will be presented as packages, qualified scopes # will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to -# include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to +# include (a tag file for) the STL sources as input, then you should +# set this tag to YES in order to let doxygen match functions declarations and +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. +# func(std::string) {}). This also make the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = NO -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC +# tag is set to YES, then doxygen will reuse the documentation of the first +# member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of +# the same type (for instance a group of public functions) to be put as a +# subgroup of that type (e.g. under the Public Functions section). Set it to +# NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES @@ -223,327 +223,327 @@ # Build related configuration options #--------------------------------------------------------------------------- -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in +# documentation are documented, even if no documentation was available. +# Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO -# If the EXTRACT_STATIC tag is set to YES all static members of a file +# If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = NO -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) +# defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. +# This flag is only useful for Objective-C code. When set to YES local +# methods, which are defined in the implementation section but not in +# the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all +# undocumented members of documented classes, files or namespaces. +# If set to NO (the default) these members will be included in the +# various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all +# undocumented classes that are normally visible in the class hierarchy. +# If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all +# friend (class|struct|union) declarations. +# If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any +# documentation blocks found inside the body of a function. +# If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. +# The INTERNAL_DOCS tag determines if documentation +# that is typed after a \internal command is included. If the tag is set +# to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate +# file names in lower-case letters. If set to YES upper-case letters are also +# allowed. This is useful if you have classes or files whose names only differ +# in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = YES -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen +# will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen +# will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = YES -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen +# will sort the (detailed) documentation of file and class members +# alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the +# brief documentation of file, namespace and class members alphabetically +# by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be +# sorted by fully-qualified names, including namespaces. If set to +# NO (the default), the class list will be sorted only by class name, +# not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the +# Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo +# The GENERATE_TODOLIST tag can be used to enable (YES) or +# disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test +# The GENERATE_TESTLIST tag can be used to enable (YES) or +# disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug +# The GENERATE_BUGLIST tag can be used to enable (YES) or +# disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or +# disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES -# The ENABLED_SECTIONS tag can be used to enable conditional +# The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if sectionname ... \endif. -ENABLED_SECTIONS = +ENABLED_SECTIONS = -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines +# the initial value of a variable or define consists of for it to appear in +# the documentation. If the initializer consists of more lines than specified +# here it will be hidden. Use a value of 0 to hide initializers completely. +# The appearance of the initializer of individual variables and defines in the +# documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated +# at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy +# If the sources in your project are distributed over multiple directories +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy # in the documentation. The default is NO. SHOW_DIRECTORIES = NO -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from the -# version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output +# The FILE_VERSION_FILTER tag can be used to specify a program or script that +# doxygen should invoke to get the current version for each file (typically from the +# version control system). Doxygen will invoke the program by executing (via +# popen()) the command , where is the value of +# the FILE_VERSION_FILTER tag, and is the name of an input file +# provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. -FILE_VERSION_FILTER = +FILE_VERSION_FILTER = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- -# The QUIET tag can be used to turn on/off the messages that are generated +# The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = NO -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank +# The WARNINGS tag can be used to turn on/off the warning messages that are +# generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = YES -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for +# potential errors in the documentation, such as not documenting some +# parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of +# This WARN_NO_PARAMDOC option can be abled to get warnings for +# functions that are documented, but have no documentation for their parameters +# or return value. If set to NO (the default) doxygen will only warn about +# wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could +# The WARN_FORMAT tag determines the format of the warning messages that +# doxygen can produce. The string should contain the $file, $line, and $text +# tags, which will be replaced by the file and line number from which the +# warning originated and the warning text. Optionally the format may contain +# $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written +# The WARN_LOGFILE tag can be used to specify a file to which warning +# and error messages should be written. If left blank the output is written # to stderr. -WARN_LOGFILE = +WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories +# The INPUT tag can be used to specify the files and/or directories that contain +# documented source files. You may enter file names like "myfile.cpp" or +# directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = . ./doc/mainpage -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx +# If the value of the INPUT tag contains directories, you can use the +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left +# blank the following patterns are tested: +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py #FILE_PATTERNS = *.c *.h doc/mainpage -FILE_PATTERNS = +FILE_PATTERNS = -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. +# The RECURSIVE tag can be used to turn specify whether or not subdirectories +# should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = NO -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a +# The EXCLUDE tag can be used to specify files and/or directories that should +# excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. -EXCLUDE = +EXCLUDE = -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or +# directories that are symbolic links (a Unix filesystem feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories +# If the value of the INPUT tag contains directories, you can use the +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude +# certain files from those directories. Note that the wildcards are matched +# against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* -EXCLUDE_PATTERNS = +EXCLUDE_PATTERNS = -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see +# The EXAMPLE_PATH tag can be used to specify one or more files or +# directories that contain example code fragments that are included (see # the \include command). -EXAMPLE_PATH = +EXAMPLE_PATH = -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left +# If the value of the EXAMPLE_PATH tag contains directories, you can use the +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp +# and *.h) to filter out the source-files in the directories. If left # blank all files are included. -EXAMPLE_PATTERNS = +EXAMPLE_PATTERNS = -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be +# searched for input files to be used with the \include or \dontinclude +# commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see +# The IMAGE_PATH tag can be used to specify one or more files or +# directories that contain image that are included in the documentation (see # the \image command). -IMAGE_PATH = +IMAGE_PATH = -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be +# The INPUT_FILTER tag can be used to specify a program that doxygen should +# invoke to filter for each input file. Doxygen will invoke the filter program +# by executing (via popen()) the command , where +# is the value of the INPUT_FILTER tag, and is the name of an +# input file. Doxygen will then use the output that the filter program writes +# to standard output. If FILTER_PATTERNS is specified, this tag will be # ignored. -INPUT_FILTER = +INPUT_FILTER = -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern +# basis. Doxygen will compare the file name with each pattern and apply the +# filter if there is a match. The filters are a list of the form: +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER # is applied to all files. -FILTER_PATTERNS = +FILTER_PATTERNS = -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using +# INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO @@ -552,32 +552,32 @@ # configuration options related to source browsing #--------------------------------------------------------------------------- -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also +# If the SOURCE_BROWSER tag is set to YES then a list of source files will +# be generated. Documented entities will be cross-referenced with these sources. +# Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO -# Setting the INLINE_SOURCES tag to YES will include the body +# Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct +# doxygen to hide any special comment blocks from generated source code # fragments. Normal C and C++ comments will always remain visible. STRIP_CODE_COMMENTS = YES -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented +# If the REFERENCED_BY_RELATION tag is set to YES (the default) +# then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = YES -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities +# If the REFERENCES_RELATION tag is set to YES (the default) +# then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = YES @@ -589,16 +589,16 @@ REFERENCES_LINK_SOURCE = YES -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You +# If the USE_HTAGS tag is set to YES then the references to source code +# will point to the HTML generated by the htags(1) tool instead of doxygen +# built-in source browser. The htags tool is part of GNU's global source +# tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen +# will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES @@ -607,133 +607,133 @@ # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index +# of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = NO -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that +# In case all classes in a project start with a common prefix, all +# classes will be put under the same header in the alphabetical index. +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. -IGNORE_PREFIX = +IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = YES -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_HEADER tag can be used to specify a personal HTML header for +# each generated HTML page. If it is left blank doxygen will generate a # standard header. -HTML_HEADER = +HTML_HEADER = -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a +# The HTML_FOOTER tag can be used to specify a personal HTML footer for +# each generated HTML page. If it is left blank doxygen will generate a # standard footer. -HTML_FOOTER = +HTML_FOOTER = -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading +# style sheet that is used by each HTML page. It can be used to +# fine-tune the look of the HTML output. If the tag is left blank doxygen +# will generate a default style sheet. Note that doxygen will try to copy +# the style sheet file to the HTML output directory, so don't put your own # stylesheet in the HTML output directory as well, or it will be erased! -HTML_STYLESHEET = +HTML_STYLESHEET = -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, +# files or namespaces will be aligned in HTML using tables. If set to # NO a bullet list will be used. HTML_ALIGN_MEMBERS = YES -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) +# If the GENERATE_HTMLHELP tag is set to YES, additional index files +# will be generated that can be used as input for tools like the +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = NO -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can +# be used to specify the file name of the resulting .chm file. You +# can add a path in front of the file if the result should not be # written to the html output directory. -CHM_FILE = +CHM_FILE = -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can +# be used to specify the location (absolute path including file name) of +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. -HHC_LOCATION = +HHC_LOCATION = -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag +# controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = NO -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag +# controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO -# The TOC_EXPAND flag can be set to YES to add extra items for group members +# The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at +# top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. DISABLE_INDEX = NO -# This tag can be used to set the number of enum values (range [1..20]) +# This tag can be used to set the number of enum values (range [1..20]) # that doxygen will group on one line in the generated HTML documentation. ENUM_VALUES_PER_LINE = 4 # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are +# generated containing a tree-like index structure (just like the one that +# is generated for HTML Help). For this to work a browser that supports +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are # probably better off using the HTML help feature. GENERATE_TREEVIEW = NO -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be +# used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 @@ -742,74 +742,74 @@ # configuration options related to the LaTeX output #--------------------------------------------------------------------------- -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = NO -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. LATEX_CMD_NAME = latex -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to +# generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact +# LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and +# The PAPER_TYPE tag can be used to set the paper type that is used +# by the printer. Possible values are: a4, a4wide, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4wide -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. -EXTRA_PACKAGES = +EXTRA_PACKAGES = -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for +# the generated latex document. The header should contain everything until +# the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! -LATEX_HEADER = +LATEX_HEADER = -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated +# is prepared for conversion to pdf (using ps2pdf). The pdf file will +# contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = NO -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of +# plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = NO -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. +# command to the generated LaTeX files. This will instruct LaTeX to keep +# running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) +# If LATEX_HIDE_INDICES is set to YES then doxygen will not +# include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO @@ -818,68 +818,68 @@ # configuration options related to the RTF output #--------------------------------------------------------------------------- -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output +# The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = NO -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact +# RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated +# will contain hyperlink fields. The RTF file will +# contain links (just like the HTML output) instead of page references. +# This makes the output suitable for online browsing using WORD or other +# programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide +# Load stylesheet definitions from file. Syntax is similar to doxygen's +# config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. -RTF_STYLESHEET_FILE = +RTF_STYLESHEET_FILE = -# Set optional variables used in the generation of an rtf document. +# Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. -RTF_EXTENSIONS_FILE = +RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = NO -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The MAN_OUTPUT tag is used to specify where the man pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man -# The MAN_EXTENSION tag determines the extension that is added to +# The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, +# then it will generate one additional man file for each entity +# documented in the real man page(s). These additional files +# only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO @@ -888,33 +888,33 @@ # configuration options related to the XML output #--------------------------------------------------------------------------- -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of +# If the GENERATE_XML tag is set to YES Doxygen will +# generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = NO -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be +# The XML_OUTPUT tag is used to specify where the XML pages will be put. +# If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the +# The XML_SCHEMA tag can be used to specify an XML schema, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_SCHEMA = +XML_SCHEMA = -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the +# The XML_DTD tag can be used to specify an XML DTD, +# which can be used by a validating XML parser to check the # syntax of the XML files. -XML_DTD = +XML_DTD = -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will +# dump the program listings (including syntax highlighting +# and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES @@ -923,10 +923,10 @@ # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will +# generate an AutoGen Definitions (see autogen.sf.net) file +# that captures the structure of the code including all +# documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO @@ -935,319 +935,319 @@ # configuration options related to the Perl module output #--------------------------------------------------------------------------- -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the +# If the GENERATE_PERLMOD tag is set to YES Doxygen will +# generate a Perl module file that captures the structure of +# the code including all documentation. Note that this +# feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate +# the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be +# nicely formatted so it can be parsed by a human reader. This is useful +# if you want to understand what is going on. On the other hand, if this +# tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same +# The names of the make variables in the generated doxyrules.make file +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. +# This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. -PERLMOD_MAKEVAR_PREFIX = +PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- -# Configuration options related to the preprocessor +# Configuration options related to the preprocessor #--------------------------------------------------------------------------- -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will +# evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro +# names in the source code. If set to NO (the default) only conditional +# compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = NO -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES +# then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = NO -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # in the INCLUDE_PATH (see below) will be search if a #include is found. SEARCH_INCLUDES = YES -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by +# The INCLUDE_PATH tag can be used to specify one or more directories that +# contain include files that are not input files but should be processed by # the preprocessor. -INCLUDE_PATH = +INCLUDE_PATH = -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard +# patterns (like *.h and *.hpp) to filter out the header-files in the +# directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. -INCLUDE_FILE_PATTERNS = +INCLUDE_FILE_PATTERNS = -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator +# The PREDEFINED tag can be used to specify one or more macro names that +# are defined before the preprocessor is started (similar to the -D option of +# gcc). The argument of the tag is a list of macros of the form: name +# or name=definition (no spaces). If the definition and the = are +# omitted =1 is assumed. To prevent a macro definition from being +# undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED = +PREDEFINED = -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then +# this tag can be used to specify a list of macro names that should be expanded. +# The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition. -EXPAND_AS_DEFINED = +EXPAND_AS_DEFINED = -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then +# doxygen's preprocessor will remove all function-like macros that are alone +# on a line, have an all uppercase name, and do not end with a semicolon. Such +# function macros are typically used for boiler-plate code, and will confuse # the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- -# Configuration::additions related to external references +# Configuration::additions related to external references #--------------------------------------------------------------------------- -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool +# The TAGFILES option can be used to specify one or more tagfiles. +# Optionally an initial location of the external documentation +# can be added for each tagfile. The format of a tag file without +# this location is as follows: +# TAGFILES = file1 file2 ... +# Adding location for the tag files is done as follows: +# TAGFILES = file1=loc1 "file2 = loc2" ... +# where "loc1" and "loc2" can be relative or absolute paths or +# URLs. If a location is present for each tag, the installdox tool # does not have to be run to correct the links. # Note that each tag file must have a unique name # (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen +# If a tag file is not located in the directory in which doxygen # is run, you must also specify the path to the tagfile here. -TAGFILES = +TAGFILES = -# When a file name is specified after GENERATE_TAGFILE, doxygen will create +# When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. -GENERATE_TAGFILE = +GENERATE_TAGFILE = -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes +# If the ALLEXTERNALS tag is set to YES all external classes will be listed +# in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed +# in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES -# The PERL_PATH should be the absolute path and name of the perl script +# The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- -# Configuration options related to the dot tool +# Configuration options related to the dot tool #--------------------------------------------------------------------------- -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base +# or super classes. Setting the tag to NO turns the diagrams off. Note that +# this option is superseded by the HAVE_DOT option below. This is only a +# fallback. It is recommended to install and use dot, since it yields more # powerful graphs. CLASS_DIAGRAMS = YES -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented +# If set to YES, the inheritance and collaboration graphs will hide +# inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is +# available from the path. This tool is part of Graphviz, a graph visualization +# toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = NO -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect inheritance relations. Setting this tag to YES will force the # the CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen +# will generate a graph for each documented class showing the direct and +# indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and +# collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO -# If set to YES, the inheritance and collaboration graphs will show the +# If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT +# tags are set to YES then doxygen will generate a graph for each documented +# file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each +# documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a call dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable call graphs for selected # functions only using the \callgraph command. CALL_GRAPH = NO -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a caller dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable caller graphs for selected +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will +# generate a caller dependency graph for every global function or class method. +# Note that enabling this option will significantly increase the time of a run. +# So in most cases it will be better to enable caller graphs for selected # functions only using the \callergraph command. CALLER_GRAPH = NO -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES +# then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are png, jpg, or gif # If left blank png will be used. DOT_IMAGE_FORMAT = png -# The tag DOT_PATH can be used to specify the path where the dot tool can be +# The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. -DOT_PATH = +DOT_PATH = -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the +# The DOTFILE_DIRS tag can be used to specify one or more directories that +# contain dot files that are included in the documentation (see the # \dotfile command). -DOTFILE_DIRS = +DOTFILE_DIRS = -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_WIDTH = 1024 -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height +# (in pixels) of the graphs generated by dot. If a graph becomes larger than +# this value, doxygen will try to truncate the graph, so that it fits within +# the specified constraint. Beware that most browsers cannot cope with very # large images. MAX_DOT_GRAPH_HEIGHT = 1024 -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that a graph may be further truncated if the graph's -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the +# graphs generated by dot. A depth value of 3 means that only nodes reachable +# from the root by following a path via at most 3 edges will be shown. Nodes +# that lay further from the root node will be omitted. Note that setting this +# option to 1 or 2 may greatly reduce the computation time needed for large +# code bases. Also note that a graph may be further truncated if the graph's +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), # the graph is not depth-constrained. MAX_DOT_GRAPH_DEPTH = 0 -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is disabled by default, which results in a white background. -# Warning: Depending on the platform used, enabling this option may lead to -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent +# background. This is disabled by default, which results in a white background. +# Warning: Depending on the platform used, enabling this option may lead to +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to # read). DOT_TRANSPARENT = NO -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output +# files in one run (i.e. multiple -o and -T options on the command line). This +# makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will +# generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will +# remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES #--------------------------------------------------------------------------- -# Configuration::additions related to the search engine +# Configuration::additions related to the search engine #--------------------------------------------------------------------------- -# The SEARCHENGINE tag specifies whether or not a search engine should be +# The SEARCHENGINE tag specifies whether or not a search engine should be # used. If set to NO the values of all tags below this one will be ignored. SEARCHENGINE = NO diff --git a/doc/mainpage b/doc/mainpage --- a/doc/mainpage +++ b/doc/mainpage @@ -2,5 +2,5 @@ \mainpage Documentation for libcmpiutil Browse the interface headers in the "Files" tab above - + */ diff --git a/eo_parser.c b/eo_parser.c --- a/eo_parser.c +++ b/eo_parser.c @@ -115,16 +115,16 @@ CMPIStatus s; uint64_t unsigned_val = 0; int64_t signed_val = 0; - + switch(type) { case CMPI_uint64: case CMPI_uint32: case CMPI_uint16: case CMPI_uint8: unsigned_val = (uint64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(unsigned_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(unsigned_val), type); break; case CMPI_sint64: @@ -133,9 +133,9 @@ case CMPI_sint8: default: signed_val = (int64_t) value; - s = CMSetProperty(inst, - prop, - (CMPIValue *) &(signed_val), + s = CMSetProperty(inst, + prop, + (CMPIValue *) &(signed_val), type); } @@ -151,17 +151,17 @@ { if (_set_int_prop(value, prop, CMPI_uint64, inst) == 1) return CMPI_uint64; - else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) return CMPI_uint32; - else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) return CMPI_uint16; else if (_set_int_prop(value, prop, CMPI_uint8, inst) == 1) return CMPI_uint8; else if (_set_int_prop(value, prop, CMPI_sint64, inst) == 1) return CMPI_sint64; - else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) return CMPI_sint32; - else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) + else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) return CMPI_sint16; else _set_int_prop(value, prop, CMPI_sint8, inst); @@ -176,7 +176,7 @@ { CMPIString *cm_str; CMPIStatus s = {CMPI_RC_OK, NULL}; - + cm_str = CMNewString(broker, str, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(cm_str)) { CU_DEBUG("Error creating CMPIString"); diff --git a/eo_util_lexer.l b/eo_util_lexer.l --- a/eo_util_lexer.l +++ b/eo_util_lexer.l @@ -35,11 +35,11 @@ QUOTEDTEXT (\"[^"\n]*["\n]) SINGLEQUOTEDTEXT (\'[^'\n]*['\n]) FILENAME ([A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*) -PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) -HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) +PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) +HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) IPADDR ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) - /* Special mode to read CLASSNAME after reading INSTANCE OF, + /* Special mode to read CLASSNAME after reading INSTANCE OF, * otherwise cannot distinguish this token from a PROPERTYNAME */ %x READCLASSNAME @@ -143,7 +143,7 @@ void eo_parse_error(char *errmsg) { - fprintf(stderr, "error line %d: %s in '%s'\n", + fprintf(stderr, "error line %d: %s in '%s'\n", eolineno, errmsg, eo_parse_text); } diff --git a/eo_util_parser.y b/eo_util_parser.y --- a/eo_util_parser.y +++ b/eo_util_parser.y @@ -117,10 +117,10 @@ | PROPERTYNAME '=' INTEGER ';' { - EOTRACE("propertyname = %s\n", $1); + EOTRACE("propertyname = %s\n", $1); CMPIType t = set_int_prop($3, $1, *_INSTANCE); EOTRACE("\ttype = %d\n" - "\tvalue = %lld\n", t, $3); + "\tvalue = %lld\n", t, $3); free($1); } @@ -133,7 +133,7 @@ CMSetProperty(*_INSTANCE, $1, &($3), CMPI_boolean); free($1); } - | PROPERTYNAME '=' OPENBRACKET + | PROPERTYNAME '=' OPENBRACKET { EOTRACE("propertyname = %s\n" "\ttype = CMPI_charsA\n", @@ -142,8 +142,8 @@ stringarraysize = 0; stringarraypropname = $1; } - arrayofstrings CLOSEBRACKET ';' - + arrayofstrings CLOSEBRACKET ';' + | PROPERTYNAME '=' CIMNULL ';' { EOTRACE("propertyname = %s\n" @@ -152,38 +152,38 @@ } ; -arrayofstrings: STRING +arrayofstrings: STRING { - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); stringarraysize++; - stringarray = (char **)realloc(stringarray, - sizeof(char *) * + stringarray = (char **)realloc(stringarray, + sizeof(char *) * stringarraysize); stringarray[stringarraysize-1] = $1; } COMMA arrayofstrings - + | STRING { CMPIArray *arr; CMPICount i; CMPIStatus s = {CMPI_RC_OK, NULL}; - - EOTRACE("\t%s[%u]=%s\n", - propertyname, - stringarraysize, + + EOTRACE("\t%s[%u]=%s\n", + propertyname, + stringarraysize, $1); - + stringarraysize++; - arr = CMNewArray(_BROKER, - stringarraysize, - CMPI_string, + arr = CMNewArray(_BROKER, + stringarraysize, + CMPI_string, &s); if (s.rc != CMPI_RC_OK || CMIsNullObject(arr)) { EOTRACE("Error creating array\n"); @@ -200,19 +200,19 @@ if (s.rc != CMPI_RC_OK) goto str_arr_out; } - - s = ins_chars_into_cmstr_arr(_BROKER, - arr, + + s = ins_chars_into_cmstr_arr(_BROKER, + arr, stringarraysize - 1, $1); if (s.rc != CMPI_RC_OK) goto str_arr_out; - CMSetProperty(*_INSTANCE, + CMSetProperty(*_INSTANCE, stringarraypropname, &arr, CMPI_stringA); - + str_arr_out: free(stringarraypropname); for (i = 0; i < stringarraysize - 1; i++) @@ -220,9 +220,9 @@ free($1); if (s.rc != CMPI_RC_OK) { - return RC_ARR_CREAT_FAILED; + return RC_ARR_CREAT_FAILED; } - + } ; diff --git a/instance_util.c b/instance_util.c --- a/instance_util.c +++ b/instance_util.c @@ -92,15 +92,15 @@ { const char *ref_cn; const char *op_cn; - + ref_cn = CLASSNAME(ref); if (ref_cn == NULL) return false; - + op_cn = CLASSNAME(op); if (op_cn == NULL) return false; - + return STREQC(op_cn, ref_cn); } @@ -108,7 +108,7 @@ const CMPIInstance *inst) { CMPIStatus s = {CMPI_RC_OK, NULL}; - CMPIObjectPath *op; + CMPIObjectPath *op; const char *prop = NULL; int i; int count; @@ -119,14 +119,14 @@ if (!_compare_classname(ref, op)) return "CreationClassName"; - + count = CMGetKeyCount(op, &s); if (s.rc != CMPI_RC_OK) { CU_DEBUG("Unable to get key count"); return NULL; } CU_DEBUG("Number of keys: %i", count); - + for (i = 0; i < count; i++) { CMPIData kd, pd; CMPIString *str; @@ -163,14 +163,14 @@ { CMPIStatus s = {CMPI_RC_OK, NULL}; const char *prop; - + prop = cu_compare_ref(ref, inst); if (prop != NULL) { cu_statusf(broker, &s, CMPI_RC_ERR_NOT_FOUND, "No such instance (%s)", prop); } - + return s; } @@ -182,7 +182,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; if (src_name == NULL) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "No property name given"); goto out; @@ -193,7 +193,7 @@ data = CMGetProperty(src_inst, src_name, &s); if (s.rc != CMPI_RC_OK || CMIsNullValue(data)) { - cu_statusf(broker, &s, + cu_statusf(broker, &s, CMPI_RC_ERR_FAILED, "Copy failed. Could not get prop '%s'.", src_name); goto out; @@ -202,7 +202,7 @@ CMSetProperty(dest_inst, dest_name, &(data.value), data.type); out: - return s; + return s; } CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -222,7 +222,7 @@ "Could not get objectpath from instance"); goto out; } - + dest = CMNewInstance(broker, ref, s); prop_count = CMGetPropertyCount(src, s); @@ -242,8 +242,8 @@ if (s->rc != CMPI_RC_OK) { goto out; } - - *s = CMSetProperty(dest, prop_name, + + *s = CMSetProperty(dest, prop_name, &(data.value), data.type); if (s->rc != CMPI_RC_OK) { goto out; @@ -302,7 +302,7 @@ ref = CMGetObjectPath(inst, NULL); if (CMIsNullObject(ref)) goto out; - + ret = CLASSNAME(ref); out: diff --git a/libcmpiutil.h b/libcmpiutil.h --- a/libcmpiutil.h +++ b/libcmpiutil.h @@ -44,7 +44,7 @@ #define CU_STRINGIFY(x) _CU_STRINGIFY(x) /** - * Dispatch macro for debug_print, fills in the function name and line number + * Dispatch macro for debug_print, fills in the function name and line number * of caller. */ #define CU_DEBUG(fmt, args...) { \ @@ -60,7 +60,7 @@ void debug_print(char *fmt, ...); /** - * Copies a property from one CMPIInstance to another. If dest_name is NULL, + * Copies a property from one CMPIInstance to another. If dest_name is NULL, * it is assumed to be the same as src_name. * * @param broker CIM broker, needed for status calls @@ -69,7 +69,7 @@ * @param src_name Name of property to be copied from src_inst * @param dest_name Name of property to be copied to dest_inst */ -CMPIStatus cu_copy_prop(const CMPIBroker *broker, +CMPIStatus cu_copy_prop(const CMPIBroker *broker, CMPIInstance *src_inst, CMPIInstance *dest_inst, char *src_name, char *dest_name); @@ -167,7 +167,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIStatus cu_merge_instances(CMPIInstance *src, @@ -178,7 +178,7 @@ * * @param src Source instance * @param dest Destination instance - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and * error message otherwise */ CMPIInstance *cu_dup_instance(const CMPIBroker *broker, @@ -226,8 +226,8 @@ * @param prop The property name * @param target A pointer to a CMPIarray that will be set * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not an array, * - CMPI_RC_ERROR otherwise @@ -243,8 +243,8 @@ * @param prop The property name * @param target A pointer to a char* that will be set to a malloc'd string * if successful - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a string, * - CMPI_RC_ERROR otherwise @@ -259,8 +259,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a bool that will reflect the property status - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a boolean, * - CMPI_RC_ERROR otherwise @@ -291,8 +291,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint32_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint32, * - CMPI_RC_ERROR otherwise @@ -307,8 +307,8 @@ * @param inst The instance * @param prop The property name * @param target A pointer to a uint64_t that will reflect the property value - * @returns - * - CMPI_RC_OK on success, + * @returns + * - CMPI_RC_OK on success, * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint64, * - CMPI_RC_ERROR otherwise @@ -425,7 +425,7 @@ /** * Validate a client given reference against the system instance. - * This is done by comparing the key values of the reference + * This is done by comparing the key values of the reference * against the key properties found in the system instance. * * @param broker A pointer to the current broker @@ -440,7 +440,7 @@ const CMPIInstance *inst); /** - * Returns the classname from an instance without forcing user to get + * Returns the classname from an instance without forcing user to get * ObjectPath first. * * @param inst Instance to examine diff --git a/libcmpiutil.spec.in b/libcmpiutil.spec.in --- a/libcmpiutil.spec.in +++ b/libcmpiutil.spec.in @@ -20,7 +20,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %package devel Summary: Libraries, includes, etc. to use the CMPI utility library @@ -34,7 +34,7 @@ The goal is to reduce the amount of repetitive work done in most CMPI providers by encapsulating common procedures with more "normal" APIs. This extends from operations like getting typed -instance properties to standardizing method dispatch and argument checking. +instance properties to standardizing method dispatch and argument checking. %prep %setup -q @@ -58,7 +58,7 @@ %postun -p /sbin/ldconfig -%files +%files %defattr(-, root, root, -) %doc doc/doxygen.conf doc/mainpage README COPYING diff --git a/std_association.c b/std_association.c --- a/std_association.c +++ b/std_association.c @@ -68,7 +68,7 @@ if (comp_class_list == NULL) return true; - + for (i = 0; comp_class_list[i]; i++) { comp_class = comp_class_list[i]; rop = CMNewObjectPath(broker, ns, comp_class, NULL); @@ -89,10 +89,10 @@ for (i = 0; ptr->source_class[i]; i++) { source_class = ptr->source_class[i]; - - if (CMClassPathIsA(broker, - ref, - source_class, + + if (CMClassPathIsA(broker, + ref, + source_class, NULL)) return true; } @@ -151,9 +151,9 @@ if (!match_source_class(ctx->brkr, ref, ptr)) { CU_DEBUG("Source class doesn't match"); - continue; + continue; } - + if (!ptr) { CU_DEBUG("Invalid pointer"); continue; @@ -162,50 +162,50 @@ if (info->assoc_class) { CU_DEBUG("Check client's assocClass: '%s'", info->assoc_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), + + rc = match_class(ctx->brkr, + NAMESPACE(ref), info->assoc_class, ptr->assoc_class); - + if (!rc) { CU_DEBUG("AssocClass not valid."); continue; } CU_DEBUG("AssocClass valid."); } - + if (info->result_class) { CU_DEBUG("Check client's resultClass: '%s'", info->result_class); - - rc = match_class(ctx->brkr, - NAMESPACE(ref), - info->result_class, + + rc = match_class(ctx->brkr, + NAMESPACE(ref), + info->result_class, ptr->target_class); - + if (!rc) { CU_DEBUG("ResultClass not valid."); continue; } CU_DEBUG("ResultClass valid."); } - + if (info->role) { CU_DEBUG("Check client's role: '%s'", info->role); - + if (!STREQC(info->role, ptr->source_prop)) { CU_DEBUG("Invalid role"); continue; } CU_DEBUG("Role valid."); } - + if (info->result_role) { CU_DEBUG("Check client's resultRole: '%s'", info->result_role); - + if (!STREQC(info->result_role, ptr->target_prop)) { CU_DEBUG("ResultRole not valid."); continue; @@ -216,9 +216,9 @@ goto out; } - CU_DEBUG("No valid handler found"); + CU_DEBUG("No valid handler found"); ptr = NULL; - + out: return ptr; } @@ -240,11 +240,11 @@ for (i = 0; i < tmp_list.cur; i++) { CMPIInstance *refinst; - + refinst = handler->make_ref(ref, tmp_list.list[i], info, handler); if (refinst == NULL) continue; - + inst_list_add(list, refinst); } @@ -271,7 +271,7 @@ CU_DEBUG("filter_results did not return CMPI_RC_OK."); return s; } - + return s; } @@ -377,7 +377,7 @@ info, ref, &list); - + if (s.rc != CMPI_RC_OK) { CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); goto out; diff --git a/std_association.h b/std_association.h --- a/std_association.h +++ b/std_association.h @@ -41,18 +41,18 @@ * std_assoc is the definition that the developer puts in their source file. It * defines an association relationship between a set of source and target * classes, through a named (set of) association classes and the function - * handler which does the work. - * It must be registered using the macro STDA_AssocMIStub. + * handler which does the work. + * It must be registered using the macro STDA_AssocMIStub. */ struct std_assoc { - /* Defines the list of possible classes that can be passed to the + /* Defines the list of possible classes that can be passed to the association for this case */ char **source_class; - - /* Defines the property of the association class that refers + + /* Defines the property of the association class that refers to the input (source class) of this case. This must match - that of the schema, and is used for automatic generation of + that of the schema, and is used for automatic generation of the reference object in the References() or ReferenceNames() operation */ char *source_prop; @@ -63,20 +63,20 @@ /* Same as source_prop, applied for target */ char *target_prop; - + /* Defines the list of association classes which are implemented by this handler */ char **assoc_class; /* Function handler responsible for doing the association and returning the list of target instances of the association. - The handler function receives the reference of the source - class of the association and must map it to a list of + The handler function receives the reference of the source + class of the association and must map it to a list of CMPIInstance objects (targets of the association). */ assoc_handler_t handler; /* Function handler responsible for creating an instance of the - association class. + association class. The handler function receives the source object path, and the target instance, so it can create the reference which is returned by the function. */ diff --git a/std_indication.c b/std_indication.c --- a/std_indication.c +++ b/std_indication.c @@ -49,7 +49,7 @@ break; } } - + if (filter == NULL) CU_DEBUG("get_ind_filter: failed to find %s", ind_name); @@ -76,7 +76,7 @@ "No std_ind_filter for %s", ind_name); goto out; } - + ret = filter->active; if (!ret) CU_DEBUG("Indication '%s' not in active filter", ind_name); @@ -101,12 +101,12 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; s = CMSetObjectPath(ind, ref); - if (s.rc != CMPI_RC_OK) + if (s.rc != CMPI_RC_OK) return s; CBDeliverIndication(broker, - context, - NAMESPACE(ref), + context, + NAMESPACE(ref), ind); return s; } @@ -209,7 +209,7 @@ "Provider has no indication '%s'", ind_name); goto out; } - + filter->active = state; out: @@ -226,7 +226,7 @@ CMPIStatus s = {CMPI_RC_OK, NULL}; struct std_indication_ctx *_ctx; const char *cn = NULL; - + _ctx = (struct std_indication_ctx *)mi->hdl; cn = CLASSNAME(op); s = stdi_set_ind_filter_state(_ctx, cn, true); @@ -397,7 +397,7 @@ return s; CBInvokeMethod(broker, context, op, method, argsin, argsout, &s); - + return s; } diff --git a/std_instance.h b/std_instance.h --- a/std_instance.h +++ b/std_instance.h @@ -24,11 +24,11 @@ #define __STD_INSTANCE_H /** - * Generates the function table and initialization stub for an + * Generates the function table and initialization stub for an * instance provider. - * @param pfx The prefix for all mandatory association provider + * @param pfx The prefix for all mandatory association provider * functions. - * @param pn The provider name under which this provider is + * @param pn The provider name under which this provider is * registered. * @param broker The CMPIBroker pointer. * @param hook Perform additional initialization functions. diff --git a/std_invokemethod.c b/std_invokemethod.c --- a/std_invokemethod.c +++ b/std_invokemethod.c @@ -70,7 +70,7 @@ return 0; } - return 1; + return 1; } static int parse_eo_array(CMPIArray *strings_in, @@ -168,9 +168,9 @@ return 1; } -static int validate_arg_type(struct method_arg *arg, +static int validate_arg_type(struct method_arg *arg, const CMPIArgs *args, - const CMPIBroker *broker, + const CMPIBroker *broker, const char *ns, CMPIArgs *new_args, CMPIStatus *s) @@ -228,7 +228,7 @@ return 1; } -static int validate_args(struct method_handler *h, +static int validate_args(struct method_handler *h, const CMPIArgs **args, const CMPIObjectPath *ref, const CMPIBroker *broker, @@ -243,10 +243,10 @@ int ret; struct method_arg *arg = &h->args[i]; - ret = validate_arg_type(arg, - *args, - broker, - NAMESPACE(ref), + ret = validate_arg_type(arg, + *args, + broker, + NAMESPACE(ref), new_args, s); if (!ret) @@ -288,10 +288,10 @@ goto exit; } - ret = validate_args(h, - &argsin, + ret = validate_args(h, + &argsin, reference, - ctx->broker, + ctx->broker, &s); if (!ret) goto exit; @@ -302,7 +302,7 @@ exit: CMReturnDone(results); - return s; + return s; } CMPIStatus _std_cleanup(CMPIMethodMI *self, diff --git a/tools/indication_tester.py b/tools/indication_tester.py --- a/tools/indication_tester.py +++ b/tools/indication_tester.py @@ -14,264 +14,264 @@ def filter_xml(name, type, ns, sysname): return """ - - - - - - - - - - + + + + + + + + + + - - CIM_ComputerSystem - - - %s - - - CIM_IndicationFilter - - - %sFilter - - - SELECT * FROM %s - - - - WQL - - - %s - - - - - - + + CIM_ComputerSystem + + + %s + + + CIM_IndicationFilter + + + %sFilter + + + SELECT * FROM %s + + + + WQL + + + %s + + + + + + """ % (sysname, name, type, ns) def handler_xml(name, port, sysname): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_IndicationHandlerCIMXML - - - %sHandler - - - http://localhost:%i - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_IndicationHandlerCIMXML + + + %sHandler + + + http://localhost:%i + + + + + + """ % (sysname, name, port) def subscription_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - - %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - 2 - - - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + + %s + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + 2 + + + + + + """ % (sysname, name, sysname, name) def delete_inst_xml(name, type, sysname, inst_name): return """ - - - - - - - - - - - - - CIM_ComputerSystem - - - %s - - - CIM_Indication%s - - - %s - - - - - - + + + + + + + + + + + + + CIM_ComputerSystem + + + %s + + + CIM_Indication%s + + + %s + + + + + + ; """ % (type, sysname, type, inst_name); def delete_sub_xml(name, sysname): return """ - - - - - - - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + + + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationFilter - - - - - %sFilter - - - - - - - - - - - CIM_ComputerSystem - - - - + + + + + CIM_IndicationFilter + + + + + %sFilter + + + + + + + + + + + CIM_ComputerSystem + + + + %s - - - - - CIM_IndicationHandlerCIMXML - - - - - %sHandler - - - - - - - - - - + + + + + CIM_IndicationHandlerCIMXML + + + + + %sHandler + + + + + + + + + + ; """ % (sysname, name, sysname, name) @@ -304,8 +304,8 @@ self.ns = ns self.sysname = sysname - self.port = 8000 + port - self.server = BaseHTTPServer.HTTPServer(('', self.port), + self.port = 8000 + port + self.server = BaseHTTPServer.HTTPServer(('', self.port), CIMSocketHandler) self.server.print_ind = print_ind self.server.indications = [] @@ -319,14 +319,14 @@ "CIMMethod" : method, "CIMObject" : "root/PG_Interop", "Content-Type" : 'application/xml; charset="utf-8"'} - + if auth_hdr: headers["Authorization"] = "Basic %s" % auth_hdr conn.request("POST", "/cimom", body, headers) resp = conn.getresponse() if not resp.getheader("content-length"): - raise Exception("Request Failed: %d %s" % + raise Exception("Request Failed: %d %s" % (resp.status, resp.reason)) resp.read() @@ -380,11 +380,11 @@ print "DeleteHandler:\n%s\n" % del_handler_str print "CreateSubscription:\n%s\n" % subscript_str print "DeleteSubscription:\n%s\n" % del_subscript_str - + def main(): usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" parser = OptionParser(usage) - + parser.add_option("-u", "--url", dest="url", default="localhost:5988", help="URL of CIMOM to connect to (host:port)") parser.add_option("-N", "--ns", dest="ns", default="root/virt", @@ -410,17 +410,17 @@ if len(args) == 0: print "Fatal: no indication type provided." sys.exit(1) - + if options.username: auth = (options.username, options.password) else: auth = None - + if ":" in options.url: (sysname, port) = options.url.split(":") else: sysname = options.url - + if options.dump: dump_xml(options.name, args[0], options.ns, sysname) sys.exit(0) From eblima at linux.vnet.ibm.com Mon May 16 17:59:35 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 16 May 2011 14:59:35 -0300 Subject: [Libvirt-cim] [PATCH 0 of 7] (#3) libcmpiutil: "Cosmetics" In-Reply-To: References: Message-ID: <4DD16607.7070908@linux.vnet.ibm.com> On 05/16/2011 02:47 PM, Eduardo Lima (Etrunko) wrote: > Third version of the series, this time with two new patches: > > 6/7: Removes exec permission from source code files. > 7/7: Shuts up automake by defining LEX_OUTPUT_ROOT in configure.ac instead of > Makefile.am. > > Best regards, > FYI, I have found a mercurial extension that makes the job of importing patches sent to the mailing list much easier: http://mercurial.selenic.com/wiki/MboxExtension I would strongly recommend it. Already tested with this very series of patches and it worked very well. Best regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From cvincent at linux.vnet.ibm.com Tue May 17 14:09:33 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 17 May 2011 10:09:33 -0400 Subject: [Libvirt-cim] [PATCH] Fix connection leaks In-Reply-To: References: Message-ID: <4DD2819D.70307@linux.vnet.ibm.com> Code looks good, but I have a few comments below. Also, I'm still seeing 2 handles leaked per cimtest run. On 05/13/2011 10:54 AM, Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1305298464 25200 > # Node ID d0ccdb5447c796123c0175873c6d108a77dc1e39 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Fix connection leaks. > > libvirt-cim had few connection leaks which were causing it to crash. > > Signed-off-by: Sharad Mishra > > diff -r 8b428df21c36 -r d0ccdb5447c7 libxkutil/pool_parsing.c > --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/pool_parsing.c Fri May 13 07:54:24 2011 -0700 > @@ -453,6 +453,7 @@ > CU_DEBUG("Unable to refresh storage " > "pool"); > } > + virStoragePoolFree(pool_ptr); > ret = 1; > } > > diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_AllocationCapabilities.c > --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_AllocationCapabilities.c Fri May 13 07:54:24 2011 -0700 > @@ -79,7 +79,6 @@ > const char *id, > struct inst_list *list) > { > - virConnectPtr conn = NULL; > CMPIInstance *alloc_cap_inst; > struct inst_list device_pool_list; > CMPIStatus s = {CMPI_RC_OK, NULL}; > @@ -91,15 +90,6 @@ > if (!provider_is_responsible(broker, ref,&s)) > goto out; > > - conn = connect_by_classname(broker, CLASSNAME(ref),&s); > - if (conn == NULL) { > - if (id) > - cu_statusf(broker,&s, > - CMPI_RC_ERR_NOT_FOUND, > - "Instance not found."); > - goto out; > - } > - > s = enum_pools(broker, ref, CIM_RES_TYPE_ALL,&device_pool_list); > if (s.rc != CMPI_RC_OK) { > cu_statusf(broker,&s, > @@ -141,7 +131,6 @@ > } > > out: > - virConnectClose(conn); > inst_list_free(&device_pool_list); > > return s; > diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystem.c Fri May 13 07:54:24 2011 -0700 > @@ -938,12 +938,12 @@ > goto out; > } > > - dom = virDomainLookupByName(conn, > + virDomainPtr dom2 = virDomainLookupByName(conn, > virDomainGetName(dom)); declaration of virDomainPtr should be moved to top of function and named something like _dom, which seems to be the pattern to avoid varibale name collisions. > > - if (dom == NULL) { > - dom = virDomainDefineXML(conn, xml); > - if (dom == NULL) { > + if (dom2 == NULL) { > + dom2 = virDomainDefineXML(conn, xml); > + if (dom2 == NULL) { > CU_DEBUG("Failed to define domain from XML"); > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -953,10 +953,10 @@ > } > } > > - if (!domain_online(dom)) > + if (!domain_online(dom2)) > CU_DEBUG("Guest is now offline"); > > - ret = virDomainCreate(dom); > + ret = virDomainCreate(dom2); > if (ret != 0) > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -965,6 +965,8 @@ > > out::4 > free(xml); > + virDomainFree(dom2); > + virConnectClose(conn); > > return s; > } > diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_ComputerSystemIndication.c > --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystemIndication.c Fri May 13 07:54:24 2011 -0700 > @@ -422,7 +422,6 @@ > } > > static bool async_ind(CMPIContext *context, > - virConnectPtr conn, > int ind_type, > struct dom_xml prev_dom, > char *prefix, > @@ -557,7 +556,7 @@ > for (i = 0; i< cur_count; i++) { > res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); > if (!res) > - async_ind(context, conn, CS_CREATED, > + async_ind(context, CS_CREATED, > cur_xml[i], prefix, args); > > } > @@ -565,14 +564,14 @@ > for (i = 0; i< prev_count; i++) { > res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); > if (!res) > - async_ind(context, conn, CS_DELETED, > + async_ind(context, CS_DELETED, > prev_xml[i], prefix, args); > } > > for (i = 0; i< prev_count; i++) { > res = dom_changed(prev_xml[i], cur_xml, cur_count); > if (res) { > - async_ind(context, conn, CS_MODIFIED, > + async_ind(context, CS_MODIFIED, > prev_xml[i], prefix, args); > > } > diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_DevicePool.c > --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_DevicePool.c Fri May 13 07:54:24 2011 -0700 > @@ -451,8 +451,8 @@ > > free(host); > free(dev); > + virDomainFree(dom); > virConnectClose(conn); > - virDomainFree(dom); > > return pool; > } > diff -r 8b428df21c36 -r d0ccdb5447c7 src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Fri May 13 07:54:24 2011 -0700 > @@ -1511,6 +1511,7 @@ > > out: > CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); > + virConnectClose(job->conn); It appears the job->conn is also released at ~1284 in migration_thread(). Since any number of errors in migrate_do() can result in leaks, I suggest you move all the frees from migration_thread() to migrate_do() just as you have done with virConnectClose(). > > return s; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From eblima at linux.vnet.ibm.com Tue May 17 18:48:08 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 17 May 2011 15:48:08 -0300 Subject: [Libvirt-cim] [PATCH] Ensure graphics devices have unique IDs In-Reply-To: <90f8c9f2388e0563baa3.1305131983@oc0840652111.ibm.com> References: <90f8c9f2388e0563baa3.1305131983@oc0840652111.ibm.com> Message-ID: <4DD2C2E8.30203@linux.vnet.ibm.com> On 05/11/2011 01:39 PM, Chip Vincent wrote: > # HG changeset patch > # User Chip Vincent > # Date 1305131981 14400 > # Node ID 90f8c9f2388e0563baa311c84024ca41a61e1890 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Ensure graphics devices have unique IDs > > Now that multiple graphics device types are supported, it important that they have unique names that are consistent over time. This patch updates the graphics->id to replace 'graphics' with for vnc and: for serial/console. The port is ommitted from vnc connections because it changes when VM started if autoport is enabled and only one connection is currently supported. The source path is ommitted from serial/console connections because it is present only when the VM is running. Since libvirt limits the number of serial/console pty resources and ensures they have unique ports, the source path is not necessary to ensure consistent unique names. > > Examples of new graphics id format: > InstanceID="test_domain/serial:0" > InstanceID="test_domain/serial:1" > InstanceID="test_domain/console:0" > InstanceID="test_domain/vnc" > After struggling with the setup on my machine, I have finally been able to test the patch. It looks like the patch is ok, but somehow I do not get a vnc instance with wbemcli, even though virsh dumpxml shows it. See the outupt in attached file. Best regards, Etrunko. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: outuput.txt URL: From cvincent at linux.vnet.ibm.com Tue May 17 19:31:03 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 17 May 2011 15:31:03 -0400 Subject: [Libvirt-cim] [PATCH] Ensure graphics devices have unique IDs In-Reply-To: <4DD2C2E8.30203@linux.vnet.ibm.com> References: <90f8c9f2388e0563baa3.1305131983@oc0840652111.ibm.com> <4DD2C2E8.30203@linux.vnet.ibm.com> Message-ID: <4DD2CCF7.2080602@linux.vnet.ibm.com> The reason your not seeing a vnc instance is because libvirt-cim expects the 'listen' parameter. Please add 'listen=127.0.0.1' to the graphics element, update the VM, and re-run the wbemcli and you should see an instance for vnc. On 05/17/2011 02:48 PM, Eduardo Lima (Etrunko) wrote: > On 05/11/2011 01:39 PM, Chip Vincent wrote: >> # HG changeset patch >> # User Chip Vincent >> # Date 1305131981 14400 >> # Node ID 90f8c9f2388e0563baa311c84024ca41a61e1890 >> # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 >> Ensure graphics devices have unique IDs >> >> Now that multiple graphics device types are supported, it important >> that they have unique names that are consistent over time. This patch >> updates the graphics->id to replace 'graphics' with for >> vnc and: for serial/console. The port is ommitted >> from vnc connections because it changes when VM started if autoport is >> enabled and only one connection is currently supported. The source >> path is ommitted from serial/console connections because it is present >> only when the VM is running. Since libvirt limits the number of >> serial/console pty resources and ensures they have unique ports, the >> source path is not necessary to ensure consistent unique names. >> >> Examples of new graphics id format: >> InstanceID="test_domain/serial:0" >> InstanceID="test_domain/serial:1" >> InstanceID="test_domain/console:0" >> InstanceID="test_domain/vnc" >> > > After struggling with the setup on my machine, I have finally been able > to test the patch. It looks like the patch is ok, but somehow I do not > get a vnc instance with wbemcli, even though virsh dumpxml shows it. See > the outupt in attached file. > > Best regards, Etrunko. > -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From eblima at linux.vnet.ibm.com Tue May 17 19:35:19 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 17 May 2011 16:35:19 -0300 Subject: [Libvirt-cim] [PATCH] Ensure graphics devices have unique IDs In-Reply-To: <4DD2CCF7.2080602@linux.vnet.ibm.com> References: <90f8c9f2388e0563baa3.1305131983@oc0840652111.ibm.com> <4DD2C2E8.30203@linux.vnet.ibm.com> <4DD2CCF7.2080602@linux.vnet.ibm.com> Message-ID: <4DD2CDF7.7060408@linux.vnet.ibm.com> On 05/17/2011 04:31 PM, Chip Vincent wrote: > The reason your not seeing a vnc instance is because libvirt-cim expects > the 'listen' parameter. Please add 'listen=127.0.0.1' to the > graphics element, update the VM, and re-run the wbemcli and you should > see an instance for vnc. > You are right, thanks for the clarification. Results follow: [etrunko at eblima libcmpiutil.orig]$ wbemcli -nl ein http://root at localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f14-vmtest/serial:0" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f14-vmtest/serial:1" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f14-vmtest/console:0" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f14-vmtest/vnc" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f15-test/serial:0" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f15-test/console:0" localhost:5988/root/virt:KVM_GraphicsResourceAllocationSettingData.InstanceID="f15-test/vnc" So I think this patch has finally got the ACK. :D Cheers, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From snmishra at us.ibm.com Tue May 17 18:43:18 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Tue, 17 May 2011 11:43:18 -0700 Subject: [Libvirt-cim] [PATCH] (#2) Fix connection leaks Message-ID: # HG changeset patch # User Sharad Mishra # Date 1305650840 25200 # Node ID e780814a3ab17bd84c0f69dfb2fa0a4f5bc8efab # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 (#2) Fix connection leaks. libvirt-cim had few connection leaks which were causing it to crash. Signed-off-by: Sharad Mishra #2 - cimtest showed another leak, which was fixed in this version. diff -r 8b428df21c36 -r e780814a3ab1 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/pool_parsing.c Tue May 17 09:47:20 2011 -0700 @@ -453,6 +453,7 @@ CU_DEBUG("Unable to refresh storage " "pool"); } + virStoragePoolFree(pool_ptr); ret = 1; } diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_AllocationCapabilities.c Tue May 17 09:47:20 2011 -0700 @@ -79,7 +79,6 @@ const char *id, struct inst_list *list) { - virConnectPtr conn = NULL; CMPIInstance *alloc_cap_inst; struct inst_list device_pool_list; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -91,15 +90,6 @@ if (!provider_is_responsible(broker, ref, &s)) goto out; - conn = connect_by_classname(broker, CLASSNAME(ref), &s); - if (conn == NULL) { - if (id) - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "Instance not found."); - goto out; - } - s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, @@ -141,7 +131,6 @@ } out: - virConnectClose(conn); inst_list_free(&device_pool_list); return s; diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystem.c Tue May 17 09:47:20 2011 -0700 @@ -938,12 +938,12 @@ goto out; } - dom = virDomainLookupByName(conn, + virDomainPtr dom2 = virDomainLookupByName(conn, virDomainGetName(dom)); - if (dom == NULL) { - dom = virDomainDefineXML(conn, xml); - if (dom == NULL) { + if (dom2 == NULL) { + dom2 = virDomainDefineXML(conn, xml); + if (dom2 == NULL) { CU_DEBUG("Failed to define domain from XML"); virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -953,10 +953,10 @@ } } - if (!domain_online(dom)) + if (!domain_online(dom2)) CU_DEBUG("Guest is now offline"); - ret = virDomainCreate(dom); + ret = virDomainCreate(dom2); if (ret != 0) virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -965,6 +965,7 @@ out: free(xml); + virDomainFree(dom2); return s; } diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystemIndication.c Tue May 17 09:47:20 2011 -0700 @@ -422,7 +422,6 @@ } static bool async_ind(CMPIContext *context, - virConnectPtr conn, int ind_type, struct dom_xml prev_dom, char *prefix, @@ -557,7 +556,7 @@ for (i = 0; i < cur_count; i++) { res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); if (!res) - async_ind(context, conn, CS_CREATED, + async_ind(context, CS_CREATED, cur_xml[i], prefix, args); } @@ -565,14 +564,14 @@ for (i = 0; i < prev_count; i++) { res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); if (!res) - async_ind(context, conn, CS_DELETED, + async_ind(context, CS_DELETED, prev_xml[i], prefix, args); } for (i = 0; i < prev_count; i++) { res = dom_changed(prev_xml[i], cur_xml, cur_count); if (res) { - async_ind(context, conn, CS_MODIFIED, + async_ind(context, CS_MODIFIED, prev_xml[i], prefix, args); } diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_DevicePool.c Tue May 17 09:47:20 2011 -0700 @@ -451,8 +451,8 @@ free(host); free(dev); + virDomainFree(dom); virConnectClose(conn); - virDomainFree(dom); return pool; } diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Tue May 17 09:47:20 2011 -0700 @@ -1511,6 +1511,7 @@ out: CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); + virConnectClose(job->conn); return s; } From cvincent at linux.vnet.ibm.com Wed May 18 15:29:32 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 18 May 2011 11:29:32 -0400 Subject: [Libvirt-cim] [PATCH] (#2) Fix connection leaks In-Reply-To: References: Message-ID: <4DD3E5DC.2080600@linux.vnet.ibm.com> After 3 runs, cimtest starts and stays at 1 connection, so this definitely resolves the leaks. Please address my comments in the first version of this patch and I'll review and get this upstream asap. Thanks! On 05/17/2011 02:43 PM, Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1305650840 25200 > # Node ID e780814a3ab17bd84c0f69dfb2fa0a4f5bc8efab > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > (#2) Fix connection leaks. > > libvirt-cim had few connection leaks which were causing it to crash. > > Signed-off-by: Sharad Mishra > > #2 - cimtest showed another leak, which was fixed in this version. > > diff -r 8b428df21c36 -r e780814a3ab1 libxkutil/pool_parsing.c > --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/pool_parsing.c Tue May 17 09:47:20 2011 -0700 > @@ -453,6 +453,7 @@ > CU_DEBUG("Unable to refresh storage " > "pool"); > } > + virStoragePoolFree(pool_ptr); > ret = 1; > } > > diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_AllocationCapabilities.c > --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_AllocationCapabilities.c Tue May 17 09:47:20 2011 -0700 > @@ -79,7 +79,6 @@ > const char *id, > struct inst_list *list) > { > - virConnectPtr conn = NULL; > CMPIInstance *alloc_cap_inst; > struct inst_list device_pool_list; > CMPIStatus s = {CMPI_RC_OK, NULL}; > @@ -91,15 +90,6 @@ > if (!provider_is_responsible(broker, ref,&s)) > goto out; > > - conn = connect_by_classname(broker, CLASSNAME(ref),&s); > - if (conn == NULL) { > - if (id) > - cu_statusf(broker,&s, > - CMPI_RC_ERR_NOT_FOUND, > - "Instance not found."); > - goto out; > - } > - > s = enum_pools(broker, ref, CIM_RES_TYPE_ALL,&device_pool_list); > if (s.rc != CMPI_RC_OK) { > cu_statusf(broker,&s, > @@ -141,7 +131,6 @@ > } > > out: > - virConnectClose(conn); > inst_list_free(&device_pool_list); > > return s; > diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystem.c Tue May 17 09:47:20 2011 -0700 > @@ -938,12 +938,12 @@ > goto out; > } > > - dom = virDomainLookupByName(conn, > + virDomainPtr dom2 = virDomainLookupByName(conn, > virDomainGetName(dom)); > > - if (dom == NULL) { > - dom = virDomainDefineXML(conn, xml); > - if (dom == NULL) { > + if (dom2 == NULL) { > + dom2 = virDomainDefineXML(conn, xml); > + if (dom2 == NULL) { > CU_DEBUG("Failed to define domain from XML"); > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -953,10 +953,10 @@ > } > } > > - if (!domain_online(dom)) > + if (!domain_online(dom2)) > CU_DEBUG("Guest is now offline"); > > - ret = virDomainCreate(dom); > + ret = virDomainCreate(dom2); > if (ret != 0) > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -965,6 +965,7 @@ > > out: > free(xml); > + virDomainFree(dom2); > > return s; > } > diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_ComputerSystemIndication.c > --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystemIndication.c Tue May 17 09:47:20 2011 -0700 > @@ -422,7 +422,6 @@ > } > > static bool async_ind(CMPIContext *context, > - virConnectPtr conn, > int ind_type, > struct dom_xml prev_dom, > char *prefix, > @@ -557,7 +556,7 @@ > for (i = 0; i< cur_count; i++) { > res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); > if (!res) > - async_ind(context, conn, CS_CREATED, > + async_ind(context, CS_CREATED, > cur_xml[i], prefix, args); > > } > @@ -565,14 +564,14 @@ > for (i = 0; i< prev_count; i++) { > res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); > if (!res) > - async_ind(context, conn, CS_DELETED, > + async_ind(context, CS_DELETED, > prev_xml[i], prefix, args); > } > > for (i = 0; i< prev_count; i++) { > res = dom_changed(prev_xml[i], cur_xml, cur_count); > if (res) { > - async_ind(context, conn, CS_MODIFIED, > + async_ind(context, CS_MODIFIED, > prev_xml[i], prefix, args); > > } > diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_DevicePool.c > --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_DevicePool.c Tue May 17 09:47:20 2011 -0700 > @@ -451,8 +451,8 @@ > > free(host); > free(dev); > + virDomainFree(dom); > virConnectClose(conn); > - virDomainFree(dom); > > return pool; > } > diff -r 8b428df21c36 -r e780814a3ab1 src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Tue May 17 09:47:20 2011 -0700 > @@ -1511,6 +1511,7 @@ > > out: > CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); > + virConnectClose(job->conn); > > return s; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Wed May 18 17:49:18 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 18 May 2011 13:49:18 -0400 Subject: [Libvirt-cim] [PATCH] [TEST] Update Graphics RASD tests to handle new InstanceIDs Message-ID: # HG changeset patch # User Chip Vincent # Date 1305740945 14400 # Node ID d6951b8799a80d0e5b3639b6f75da405c32a9a77 # Parent 4c8e0c673d796ae7a5e17ee771d935e449b77bce [TEST] Update Graphics RASD tests to handle new InstanceIDs Graphics RASDs now include support for serial/consoel devices, which includes support for unqiue InstanceIDs. This patch updates the test to look for /vnc where is used to just look for graphics. NOTE: VirtualSystemManagementService/13_refconfig_additional_devs.py fails due to a problem in libvirt-cim. Seperate patch to follow shortly. Signed-off-by: Chip Vincent diff --git a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py @@ -147,7 +147,7 @@ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if curr_cim_rev >= input_graphics_pool_rev: keys['InputResourceAllocationSettingData'] = input_device - keys['GraphicsResourceAllocationSettingData'] = "%s/graphics" % test_dom + keys['GraphicsResourceAllocationSettingData'] = "%s/vnc" % test_dom ret = cxml.cim_define(options.ip) if not ret: diff --git a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py @@ -144,7 +144,7 @@ display = { 'SystemName' : test_dom, 'CreationClassName' : display_inst, - 'DeviceID' : "%s/%s" % (test_dom, "graphics"), + 'DeviceID' : "%s/%s" % (test_dom, "vnc"), } point = { diff --git a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py --- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py @@ -92,7 +92,7 @@ if not ret: raise Exception("Failed to define the dom: %s" % test_dom) - devid = "%s/%s" % (test_dom, 'graphics') + devid = "%s/%s" % (test_dom, 'vnc') vnc = get_typed_class(virt, "DisplayController") key_list = { 'DeviceID' : devid, 'CreationClassName' : vnc, diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py @@ -118,7 +118,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= input_graphics_pool_rev: graphics_cn = get_typed_class(virt, "DisplayController") - exp_pllist[graphics_cn] = ['%s/graphics' % test_dom] + exp_pllist[graphics_cn] = ['%s/vnc' % test_dom] try: diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py @@ -49,7 +49,7 @@ classname, len(rasd_list)) return FAIL - inst_id = "%s/graphics" % default_dom + inst_id = "%s/vnc" % default_dom for rasd in rasd_list: # Verify the Password for the domain is set if rasd['InstanceID'] == inst_id: diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py @@ -100,7 +100,7 @@ rlist.append(input) rlist.append(graphics) prop_list[input] = "%s/%s" % (test_dom, input_device) - prop_list[graphics] = "%s/%s" % (test_dom, "graphics") + prop_list[graphics] = "%s/%s" % (test_dom, "vnc") if virt == 'LXC': prop_list = {rlist[1] : "%s/%s" % (test_dom, "mem")} diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py @@ -95,7 +95,7 @@ "disk_rasd" : '%s/%s' %(test_dom, test_disk), "mem_rasd" : '%s/%s' %(test_dom, "mem"), "input_rasd": '%s/%s' %(test_dom, input_device), - "grap_rasd" : '%s/%s' %(test_dom, "graphics") + "grap_rasd" : '%s/%s' %(test_dom, "vnc") } diff --git a/suites/libvirt-cim/lib/XenKvmLib/rasd.py b/suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py @@ -110,7 +110,7 @@ "VirtualQuantity" : (t_mem * 1024), }, dc_cn : { - "InstanceID" : "%s/%s" %(t_dom, "graphics") + "InstanceID" : "%s/%s" %(t_dom, "vnc") }, pd_cn : { "InstanceID" : point_device From snmishra at us.ibm.com Wed May 18 16:38:42 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Wed, 18 May 2011 09:38:42 -0700 Subject: [Libvirt-cim] [PATCH] (#3) Fix connection leaks Message-ID: <846303186ec24f6d514a.1305736722@elm3a148.beaverton.ibm.com> # HG changeset patch # User Sharad Mishra # Date 1305736505 25200 # Node ID 846303186ec24f6d514a76224dd3ba921232ba52 # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 (#3) Fix connection leaks. libvirt-cim had few connection leaks which were causing it to crash. Signed-off-by: Sharad Mishra #2 - cimtest showed another leak, which was fixed in this version. #3 - Review comments to move and rename dom2 - virDomainPtr to _dom. Move virConnectClose during migration to migrate_do. diff -r 8b428df21c36 -r 846303186ec2 libxkutil/pool_parsing.c --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 +++ b/libxkutil/pool_parsing.c Wed May 18 09:35:05 2011 -0700 @@ -453,6 +453,7 @@ CU_DEBUG("Unable to refresh storage " "pool"); } + virStoragePoolFree(pool_ptr); ret = 1; } diff -r 8b428df21c36 -r 846303186ec2 src/Virt_AllocationCapabilities.c --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_AllocationCapabilities.c Wed May 18 09:35:05 2011 -0700 @@ -79,7 +79,6 @@ const char *id, struct inst_list *list) { - virConnectPtr conn = NULL; CMPIInstance *alloc_cap_inst; struct inst_list device_pool_list; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -91,15 +90,6 @@ if (!provider_is_responsible(broker, ref, &s)) goto out; - conn = connect_by_classname(broker, CLASSNAME(ref), &s); - if (conn == NULL) { - if (id) - cu_statusf(broker, &s, - CMPI_RC_ERR_NOT_FOUND, - "Instance not found."); - goto out; - } - s = enum_pools(broker, ref, CIM_RES_TYPE_ALL, &device_pool_list); if (s.rc != CMPI_RC_OK) { cu_statusf(broker, &s, @@ -141,7 +131,6 @@ } out: - virConnectClose(conn); inst_list_free(&device_pool_list); return s; diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystem.c --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystem.c Wed May 18 09:35:05 2011 -0700 @@ -907,6 +907,7 @@ { int ret; virConnectPtr conn = NULL; + virDomainPtr _dom = NULL; char *xml = NULL; CMPIStatus s = {CMPI_RC_OK, NULL}; @@ -938,12 +939,12 @@ goto out; } - dom = virDomainLookupByName(conn, + _dom = virDomainLookupByName(conn, virDomainGetName(dom)); - if (dom == NULL) { - dom = virDomainDefineXML(conn, xml); - if (dom == NULL) { + if (_dom == NULL) { + _dom = virDomainDefineXML(conn, xml); + if (_dom == NULL) { CU_DEBUG("Failed to define domain from XML"); virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -953,10 +954,10 @@ } } - if (!domain_online(dom)) + if (!domain_online(_dom)) CU_DEBUG("Guest is now offline"); - ret = virDomainCreate(dom); + ret = virDomainCreate(_dom); if (ret != 0) virt_set_status(_BROKER, &s, CMPI_RC_ERR_FAILED, @@ -965,6 +966,7 @@ out: free(xml); + virDomainFree(_dom); return s; } diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystemIndication.c --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_ComputerSystemIndication.c Wed May 18 09:35:05 2011 -0700 @@ -422,7 +422,6 @@ } static bool async_ind(CMPIContext *context, - virConnectPtr conn, int ind_type, struct dom_xml prev_dom, char *prefix, @@ -557,7 +556,7 @@ for (i = 0; i < cur_count; i++) { res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); if (!res) - async_ind(context, conn, CS_CREATED, + async_ind(context, CS_CREATED, cur_xml[i], prefix, args); } @@ -565,14 +564,14 @@ for (i = 0; i < prev_count; i++) { res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); if (!res) - async_ind(context, conn, CS_DELETED, + async_ind(context, CS_DELETED, prev_xml[i], prefix, args); } for (i = 0; i < prev_count; i++) { res = dom_changed(prev_xml[i], cur_xml, cur_count); if (res) { - async_ind(context, conn, CS_MODIFIED, + async_ind(context, CS_MODIFIED, prev_xml[i], prefix, args); } diff -r 8b428df21c36 -r 846303186ec2 src/Virt_DevicePool.c --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_DevicePool.c Wed May 18 09:35:05 2011 -0700 @@ -451,8 +451,8 @@ free(host); free(dev); + virDomainFree(dom); virConnectClose(conn); - virDomainFree(dom); return pool; } diff -r 8b428df21c36 -r 846303186ec2 src/Virt_VSMigrationService.c --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 +++ b/src/Virt_VSMigrationService.c Wed May 18 09:35:05 2011 -0700 @@ -1294,7 +1294,6 @@ "Completed"); raise_deleted_ind(job); - virConnectClose(job->conn); free(job->domain); free(job->ref_cn); free(job->ref_ns); @@ -1511,6 +1510,7 @@ out: CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); + virConnectClose(job->conn); return s; } From cvincent at linux.vnet.ibm.com Wed May 18 20:28:49 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 18 May 2011 16:28:49 -0400 Subject: [Libvirt-cim] [PATCH] (#3) Fix connection leaks In-Reply-To: <846303186ec24f6d514a.1305736722@elm3a148.beaverton.ibm.com> References: <846303186ec24f6d514a.1305736722@elm3a148.beaverton.ibm.com> Message-ID: <4DD42C01.4060607@linux.vnet.ibm.com> +1. Code looks good. No leaks after 2 cimtest runs. pushed On 05/18/2011 12:38 PM, Sharad Mishra wrote: > # HG changeset patch > # User Sharad Mishra > # Date 1305736505 25200 > # Node ID 846303186ec24f6d514a76224dd3ba921232ba52 > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > (#3) Fix connection leaks. > > libvirt-cim had few connection leaks which were causing it to crash. > > Signed-off-by: Sharad Mishra > > #2 - cimtest showed another leak, which was fixed in this version. > #3 - Review comments to move and rename dom2 - virDomainPtr to _dom. > Move virConnectClose during migration to migrate_do. > > diff -r 8b428df21c36 -r 846303186ec2 libxkutil/pool_parsing.c > --- a/libxkutil/pool_parsing.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/pool_parsing.c Wed May 18 09:35:05 2011 -0700 > @@ -453,6 +453,7 @@ > CU_DEBUG("Unable to refresh storage " > "pool"); > } > + virStoragePoolFree(pool_ptr); > ret = 1; > } > > diff -r 8b428df21c36 -r 846303186ec2 src/Virt_AllocationCapabilities.c > --- a/src/Virt_AllocationCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_AllocationCapabilities.c Wed May 18 09:35:05 2011 -0700 > @@ -79,7 +79,6 @@ > const char *id, > struct inst_list *list) > { > - virConnectPtr conn = NULL; > CMPIInstance *alloc_cap_inst; > struct inst_list device_pool_list; > CMPIStatus s = {CMPI_RC_OK, NULL}; > @@ -91,15 +90,6 @@ > if (!provider_is_responsible(broker, ref,&s)) > goto out; > > - conn = connect_by_classname(broker, CLASSNAME(ref),&s); > - if (conn == NULL) { > - if (id) > - cu_statusf(broker,&s, > - CMPI_RC_ERR_NOT_FOUND, > - "Instance not found."); > - goto out; > - } > - > s = enum_pools(broker, ref, CIM_RES_TYPE_ALL,&device_pool_list); > if (s.rc != CMPI_RC_OK) { > cu_statusf(broker,&s, > @@ -141,7 +131,6 @@ > } > > out: > - virConnectClose(conn); > inst_list_free(&device_pool_list); > > return s; > diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystem.c > --- a/src/Virt_ComputerSystem.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystem.c Wed May 18 09:35:05 2011 -0700 > @@ -907,6 +907,7 @@ > { > int ret; > virConnectPtr conn = NULL; > + virDomainPtr _dom = NULL; > char *xml = NULL; > CMPIStatus s = {CMPI_RC_OK, NULL}; > > @@ -938,12 +939,12 @@ > goto out; > } > > - dom = virDomainLookupByName(conn, > + _dom = virDomainLookupByName(conn, > virDomainGetName(dom)); > > - if (dom == NULL) { > - dom = virDomainDefineXML(conn, xml); > - if (dom == NULL) { > + if (_dom == NULL) { > + _dom = virDomainDefineXML(conn, xml); > + if (_dom == NULL) { > CU_DEBUG("Failed to define domain from XML"); > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -953,10 +954,10 @@ > } > } > > - if (!domain_online(dom)) > + if (!domain_online(_dom)) > CU_DEBUG("Guest is now offline"); > > - ret = virDomainCreate(dom); > + ret = virDomainCreate(_dom); > if (ret != 0) > virt_set_status(_BROKER,&s, > CMPI_RC_ERR_FAILED, > @@ -965,6 +966,7 @@ > > out: > free(xml); > + virDomainFree(_dom); > > return s; > } > diff -r 8b428df21c36 -r 846303186ec2 src/Virt_ComputerSystemIndication.c > --- a/src/Virt_ComputerSystemIndication.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_ComputerSystemIndication.c Wed May 18 09:35:05 2011 -0700 > @@ -422,7 +422,6 @@ > } > > static bool async_ind(CMPIContext *context, > - virConnectPtr conn, > int ind_type, > struct dom_xml prev_dom, > char *prefix, > @@ -557,7 +556,7 @@ > for (i = 0; i< cur_count; i++) { > res = dom_in_list(cur_xml[i].uuid, prev_count, prev_xml); > if (!res) > - async_ind(context, conn, CS_CREATED, > + async_ind(context, CS_CREATED, > cur_xml[i], prefix, args); > > } > @@ -565,14 +564,14 @@ > for (i = 0; i< prev_count; i++) { > res = dom_in_list(prev_xml[i].uuid, cur_count, cur_xml); > if (!res) > - async_ind(context, conn, CS_DELETED, > + async_ind(context, CS_DELETED, > prev_xml[i], prefix, args); > } > > for (i = 0; i< prev_count; i++) { > res = dom_changed(prev_xml[i], cur_xml, cur_count); > if (res) { > - async_ind(context, conn, CS_MODIFIED, > + async_ind(context, CS_MODIFIED, > prev_xml[i], prefix, args); > > } > diff -r 8b428df21c36 -r 846303186ec2 src/Virt_DevicePool.c > --- a/src/Virt_DevicePool.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_DevicePool.c Wed May 18 09:35:05 2011 -0700 > @@ -451,8 +451,8 @@ > > free(host); > free(dev); > + virDomainFree(dom); > virConnectClose(conn); > - virDomainFree(dom); > > return pool; > } > diff -r 8b428df21c36 -r 846303186ec2 src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Wed May 18 09:35:05 2011 -0700 > @@ -1294,7 +1294,6 @@ > "Completed"); > > raise_deleted_ind(job); > - virConnectClose(job->conn); > free(job->domain); > free(job->ref_cn); > free(job->ref_ns); > @@ -1511,6 +1510,7 @@ > > out: > CMReturnData(results, (CMPIValue *)&retcode, CMPI_uint32); > + virConnectClose(job->conn); > > return s; > } > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Wed May 18 20:33:29 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 18 May 2011 16:33:29 -0400 Subject: [Libvirt-cim] [PATCH] Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py Message-ID: <7432d45a1fae6ef499f5.1305750809@oc0840652111.ibm.com> # HG changeset patch # User Chip Vincent # Date 1305746372 14400 # Node ID 7432d45a1fae6ef499f53a36e24b66df29bcf7f9 # Parent 90f8c9f2388e0563baa311c84024ca41a61e1890 Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py The cimtest case was failing because libvirt-cim improperly processed graphics devices present in the ReferenceClass parameter in DefineSystem. Rather than overrdiing them, it was appending them. With this patch, the test case now passes and the debug log shows the following correct messages. Virt_VirtualSystemManagementService.c(1184): graphics = vnc Virt_VirtualSystemManagementService.c(1326): Overriding device vnc from refconf Signed-off-by: Chip Vincent diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c --- a/src/Virt_VirtualSystemManagementService.c +++ b/src/Virt_VirtualSystemManagementService.c @@ -1162,17 +1162,26 @@ msg = "GraphicsRASD field Address not valid"; goto out; } - } else { + } else { CU_DEBUG("Unsupported graphics type %s", dev->dev.graphics.type); msg = "Unsupported graphics type"; goto out; - } - - CU_DEBUG("graphics = %s:%s:%s", - dev->dev.graphics.type, - dev->dev.graphics.host, - dev->dev.graphics.port); + } + + free(dev->id); + if (STREQC(dev->dev.graphics.type, "vnc")) + ret = asprintf(&dev->id, "%s", dev->dev.graphics.type); + else + ret = asprintf(&dev->id, "%s:%s", + dev->dev.graphics.type, dev->dev.graphics.port); + + if (ret == -1) { + msg = "Failed to create graphics is string"; + goto out; + } + + CU_DEBUG("graphics = %s", dev->id); out: return msg; @@ -1313,9 +1322,6 @@ "DiskResourceAllocationSettingData in a single " "guest"; - if (dev->type == CIM_RES_TYPE_GRAPHICS) - continue; - if (STREQC(ptr->id, dev->id)) { CU_DEBUG("Overriding device %s from refconf", ptr->id); cleanup_virt_device(ptr); @@ -1425,7 +1431,7 @@ &domain->dev_net_ct); } else if (type == CIM_RES_TYPE_GRAPHICS) { struct virt_device dev; - int ncount = count + domain->dev_graphics_ct; + int gcount = count + domain->dev_graphics_ct; memset(&dev, 0, sizeof(dev)); msg = rasd_to_vdev(inst, @@ -1435,7 +1441,7 @@ if (msg == NULL) msg = add_device_nodup(&dev, domain->dev_graphics, - ncount, + gcount, &domain->dev_graphics_ct); } else if (type == CIM_RES_TYPE_INPUT) { domain->dev_input_ct = 1; From snmishra at us.ibm.com Thu May 19 20:05:57 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Thu, 19 May 2011 13:05:57 -0700 Subject: [Libvirt-cim] [PATCH] [TEST] Update Graphics RASD tests to handle new InstanceIDs In-Reply-To: References: Message-ID: +1 All the fixed cimtests passed. Sharad Mishra Open Virtualization Linux Technology Center IBM Chip Vincent To Sent by: libvirt-cim at redhat.com libvirt-cim-bounc cc es at redhat.com Subject [Libvirt-cim] [PATCH] [TEST] Update 05/18/2011 10:49 Graphics RASD tests to handle AM new InstanceIDs Please respond to List for discussion and development of libvirt CIM # HG changeset patch # User Chip Vincent # Date 1305740945 14400 # Node ID d6951b8799a80d0e5b3639b6f75da405c32a9a77 # Parent 4c8e0c673d796ae7a5e17ee771d935e449b77bce [TEST] Update Graphics RASD tests to handle new InstanceIDs Graphics RASDs now include support for serial/consoel devices, which includes support for unqiue InstanceIDs. This patch updates the test to look for /vnc where is used to just look for graphics. NOTE: VirtualSystemManagementService/13_refconfig_additional_devs.py fails due to a problem in libvirt-cim. Seperate patch to follow shortly. Signed-off-by: Chip Vincent diff --git a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py --- a/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py +++ b/suites/libvirt-cim/cimtest/ElementSettingData/01_forward.py @@ -147,7 +147,7 @@ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip) if curr_cim_rev >= input_graphics_pool_rev: keys['InputResourceAllocationSettingData'] = input_device - keys['GraphicsResourceAllocationSettingData'] = "%s/graphics" % test_dom + keys['GraphicsResourceAllocationSettingData'] = "%s/vnc" % test_dom ret = cxml.cim_define(options.ip) if not ret: diff --git a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py --- a/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py +++ b/suites/libvirt-cim/cimtest/HostSystem/04_hs_to_EAPF.py @@ -144,7 +144,7 @@ display = { 'SystemName' : test_dom, 'CreationClassName' : display_inst, - 'DeviceID' : "%s/%s" % (test_dom, "graphics"), + 'DeviceID' : "%s/%s" % (test_dom, "vnc"), } point = { diff --git a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py --- a/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py +++ b/suites/libvirt-cim/cimtest/KVMRedirectionSAP/02_ipv6_support.py @@ -92,7 +92,7 @@ if not ret: raise Exception("Failed to define the dom: %s" % test_dom) - devid = "%s/%s" % (test_dom, 'graphics') + devid = "%s/%s" % (test_dom, 'vnc') vnc = get_typed_class(virt, "DisplayController") key_list = { 'DeviceID' : devid, 'CreationClassName' : vnc, diff --git a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py --- a/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py +++ b/suites/libvirt-cim/cimtest/SystemDevice/01_forward.py @@ -118,7 +118,7 @@ curr_cim_rev, changeset = get_provider_version(virt, server) if curr_cim_rev >= input_graphics_pool_rev: graphics_cn = get_typed_class(virt, "DisplayController") - exp_pllist[graphics_cn] = ['%s/graphics' % test_dom] + exp_pllist[graphics_cn] = ['%s/vnc' % test_dom] try: diff --git a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py --- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/20_verify_vnc_password.py @@ -49,7 +49,7 @@ classname, len(rasd_list)) return FAIL - inst_id = "%s/graphics" % default_dom + inst_id = "%s/vnc" % default_dom for rasd in rasd_list: # Verify the Password for the domain is set if rasd['InstanceID'] == inst_id: diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/01_forward.py @@ -100,7 +100,7 @@ rlist.append(input) rlist.append(graphics) prop_list[input] = "%s/%s" % (test_dom, input_device) - prop_list[graphics] = "%s/%s" % (test_dom, "graphics") + prop_list[graphics] = "%s/%s" % (test_dom, "vnc") if virt == 'LXC': prop_list = {rlist[1] : "%s/%s" % (test_dom, "mem")} diff --git a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py --- a/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py +++ b/suites/libvirt-cim/cimtest/VirtualSystemSettingDataComponent/02_reverse.py @@ -95,7 +95,7 @@ "disk_rasd" : '%s/%s' %(test_dom, test_disk), "mem_rasd" : '%s/%s' %(test_dom, "mem"), "input_rasd": '%s/%s' %(test_dom, input_device), - "grap_rasd" : '%s/%s' %(test_dom, "graphics") + "grap_rasd" : '%s/%s' %(test_dom, "vnc") } diff --git a/suites/libvirt-cim/lib/XenKvmLib/rasd.py b/suites/libvirt-cim/lib/XenKvmLib/rasd.py --- a/suites/libvirt-cim/lib/XenKvmLib/rasd.py +++ b/suites/libvirt-cim/lib/XenKvmLib/rasd.py @@ -110,7 +110,7 @@ "VirtualQuantity" : (t_mem * 1024), }, dc_cn : { - "InstanceID" : "%s/%s" %(t_dom, "graphics") + "InstanceID" : "%s/%s" %(t_dom, "vnc") }, pd_cn : { "InstanceID" : point_device _______________________________________________ Libvirt-cim mailing list Libvirt-cim at redhat.com https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: graycol.gif Type: image/gif Size: 105 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: pic20110.gif Type: image/gif Size: 1255 bytes Desc: not available URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: ecblank.gif Type: image/gif Size: 45 bytes Desc: not available URL: From snmishra at us.ibm.com Thu May 19 20:08:06 2011 From: snmishra at us.ibm.com (Sharad Mishra) Date: Thu, 19 May 2011 13:08:06 -0700 Subject: [Libvirt-cim] [PATCH] Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py In-Reply-To: <7432d45a1fae6ef499f5.1305750809@oc0840652111.ibm.com> References: <7432d45a1fae6ef499f5.1305750809@oc0840652111.ibm.com> Message-ID: +1 Looks good, Tests passed. Except for this message - msg = "Failed to create graphics is string"; But I don't think we should redo the patch just to fix this message. Regards, Sharad Mishra Open Virtualization Linux Technology Center IBM libvirt-cim-bounces at redhat.com wrote on 05/18/2011 01:33:29 PM: > Chip Vincent > Sent by: libvirt-cim-bounces at redhat.com > > 05/18/2011 01:33 PM > > Please respond to > List for discussion and development of libvirt CIM > > To > > libvirt-cim at redhat.com > > cc > > Subject > > [Libvirt-cim] [PATCH] Fix for VirtualSystemManagementService/ > 13_refconfig_additional_devs.py > > # HG changeset patch > # User Chip Vincent > # Date 1305746372 14400 > # Node ID 7432d45a1fae6ef499f53a36e24b66df29bcf7f9 > # Parent 90f8c9f2388e0563baa311c84024ca41a61e1890 > Fix for VirtualSystemManagementService/13_refconfig_additional_devs.py > > The cimtest case was failing because libvirt-cim improperly > processed graphics devices present in the ReferenceClass parameter > in DefineSystem. Rather than overrdiing them, it was appending them. > With this patch, the test case now passes and the debug log shows > the following correct messages. > > Virt_VirtualSystemManagementService.c(1184): graphics = vnc > Virt_VirtualSystemManagementService.c(1326): Overriding device vnc > from refconf > > Signed-off-by: Chip Vincent > > diff --git a/src/Virt_VirtualSystemManagementService.c b/src/ > Virt_VirtualSystemManagementService.c > --- a/src/Virt_VirtualSystemManagementService.c > +++ b/src/Virt_VirtualSystemManagementService.c > @@ -1162,17 +1162,26 @@ > msg = "GraphicsRASD field Address not valid"; > goto out; > } > - } else { > + } else { > CU_DEBUG("Unsupported graphics type %s", > dev->dev.graphics.type); > msg = "Unsupported graphics type"; > goto out; > - } > - > - CU_DEBUG("graphics = %s:%s:%s", > - dev->dev.graphics.type, > - dev->dev.graphics.host, > - dev->dev.graphics.port); > + } > + > + free(dev->id); > + if (STREQC(dev->dev.graphics.type, "vnc")) > + ret = asprintf(&dev->id, "%s", dev->dev.graphics.type); > + else > + ret = asprintf(&dev->id, "%s:%s", > + dev->dev.graphics.type, > dev->dev.graphics.port); > + > + if (ret == -1) { > + msg = "Failed to create graphics is string"; > + goto out; > + } > + > + CU_DEBUG("graphics = %s", dev->id); > > out: > return msg; > @@ -1313,9 +1322,6 @@ > "DiskResourceAllocationSettingData > in a single " > "guest"; > > - if (dev->type == CIM_RES_TYPE_GRAPHICS) > - continue; > - > if (STREQC(ptr->id, dev->id)) { > CU_DEBUG("Overriding device %s from > refconf", ptr->id); > cleanup_virt_device(ptr); > @@ -1425,7 +1431,7 @@ > &domain-> dev_net_ct); > } else if (type == CIM_RES_TYPE_GRAPHICS) { > struct virt_device dev; > - int ncount = count + domain->dev_graphics_ct; > + int gcount = count + domain->dev_graphics_ct; > > memset(&dev, 0, sizeof(dev)); > msg = rasd_to_vdev(inst, > @@ -1435,7 +1441,7 @@ > if (msg == NULL) > msg = add_device_nodup(&dev, > domain->dev_graphics, > - ncount, > + gcount, > &domain-> dev_graphics_ct); > } else if (type == CIM_RES_TYPE_INPUT) { > domain->dev_input_ct = 1; > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -------------- next part -------------- An HTML attachment was scrubbed... URL: From cvincent at linux.vnet.ibm.com Fri May 20 14:15:48 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:15:48 -0400 Subject: [Libvirt-cim] [PATCH 1 of 7] libcmpiutil: Remove warnings In-Reply-To: References: Message-ID: <4DD67794.2050403@linux.vnet.ibm.com> +1. Pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305296021 10800 > # Node ID f92b5e72f469539bfdf449dbdb827075b3257cc5 > # Parent f86d75144f5a932e886153584d1d7e084f9d1131 > libcmpiutil: Remove warnings > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/eo_util_lexer.l b/eo_util_lexer.l > --- a/eo_util_lexer.l > +++ b/eo_util_lexer.l > @@ -17,6 +17,8 @@ > #ifndef YY_FLEX_LEX_COMPAT > int eolineno = 1; > #endif > + > +void eo_parse_error(char *errmsg); > %} > > DIGIT ([0-9]) > diff --git a/eo_util_parser.y b/eo_util_parser.y > --- a/eo_util_parser.y > +++ b/eo_util_parser.y > @@ -118,7 +118,6 @@ > | PROPERTYNAME '=' INTEGER ';' > { > EOTRACE("propertyname = %s\n", $1); > - int rc; > CMPIType t = set_int_prop($3, $1, *_INSTANCE); > EOTRACE("\ttype = %d\n" > "\tvalue = %lld\n", t, $3); > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:17:17 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:17:17 -0400 Subject: [Libvirt-cim] [PATCH 2 of 7] libcmpiutil: Cleanup includes In-Reply-To: References: Message-ID: <4DD677ED.6080209@linux.vnet.ibm.com> +1 & pushed. I was expecting at least one provider break in libvirt-cim, but that was not the case! On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305296515 10800 > # Node ID af2ffd311f1bc510a56a7018691edce7be89ad17 > # Parent f92b5e72f469539bfdf449dbdb827075b3257cc5 > libcmpiutil: Cleanup includes > > This is a cosmetic patch removing some unecessary includes and > 'standardizing' includes in the source code following the simple rules: > > 1) Internal includes (provided by libcmpiutil) are done with "" > e.g. #include "libcmpiutil.h" > > 2) External includes (provided by other projects) are done with<> > e.g. #include > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/args_util.c b/args_util.c > --- a/args_util.c > +++ b/args_util.c > @@ -24,8 +24,6 @@ > #include > #include > > -#include > -#include > #include > > #include "libcmpiutil.h" > diff --git a/debug_util.c b/debug_util.c > --- a/debug_util.c > +++ b/debug_util.c > @@ -24,10 +24,6 @@ > #include > #include > > -#include > -#include > -#include > - > #include "libcmpiutil.h" > > static int log_init = 0; > diff --git a/eo_parser.c b/eo_parser.c > --- a/eo_parser.c > +++ b/eo_parser.c > @@ -27,7 +27,7 @@ > #include > #include > > -#include "cmpidt.h" > +#include > > #include "libcmpiutil.h" > #include "eo_util_parser.h" > diff --git a/eo_parser_xml.c b/eo_parser_xml.c > --- a/eo_parser_xml.c > +++ b/eo_parser_xml.c > @@ -28,8 +28,6 @@ > #include > #include > > -#include > -#include > #include > > #include "libcmpiutil.h" > diff --git a/eo_util_lexer.l b/eo_util_lexer.l > --- a/eo_util_lexer.l > +++ b/eo_util_lexer.l > @@ -11,7 +11,7 @@ > > /* DEFINITIONS SECTION */ > %{ > -#include "cmpidt.h" > +#include > #include > #include "eo_util_parser.h" > #ifndef YY_FLEX_LEX_COMPAT > diff --git a/eo_util_parser.y b/eo_util_parser.y > --- a/eo_util_parser.y > +++ b/eo_util_parser.y > @@ -13,8 +13,8 @@ > #include > #include > > -#include "cmpidt.h" > -#include "cmpift.h" > +#include > +#include > > #include "eo_parser_xml.h" > > diff --git a/inst_list.c b/inst_list.c > --- a/inst_list.c > +++ b/inst_list.c > @@ -20,9 +20,7 @@ > */ > #include > > -#include > - > -#include > +#include "libcmpiutil.h" > > static int resize(struct inst_list *list, int newmax) > { > diff --git a/instance_util.c b/instance_util.c > --- a/instance_util.c > +++ b/instance_util.c > @@ -18,9 +18,10 @@ > * License along with this library; if not, write to the Free Software > * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > */ > -#include > #include > > +#include > + > #include "libcmpiutil.h" > > unsigned int cu_return_instances(const CMPIResult *results, > diff --git a/libcmpiutil.h b/libcmpiutil.h > --- a/libcmpiutil.h > +++ b/libcmpiutil.h > @@ -12,12 +12,8 @@ > > #include > #include > -#include > -#include > > #include > -#include > -#include > > #define CLASSNAME(op) (CMGetCharPtr(CMGetClassName(op, NULL))) > #define NAMESPACE(op) (CMGetCharPtr(CMGetNameSpace(op, NULL))) > diff --git a/std_association.c b/std_association.c > --- a/std_association.c > +++ b/std_association.c > @@ -22,10 +22,6 @@ > */ > #include > > -#include > -#include > -#include > - > #include "libcmpiutil.h" > > #include "std_association.h" > diff --git a/std_association.h b/std_association.h > --- a/std_association.h > +++ b/std_association.h > @@ -23,6 +23,7 @@ > #define __STD_ASSOCIATION_H > > #include > +#include > > struct std_assoc; > struct std_assoc_info; > diff --git a/std_indication.c b/std_indication.c > --- a/std_indication.c > +++ b/std_indication.c > @@ -20,12 +20,9 @@ > */ > #include > #include > +#include > > -#include > -#include > -#include > - > -#include > +#include "libcmpiutil.h" > > #define STREQ(a, b) (strcmp(a, b) == 0) > #define STREQC(a, b) (strcasecmp(a, b) == 0) > diff --git a/std_indication.h b/std_indication.h > --- a/std_indication.h > +++ b/std_indication.h > @@ -21,15 +21,10 @@ > #ifndef __STD_INDICATION_H > #define __STD_INDICATION_H > > +#include > + > #include > #include > -#include > -#include > - > -#include "config.h" > - > -#include "libcmpiutil.h" > -#include "std_invokemethod.h" > > #ifdef CMPI_EI_VOID > # define _EI_RTYPE void > diff --git a/std_invokemethod.c b/std_invokemethod.c > --- a/std_invokemethod.c > +++ b/std_invokemethod.c > @@ -21,10 +21,6 @@ > #include > #include > > -#include "cmpidt.h" > -#include "cmpift.h" > -#include "cmpimacs.h" > - > #include "libcmpiutil.h" > #include "std_invokemethod.h" > > diff --git a/std_invokemethod.h b/std_invokemethod.h > --- a/std_invokemethod.h > +++ b/std_invokemethod.h > @@ -21,9 +21,8 @@ > #ifndef __STD_INVOKEMETHOD_H > #define __STD_INVOKEMETHOD_H > > -#include "cmpidt.h" > -#include "cmpift.h" > -#include "cmpimacs.h" > +#include > +#include > > typedef CMPIStatus (*method_handler_fn)(CMPIMethodMI *self, > const CMPIContext *context, > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:19:55 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:19:55 -0400 Subject: [Libvirt-cim] [PATCH 3 of 7] libcmpituil: Configure tweaks In-Reply-To: <71c08398356cf6cdcef2.1305568070@etrunko-t410.br.ibm.com> References: <71c08398356cf6cdcef2.1305568070@etrunko-t410.br.ibm.com> Message-ID: <4DD6788B.8060600@linux.vnet.ibm.com> +1. Pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305296777 10800 > # Node ID 71c08398356cf6cdcef25acb7132518d8fc2a5ee > # Parent af2ffd311f1bc510a56a7018691edce7be89ad17 > libcmpituil: Configure tweaks > > acinclude.m4 > - Better output when checking for CMPI includes > configure.ac > - Use automake silent rules if available > - Check for pkg-config program > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/acinclude.m4 b/acinclude.m4 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -42,6 +42,7 @@ > dnl The standard include paths worked. > AC_MSG_RESULT(yes) > else > + AC_MSG_RESULT(no) > _DIRS_="/usr/include/cmpi \ > /usr/local/include/cmpi \ > $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ > @@ -61,13 +62,15 @@ > dnl Save the new -I parameter > CMPI_CPP_FLAGS="$CPPFLAGS" > break > - fi > + else > + AC_MSG_RESULT(no) > + fi > CPPFLAGS=$_cppflags > done > fi > CPPFLAGS="$CMPI_CPP_FLAGS" > if test "$have_CMPI" == "no"; then > - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) > + AC_MSG_ERROR(Cannot find CMPI header files.) > fi > ] > ) > diff --git a/configure.ac b/configure.ac > --- a/configure.ac > +++ b/configure.ac > @@ -30,7 +30,9 @@ > > AC_CONFIG_FILES([Makefile tools/Makefile]) > > +# Use silent-rules if possible > AM_INIT_AUTOMAKE > +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) > > AC_PROG_CC > > @@ -51,6 +53,8 @@ > > AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) > > +# Check for pkg-config program > +PKG_PROG_PKG_CONFIG > CHECK_LIBXML2 > > if test x${eoparser} = xyes; then > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:21:45 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:21:45 -0400 Subject: [Libvirt-cim] [PATCH 4 of 7] libcmpiutil: Update .hgignore In-Reply-To: References: Message-ID: <4DD678F9.8030708@linux.vnet.ibm.com> +1 & pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305296806 10800 > # Node ID c24bb1e158f5fee7e5e51e42fa02790f58ce2834 > # Parent 71c08398356cf6cdcef25acb7132518d8fc2a5ee > libcmpiutil: Update .hgignore > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/.hgignore b/.hgignore > --- a/.hgignore > +++ b/.hgignore > @@ -18,3 +18,8 @@ > .*~$ > ^\.libs/.* > .*\.la$ > +.*\.pc$ > +.*\.spec$ > +ylwrap > +.*\.tar.bz2$ > +.*\.tar.gz$ > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:24:14 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:24:14 -0400 Subject: [Libvirt-cim] [PATCH 5 of 7] libcmpiutil: Remove trailing whitespaces In-Reply-To: <1177a2ffc8c7333a8e80.1305568072@etrunko-t410.br.ibm.com> References: <1177a2ffc8c7333a8e80.1305568072@etrunko-t410.br.ibm.com> Message-ID: <4DD6798E.5060106@linux.vnet.ibm.com> +1 & pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305297352 10800 > # Node ID 1177a2ffc8c7333a8e80c7ce743f0f10ef7da99c > # Parent c24bb1e158f5fee7e5e51e42fa02790f58ce2834 > libcmpiutil: Remove trailing whitespaces > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -39,7 +39,7 @@ > BUILT_SOURCES = eo_util_lexer.c eo_util_parser.c eo_util_parser.h > endif > > -lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la > +lib_LTLIBRARIES = $(EOPARSER) libcmpiutil.la > > docs: > if found_doxygen > diff --git a/acinclude.m4 b/acinclude.m4 > --- a/acinclude.m4 > +++ b/acinclude.m4 > @@ -59,7 +59,7 @@ > if test "$have_CMPI" == "yes"; then > dnl Found it > AC_MSG_RESULT(yes) > - dnl Save the new -I parameter > + dnl Save the new -I parameter > CMPI_CPP_FLAGS="$CPPFLAGS" > break > else > @@ -67,8 +67,8 @@ > fi > CPPFLAGS=$_cppflags > done > - fi > - CPPFLAGS="$CMPI_CPP_FLAGS" > + fi > + CPPFLAGS="$CMPI_CPP_FLAGS" > if test "$have_CMPI" == "no"; then > AC_MSG_ERROR(Cannot find CMPI header files.) > fi > @@ -100,7 +100,7 @@ > # > AC_DEFUN([CHECK_IND_VOID], [ > AH_TEMPLATE([CMPI_EI_VOID], > - [Defined if return type of EnableIndications > + [Defined if return type of EnableIndications > should be void]) > AC_MSG_CHECKING([return type for indications]) > CFLAGS_TMP=$CFLAGS > @@ -110,7 +110,7 @@ > static void ei(CMPIIndicationMI *mi, const CMPIContext *c) { > return; > } > - ],[ > + ],[ > struct _CMPIIndicationMIFT ft; > ft.enableIndications = ei; > return 0; > diff --git a/args_util.c b/args_util.c > --- a/args_util.c > +++ b/args_util.c > @@ -37,10 +37,10 @@ > CMPIData data; > CMPIStatus s; > const char *value; > - > + > data = CMGetKey(reference, key,&s); > - if ((s.rc != CMPI_RC_OK) || > - CMIsNullValue(data) || > + if ((s.rc != CMPI_RC_OK) || > + CMIsNullValue(data) || > CMIsNullObject(data.value.string)) > return CMPI_RC_ERR_FAILED; > > @@ -96,7 +96,7 @@ > if ((s.rc != CMPI_RC_OK) || (CMIsNullValue(argdata))) > return CMPI_RC_ERR_INVALID_PARAMETER; > > - if ((argdata.type != CMPI_string) || > + if ((argdata.type != CMPI_string) || > CMIsNullObject(argdata.value.string)) > return CMPI_RC_ERR_TYPE_MISMATCH; > > @@ -150,7 +150,7 @@ > { > CMPIData argdata; > CMPIStatus s; > - > + > argdata = CMGetArg(args, name,&s); > if ((s.rc != CMPI_RC_OK) || CMIsNullValue(argdata)) > return CMPI_RC_ERR_INVALID_PARAMETER; > @@ -221,7 +221,7 @@ > const char *prop_val; > > *target = NULL; > - > + > REQUIRE_PROPERTY_DEFINED(inst, prop, value,&s); > > if (value.type != CMPI_string) > diff --git a/configure.ac b/configure.ac > --- a/configure.ac > +++ b/configure.ac > @@ -51,7 +51,7 @@ > [eoparser=${enableval}], > [eoparser=yes]) > > -AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) > +AM_CONDITIONAL([build_eoparser],[test x$eoparser = xyes]) > > # Check for pkg-config program > PKG_PROG_PKG_CONFIG > diff --git a/debug_util.c b/debug_util.c > --- a/debug_util.c > +++ b/debug_util.c > @@ -51,7 +51,7 @@ > > if (log != NULL) > vfprintf(log, fmt, ap); > - > + > va_end(ap); > } > > diff --git a/doc/doxygen.conf b/doc/doxygen.conf > --- a/doc/doxygen.conf > +++ b/doc/doxygen.conf > @@ -14,207 +14,207 @@ > # Project related configuration options > #--------------------------------------------------------------------------- > > -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded > +# The PROJECT_NAME tag is a single word (or a sequence of words surrounded > # by quotes) that should identify the project. > > PROJECT_NAME = libcmpiutil > > -# The PROJECT_NUMBER tag can be used to enter a project or revision number. > -# This could be handy for archiving the generated documentation or > +# The PROJECT_NUMBER tag can be used to enter a project or revision number. > +# This could be handy for archiving the generated documentation or > # if some version control system is used. > > PROJECT_NUMBER = 1 > > -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) > -# base path where the generated documentation will be put. > -# If a relative path is entered, it will be relative to the location > +# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) > +# base path where the generated documentation will be put. > +# If a relative path is entered, it will be relative to the location > # where doxygen was started. If left blank the current directory will be used. > > OUTPUT_DIRECTORY = doc > > -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create > -# 4096 sub-directories (in 2 levels) under the output directory of each output > -# format and will distribute the generated files over these directories. > -# Enabling this option can be useful when feeding doxygen a huge amount of > -# source files, where putting all generated files in the same directory would > +# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create > +# 4096 sub-directories (in 2 levels) under the output directory of each output > +# format and will distribute the generated files over these directories. > +# Enabling this option can be useful when feeding doxygen a huge amount of > +# source files, where putting all generated files in the same directory would > # otherwise cause performance problems for the file system. > > CREATE_SUBDIRS = NO > > -# The OUTPUT_LANGUAGE tag is used to specify the language in which all > -# documentation generated by doxygen is written. Doxygen will use this > -# information to generate all constant output in the proper language. > -# The default language is English, other supported languages are: > -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, > -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, > -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, > -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, > +# The OUTPUT_LANGUAGE tag is used to specify the language in which all > +# documentation generated by doxygen is written. Doxygen will use this > +# information to generate all constant output in the proper language. > +# The default language is English, other supported languages are: > +# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, > +# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, > +# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, > +# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, > # Swedish, and Ukrainian. > > OUTPUT_LANGUAGE = English > > -# This tag can be used to specify the encoding used in the generated output. > -# The encoding is not always determined by the language that is chosen, > -# but also whether or not the output is meant for Windows or non-Windows users. > -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES > -# forces the Windows encoding (this is the default for the Windows binary), > -# whereas setting the tag to NO uses a Unix-style encoding (the default for > +# This tag can be used to specify the encoding used in the generated output. > +# The encoding is not always determined by the language that is chosen, > +# but also whether or not the output is meant for Windows or non-Windows users. > +# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES > +# forces the Windows encoding (this is the default for the Windows binary), > +# whereas setting the tag to NO uses a Unix-style encoding (the default for > # all platforms other than Windows). > > USE_WINDOWS_ENCODING = NO > > -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will > -# include brief member descriptions after the members that are listed in > -# the file and class documentation (similar to JavaDoc). > +# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will > +# include brief member descriptions after the members that are listed in > +# the file and class documentation (similar to JavaDoc). > # Set to NO to disable this. > > BRIEF_MEMBER_DESC = YES > > -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend > -# the brief description of a member or function before the detailed description. > -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the > +# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend > +# the brief description of a member or function before the detailed description. > +# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the > # brief descriptions will be completely suppressed. > > REPEAT_BRIEF = YES > > -# This tag implements a quasi-intelligent brief description abbreviator > -# that is used to form the text in various listings. Each string > -# in this list, if found as the leading text of the brief description, will be > -# stripped from the text and the result after processing the whole list, is > -# used as the annotated text. Otherwise, the brief description is used as-is. > -# If left blank, the following values are used ("$name" is automatically > -# replaced with the name of the entity): "The $name class" "The $name widget" > -# "The $name file" "is" "provides" "specifies" "contains" > +# This tag implements a quasi-intelligent brief description abbreviator > +# that is used to form the text in various listings. Each string > +# in this list, if found as the leading text of the brief description, will be > +# stripped from the text and the result after processing the whole list, is > +# used as the annotated text. Otherwise, the brief description is used as-is. > +# If left blank, the following values are used ("$name" is automatically > +# replaced with the name of the entity): "The $name class" "The $name widget" > +# "The $name file" "is" "provides" "specifies" "contains" > # "represents" "a" "an" "the" > > -ABBREVIATE_BRIEF = > +ABBREVIATE_BRIEF = > > -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then > -# Doxygen will generate a detailed section even if there is only a brief > +# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then > +# Doxygen will generate a detailed section even if there is only a brief > # description. > > ALWAYS_DETAILED_SEC = NO > > -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all > -# inherited members of a class in the documentation of that class as if those > -# members were ordinary class members. Constructors, destructors and assignment > +# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all > +# inherited members of a class in the documentation of that class as if those > +# members were ordinary class members. Constructors, destructors and assignment > # operators of the base classes will not be shown. > > INLINE_INHERITED_MEMB = NO > > -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full > -# path before files name in the file list and in the header files. If set > +# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full > +# path before files name in the file list and in the header files. If set > # to NO the shortest path that makes the file name unique will be used. > > FULL_PATH_NAMES = YES > > -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag > -# can be used to strip a user-defined part of the path. Stripping is > -# only done if one of the specified strings matches the left-hand part of > -# the path. The tag can be used to show relative paths in the file list. > -# If left blank the directory from which doxygen is run is used as the > +# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag > +# can be used to strip a user-defined part of the path. Stripping is > +# only done if one of the specified strings matches the left-hand part of > +# the path. The tag can be used to show relative paths in the file list. > +# If left blank the directory from which doxygen is run is used as the > # path to strip. > > -STRIP_FROM_PATH = > +STRIP_FROM_PATH = > > -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of > -# the path mentioned in the documentation of a class, which tells > -# the reader which header file to include in order to use a class. > -# If left blank only the name of the header file containing the class > -# definition is used. Otherwise one should specify the include paths that > +# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of > +# the path mentioned in the documentation of a class, which tells > +# the reader which header file to include in order to use a class. > +# If left blank only the name of the header file containing the class > +# definition is used. Otherwise one should specify the include paths that > # are normally passed to the compiler using the -I flag. > > -STRIP_FROM_INC_PATH = > +STRIP_FROM_INC_PATH = > > -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter > -# (but less readable) file names. This can be useful is your file systems > +# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter > +# (but less readable) file names. This can be useful is your file systems > # doesn't support long names like on DOS, Mac, or CD-ROM. > > SHORT_NAMES = NO > > -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen > -# will interpret the first line (until the first dot) of a JavaDoc-style > -# comment as the brief description. If set to NO, the JavaDoc > -# comments will behave just like the Qt-style comments (thus requiring an > +# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen > +# will interpret the first line (until the first dot) of a JavaDoc-style > +# comment as the brief description. If set to NO, the JavaDoc > +# comments will behave just like the Qt-style comments (thus requiring an > # explicit @brief command for a brief description. > > JAVADOC_AUTOBRIEF = NO > > -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen > -# treat a multi-line C++ special comment block (i.e. a block of //! or /// > -# comments) as a brief description. This used to be the default behaviour. > -# The new default is to treat a multi-line C++ comment block as a detailed > +# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen > +# treat a multi-line C++ special comment block (i.e. a block of //! or /// > +# comments) as a brief description. This used to be the default behaviour. > +# The new default is to treat a multi-line C++ comment block as a detailed > # description. Set this tag to YES if you prefer the old behaviour instead. > > MULTILINE_CPP_IS_BRIEF = NO > > -# If the DETAILS_AT_TOP tag is set to YES then Doxygen > +# If the DETAILS_AT_TOP tag is set to YES then Doxygen > # will output the detailed description near the top, like JavaDoc. > -# If set to NO, the detailed description appears after the member > +# If set to NO, the detailed description appears after the member > # documentation. > > DETAILS_AT_TOP = NO > > -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented > -# member inherits the documentation from any documented member that it > +# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented > +# member inherits the documentation from any documented member that it > # re-implements. > > INHERIT_DOCS = YES > > -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce > -# a new page for each member. If set to NO, the documentation of a member will > +# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce > +# a new page for each member. If set to NO, the documentation of a member will > # be part of the file/class/namespace that contains it. > > SEPARATE_MEMBER_PAGES = NO > > -# The TAB_SIZE tag can be used to set the number of spaces in a tab. > +# The TAB_SIZE tag can be used to set the number of spaces in a tab. > # Doxygen uses this value to replace tabs by spaces in code fragments. > > TAB_SIZE = 8 > > -# This tag can be used to specify a number of aliases that acts > -# as commands in the documentation. An alias has the form "name=value". > -# For example adding "sideeffect=\par Side Effects:\n" will allow you to > -# put the command \sideeffect (or @sideeffect) in the documentation, which > -# will result in a user-defined paragraph with heading "Side Effects:". > +# This tag can be used to specify a number of aliases that acts > +# as commands in the documentation. An alias has the form "name=value". > +# For example adding "sideeffect=\par Side Effects:\n" will allow you to > +# put the command \sideeffect (or @sideeffect) in the documentation, which > +# will result in a user-defined paragraph with heading "Side Effects:". > # You can put \n's in the value part of an alias to insert newlines. > > -ALIASES = > +ALIASES = > > -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C > -# sources only. Doxygen will then generate output that is more tailored for C. > -# For instance, some of the names that are used will be different. The list > +# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C > +# sources only. Doxygen will then generate output that is more tailored for C. > +# For instance, some of the names that are used will be different. The list > # of all members will be omitted, etc. > > OPTIMIZE_OUTPUT_FOR_C = YES > > -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java > -# sources only. Doxygen will then generate output that is more tailored for Java. > -# For instance, namespaces will be presented as packages, qualified scopes > +# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java > +# sources only. Doxygen will then generate output that is more tailored for Java. > +# For instance, namespaces will be presented as packages, qualified scopes > # will look different, etc. > > OPTIMIZE_OUTPUT_JAVA = NO > > -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to > -# include (a tag file for) the STL sources as input, then you should > -# set this tag to YES in order to let doxygen match functions declarations and > -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. > -# func(std::string) {}). This also make the inheritance and collaboration > +# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want to > +# include (a tag file for) the STL sources as input, then you should > +# set this tag to YES in order to let doxygen match functions declarations and > +# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. > +# func(std::string) {}). This also make the inheritance and collaboration > # diagrams that involve STL classes more complete and accurate. > > BUILTIN_STL_SUPPORT = NO > > -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC > -# tag is set to YES, then doxygen will reuse the documentation of the first > -# member in the group (if any) for the other members of the group. By default > +# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC > +# tag is set to YES, then doxygen will reuse the documentation of the first > +# member in the group (if any) for the other members of the group. By default > # all members of a group must be documented explicitly. > > DISTRIBUTE_GROUP_DOC = NO > > -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of > -# the same type (for instance a group of public functions) to be put as a > -# subgroup of that type (e.g. under the Public Functions section). Set it to > -# NO to prevent subgrouping. Alternatively, this can be done per class using > +# Set the SUBGROUPING tag to YES (the default) to allow class member groups of > +# the same type (for instance a group of public functions) to be put as a > +# subgroup of that type (e.g. under the Public Functions section). Set it to > +# NO to prevent subgrouping. Alternatively, this can be done per class using > # the \nosubgrouping command. > > SUBGROUPING = YES > @@ -223,327 +223,327 @@ > # Build related configuration options > #--------------------------------------------------------------------------- > > -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in > -# documentation are documented, even if no documentation was available. > -# Private class members and static file members will be hidden unless > +# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in > +# documentation are documented, even if no documentation was available. > +# Private class members and static file members will be hidden unless > # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES > > EXTRACT_ALL = NO > > -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class > +# If the EXTRACT_PRIVATE tag is set to YES all private members of a class > # will be included in the documentation. > > EXTRACT_PRIVATE = NO > > -# If the EXTRACT_STATIC tag is set to YES all static members of a file > +# If the EXTRACT_STATIC tag is set to YES all static members of a file > # will be included in the documentation. > > EXTRACT_STATIC = NO > > -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) > -# defined locally in source files will be included in the documentation. > +# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) > +# defined locally in source files will be included in the documentation. > # If set to NO only classes defined in header files are included. > > EXTRACT_LOCAL_CLASSES = YES > > -# This flag is only useful for Objective-C code. When set to YES local > -# methods, which are defined in the implementation section but not in > -# the interface are included in the documentation. > +# This flag is only useful for Objective-C code. When set to YES local > +# methods, which are defined in the implementation section but not in > +# the interface are included in the documentation. > # If set to NO (the default) only methods in the interface are included. > > EXTRACT_LOCAL_METHODS = NO > > -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all > -# undocumented members of documented classes, files or namespaces. > -# If set to NO (the default) these members will be included in the > -# various overviews, but no documentation section is generated. > +# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all > +# undocumented members of documented classes, files or namespaces. > +# If set to NO (the default) these members will be included in the > +# various overviews, but no documentation section is generated. > # This option has no effect if EXTRACT_ALL is enabled. > > HIDE_UNDOC_MEMBERS = NO > > -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all > -# undocumented classes that are normally visible in the class hierarchy. > -# If set to NO (the default) these classes will be included in the various > +# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all > +# undocumented classes that are normally visible in the class hierarchy. > +# If set to NO (the default) these classes will be included in the various > # overviews. This option has no effect if EXTRACT_ALL is enabled. > > HIDE_UNDOC_CLASSES = NO > > -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all > -# friend (class|struct|union) declarations. > -# If set to NO (the default) these declarations will be included in the > +# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all > +# friend (class|struct|union) declarations. > +# If set to NO (the default) these declarations will be included in the > # documentation. > > HIDE_FRIEND_COMPOUNDS = NO > > -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any > -# documentation blocks found inside the body of a function. > -# If set to NO (the default) these blocks will be appended to the > +# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any > +# documentation blocks found inside the body of a function. > +# If set to NO (the default) these blocks will be appended to the > # function's detailed documentation block. > > HIDE_IN_BODY_DOCS = NO > > -# The INTERNAL_DOCS tag determines if documentation > -# that is typed after a \internal command is included. If the tag is set > -# to NO (the default) then the documentation will be excluded. > +# The INTERNAL_DOCS tag determines if documentation > +# that is typed after a \internal command is included. If the tag is set > +# to NO (the default) then the documentation will be excluded. > # Set it to YES to include the internal documentation. > > INTERNAL_DOCS = NO > > -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate > -# file names in lower-case letters. If set to YES upper-case letters are also > -# allowed. This is useful if you have classes or files whose names only differ > -# in case and if your file system supports case sensitive file names. Windows > +# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate > +# file names in lower-case letters. If set to YES upper-case letters are also > +# allowed. This is useful if you have classes or files whose names only differ > +# in case and if your file system supports case sensitive file names. Windows > # and Mac users are advised to set this option to NO. > > CASE_SENSE_NAMES = YES > > -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen > -# will show members with their full class and namespace scopes in the > +# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen > +# will show members with their full class and namespace scopes in the > # documentation. If set to YES the scope will be hidden. > > HIDE_SCOPE_NAMES = NO > > -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen > -# will put a list of the files that are included by a file in the documentation > +# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen > +# will put a list of the files that are included by a file in the documentation > # of that file. > > SHOW_INCLUDE_FILES = YES > > -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] > +# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] > # is inserted in the documentation for inline members. > > INLINE_INFO = YES > > -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen > -# will sort the (detailed) documentation of file and class members > -# alphabetically by member name. If set to NO the members will appear in > +# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen > +# will sort the (detailed) documentation of file and class members > +# alphabetically by member name. If set to NO the members will appear in > # declaration order. > > SORT_MEMBER_DOCS = YES > > -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the > -# brief documentation of file, namespace and class members alphabetically > -# by member name. If set to NO (the default) the members will appear in > +# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the > +# brief documentation of file, namespace and class members alphabetically > +# by member name. If set to NO (the default) the members will appear in > # declaration order. > > SORT_BRIEF_DOCS = NO > > -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be > -# sorted by fully-qualified names, including namespaces. If set to > -# NO (the default), the class list will be sorted only by class name, > -# not including the namespace part. > +# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be > +# sorted by fully-qualified names, including namespaces. If set to > +# NO (the default), the class list will be sorted only by class name, > +# not including the namespace part. > # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. > -# Note: This option applies only to the class list, not to the > +# Note: This option applies only to the class list, not to the > # alphabetical list. > > SORT_BY_SCOPE_NAME = NO > > -# The GENERATE_TODOLIST tag can be used to enable (YES) or > -# disable (NO) the todo list. This list is created by putting \todo > +# The GENERATE_TODOLIST tag can be used to enable (YES) or > +# disable (NO) the todo list. This list is created by putting \todo > # commands in the documentation. > > GENERATE_TODOLIST = YES > > -# The GENERATE_TESTLIST tag can be used to enable (YES) or > -# disable (NO) the test list. This list is created by putting \test > +# The GENERATE_TESTLIST tag can be used to enable (YES) or > +# disable (NO) the test list. This list is created by putting \test > # commands in the documentation. > > GENERATE_TESTLIST = YES > > -# The GENERATE_BUGLIST tag can be used to enable (YES) or > -# disable (NO) the bug list. This list is created by putting \bug > +# The GENERATE_BUGLIST tag can be used to enable (YES) or > +# disable (NO) the bug list. This list is created by putting \bug > # commands in the documentation. > > GENERATE_BUGLIST = YES > > -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or > -# disable (NO) the deprecated list. This list is created by putting > +# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or > +# disable (NO) the deprecated list. This list is created by putting > # \deprecated commands in the documentation. > > GENERATE_DEPRECATEDLIST= YES > > -# The ENABLED_SECTIONS tag can be used to enable conditional > +# The ENABLED_SECTIONS tag can be used to enable conditional > # documentation sections, marked by \if sectionname ... \endif. > > -ENABLED_SECTIONS = > +ENABLED_SECTIONS = > > -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines > -# the initial value of a variable or define consists of for it to appear in > -# the documentation. If the initializer consists of more lines than specified > -# here it will be hidden. Use a value of 0 to hide initializers completely. > -# The appearance of the initializer of individual variables and defines in the > -# documentation can be controlled using \showinitializer or \hideinitializer > +# The MAX_INITIALIZER_LINES tag determines the maximum number of lines > +# the initial value of a variable or define consists of for it to appear in > +# the documentation. If the initializer consists of more lines than specified > +# here it will be hidden. Use a value of 0 to hide initializers completely. > +# The appearance of the initializer of individual variables and defines in the > +# documentation can be controlled using \showinitializer or \hideinitializer > # command in the documentation regardless of this setting. > > MAX_INITIALIZER_LINES = 30 > > -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated > -# at the bottom of the documentation of classes and structs. If set to YES the > +# Set the SHOW_USED_FILES tag to NO to disable the list of files generated > +# at the bottom of the documentation of classes and structs. If set to YES the > # list will mention the files that were used to generate the documentation. > > SHOW_USED_FILES = YES > > -# If the sources in your project are distributed over multiple directories > -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy > +# If the sources in your project are distributed over multiple directories > +# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy > # in the documentation. The default is NO. > > SHOW_DIRECTORIES = NO > > -# The FILE_VERSION_FILTER tag can be used to specify a program or script that > -# doxygen should invoke to get the current version for each file (typically from the > -# version control system). Doxygen will invoke the program by executing (via > -# popen()) the command , where is the value of > -# the FILE_VERSION_FILTER tag, and is the name of an input file > -# provided by doxygen. Whatever the program writes to standard output > +# The FILE_VERSION_FILTER tag can be used to specify a program or script that > +# doxygen should invoke to get the current version for each file (typically from the > +# version control system). Doxygen will invoke the program by executing (via > +# popen()) the command , where is the value of > +# the FILE_VERSION_FILTER tag, and is the name of an input file > +# provided by doxygen. Whatever the program writes to standard output > # is used as the file version. See the manual for examples. > > -FILE_VERSION_FILTER = > +FILE_VERSION_FILTER = > > #--------------------------------------------------------------------------- > # configuration options related to warning and progress messages > #--------------------------------------------------------------------------- > > -# The QUIET tag can be used to turn on/off the messages that are generated > +# The QUIET tag can be used to turn on/off the messages that are generated > # by doxygen. Possible values are YES and NO. If left blank NO is used. > > QUIET = NO > > -# The WARNINGS tag can be used to turn on/off the warning messages that are > -# generated by doxygen. Possible values are YES and NO. If left blank > +# The WARNINGS tag can be used to turn on/off the warning messages that are > +# generated by doxygen. Possible values are YES and NO. If left blank > # NO is used. > > WARNINGS = YES > > -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings > -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will > +# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings > +# for undocumented members. If EXTRACT_ALL is set to YES then this flag will > # automatically be disabled. > > WARN_IF_UNDOCUMENTED = YES > > -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for > -# potential errors in the documentation, such as not documenting some > -# parameters in a documented function, or documenting parameters that > +# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for > +# potential errors in the documentation, such as not documenting some > +# parameters in a documented function, or documenting parameters that > # don't exist or using markup commands wrongly. > > WARN_IF_DOC_ERROR = YES > > -# This WARN_NO_PARAMDOC option can be abled to get warnings for > -# functions that are documented, but have no documentation for their parameters > -# or return value. If set to NO (the default) doxygen will only warn about > -# wrong or incomplete parameter documentation, but not about the absence of > +# This WARN_NO_PARAMDOC option can be abled to get warnings for > +# functions that are documented, but have no documentation for their parameters > +# or return value. If set to NO (the default) doxygen will only warn about > +# wrong or incomplete parameter documentation, but not about the absence of > # documentation. > > WARN_NO_PARAMDOC = NO > > -# The WARN_FORMAT tag determines the format of the warning messages that > -# doxygen can produce. The string should contain the $file, $line, and $text > -# tags, which will be replaced by the file and line number from which the > -# warning originated and the warning text. Optionally the format may contain > -# $version, which will be replaced by the version of the file (if it could > +# The WARN_FORMAT tag determines the format of the warning messages that > +# doxygen can produce. The string should contain the $file, $line, and $text > +# tags, which will be replaced by the file and line number from which the > +# warning originated and the warning text. Optionally the format may contain > +# $version, which will be replaced by the version of the file (if it could > # be obtained via FILE_VERSION_FILTER) > > WARN_FORMAT = "$file:$line: $text" > > -# The WARN_LOGFILE tag can be used to specify a file to which warning > -# and error messages should be written. If left blank the output is written > +# The WARN_LOGFILE tag can be used to specify a file to which warning > +# and error messages should be written. If left blank the output is written > # to stderr. > > -WARN_LOGFILE = > +WARN_LOGFILE = > > #--------------------------------------------------------------------------- > # configuration options related to the input files > #--------------------------------------------------------------------------- > > -# The INPUT tag can be used to specify the files and/or directories that contain > -# documented source files. You may enter file names like "myfile.cpp" or > -# directories like "/usr/src/myproject". Separate the files or directories > +# The INPUT tag can be used to specify the files and/or directories that contain > +# documented source files. You may enter file names like "myfile.cpp" or > +# directories like "/usr/src/myproject". Separate the files or directories > # with spaces. > > INPUT = . ./doc/mainpage > > -# If the value of the INPUT tag contains directories, you can use the > -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp > -# and *.h) to filter out the source-files in the directories. If left > -# blank the following patterns are tested: > -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx > +# If the value of the INPUT tag contains directories, you can use the > +# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp > +# and *.h) to filter out the source-files in the directories. If left > +# blank the following patterns are tested: > +# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx > # *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py > > #FILE_PATTERNS = *.c *.h doc/mainpage > -FILE_PATTERNS = > +FILE_PATTERNS = > > -# The RECURSIVE tag can be used to turn specify whether or not subdirectories > -# should be searched for input files as well. Possible values are YES and NO. > +# The RECURSIVE tag can be used to turn specify whether or not subdirectories > +# should be searched for input files as well. Possible values are YES and NO. > # If left blank NO is used. > > RECURSIVE = NO > > -# The EXCLUDE tag can be used to specify files and/or directories that should > -# excluded from the INPUT source files. This way you can easily exclude a > +# The EXCLUDE tag can be used to specify files and/or directories that should > +# excluded from the INPUT source files. This way you can easily exclude a > # subdirectory from a directory tree whose root is specified with the INPUT tag. > > -EXCLUDE = > +EXCLUDE = > > -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or > -# directories that are symbolic links (a Unix filesystem feature) are excluded > +# The EXCLUDE_SYMLINKS tag can be used select whether or not files or > +# directories that are symbolic links (a Unix filesystem feature) are excluded > # from the input. > > EXCLUDE_SYMLINKS = NO > > -# If the value of the INPUT tag contains directories, you can use the > -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude > -# certain files from those directories. Note that the wildcards are matched > -# against the file with absolute path, so to exclude all test directories > +# If the value of the INPUT tag contains directories, you can use the > +# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude > +# certain files from those directories. Note that the wildcards are matched > +# against the file with absolute path, so to exclude all test directories > # for example use the pattern */test/* > > -EXCLUDE_PATTERNS = > +EXCLUDE_PATTERNS = > > -# The EXAMPLE_PATH tag can be used to specify one or more files or > -# directories that contain example code fragments that are included (see > +# The EXAMPLE_PATH tag can be used to specify one or more files or > +# directories that contain example code fragments that are included (see > # the \include command). > > -EXAMPLE_PATH = > +EXAMPLE_PATH = > > -# If the value of the EXAMPLE_PATH tag contains directories, you can use the > -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp > -# and *.h) to filter out the source-files in the directories. If left > +# If the value of the EXAMPLE_PATH tag contains directories, you can use the > +# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp > +# and *.h) to filter out the source-files in the directories. If left > # blank all files are included. > > -EXAMPLE_PATTERNS = > +EXAMPLE_PATTERNS = > > -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be > -# searched for input files to be used with the \include or \dontinclude > -# commands irrespective of the value of the RECURSIVE tag. > +# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be > +# searched for input files to be used with the \include or \dontinclude > +# commands irrespective of the value of the RECURSIVE tag. > # Possible values are YES and NO. If left blank NO is used. > > EXAMPLE_RECURSIVE = NO > > -# The IMAGE_PATH tag can be used to specify one or more files or > -# directories that contain image that are included in the documentation (see > +# The IMAGE_PATH tag can be used to specify one or more files or > +# directories that contain image that are included in the documentation (see > # the \image command). > > -IMAGE_PATH = > +IMAGE_PATH = > > -# The INPUT_FILTER tag can be used to specify a program that doxygen should > -# invoke to filter for each input file. Doxygen will invoke the filter program > -# by executing (via popen()) the command , where > -# is the value of the INPUT_FILTER tag, and is the name of an > -# input file. Doxygen will then use the output that the filter program writes > -# to standard output. If FILTER_PATTERNS is specified, this tag will be > +# The INPUT_FILTER tag can be used to specify a program that doxygen should > +# invoke to filter for each input file. Doxygen will invoke the filter program > +# by executing (via popen()) the command , where > +# is the value of the INPUT_FILTER tag, and is the name of an > +# input file. Doxygen will then use the output that the filter program writes > +# to standard output. If FILTER_PATTERNS is specified, this tag will be > # ignored. > > -INPUT_FILTER = > +INPUT_FILTER = > > -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern > -# basis. Doxygen will compare the file name with each pattern and apply the > -# filter if there is a match. The filters are a list of the form: > -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further > -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER > +# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern > +# basis. Doxygen will compare the file name with each pattern and apply the > +# filter if there is a match. The filters are a list of the form: > +# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further > +# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER > # is applied to all files. > > -FILTER_PATTERNS = > +FILTER_PATTERNS = > > -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using > -# INPUT_FILTER) will be used to filter the input files when producing source > +# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using > +# INPUT_FILTER) will be used to filter the input files when producing source > # files to browse (i.e. when SOURCE_BROWSER is set to YES). > > FILTER_SOURCE_FILES = NO > @@ -552,32 +552,32 @@ > # configuration options related to source browsing > #--------------------------------------------------------------------------- > > -# If the SOURCE_BROWSER tag is set to YES then a list of source files will > -# be generated. Documented entities will be cross-referenced with these sources. > -# Note: To get rid of all source code in the generated output, make sure also > +# If the SOURCE_BROWSER tag is set to YES then a list of source files will > +# be generated. Documented entities will be cross-referenced with these sources. > +# Note: To get rid of all source code in the generated output, make sure also > # VERBATIM_HEADERS is set to NO. > > SOURCE_BROWSER = NO > > -# Setting the INLINE_SOURCES tag to YES will include the body > +# Setting the INLINE_SOURCES tag to YES will include the body > # of functions and classes directly in the documentation. > > INLINE_SOURCES = NO > > -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct > -# doxygen to hide any special comment blocks from generated source code > +# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct > +# doxygen to hide any special comment blocks from generated source code > # fragments. Normal C and C++ comments will always remain visible. > > STRIP_CODE_COMMENTS = YES > > -# If the REFERENCED_BY_RELATION tag is set to YES (the default) > -# then for each documented function all documented > +# If the REFERENCED_BY_RELATION tag is set to YES (the default) > +# then for each documented function all documented > # functions referencing it will be listed. > > REFERENCED_BY_RELATION = YES > > -# If the REFERENCES_RELATION tag is set to YES (the default) > -# then for each documented function all documented entities > +# If the REFERENCES_RELATION tag is set to YES (the default) > +# then for each documented function all documented entities > # called/used by that function will be listed. > > REFERENCES_RELATION = YES > @@ -589,16 +589,16 @@ > > REFERENCES_LINK_SOURCE = YES > > -# If the USE_HTAGS tag is set to YES then the references to source code > -# will point to the HTML generated by the htags(1) tool instead of doxygen > -# built-in source browser. The htags tool is part of GNU's global source > -# tagging system (see http://www.gnu.org/software/global/global.html). You > +# If the USE_HTAGS tag is set to YES then the references to source code > +# will point to the HTML generated by the htags(1) tool instead of doxygen > +# built-in source browser. The htags tool is part of GNU's global source > +# tagging system (see http://www.gnu.org/software/global/global.html). You > # will need version 4.8.6 or higher. > > USE_HTAGS = NO > > -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen > -# will generate a verbatim copy of the header file for each class for > +# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen > +# will generate a verbatim copy of the header file for each class for > # which an include is specified. Set to NO to disable this. > > VERBATIM_HEADERS = YES > @@ -607,133 +607,133 @@ > # configuration options related to the alphabetical class index > #--------------------------------------------------------------------------- > > -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index > -# of all compounds will be generated. Enable this if the project > +# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index > +# of all compounds will be generated. Enable this if the project > # contains a lot of classes, structs, unions or interfaces. > > ALPHABETICAL_INDEX = NO > > -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then > -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns > +# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then > +# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns > # in which this list will be split (can be a number in the range [1..20]) > > COLS_IN_ALPHA_INDEX = 5 > > -# In case all classes in a project start with a common prefix, all > -# classes will be put under the same header in the alphabetical index. > -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that > +# In case all classes in a project start with a common prefix, all > +# classes will be put under the same header in the alphabetical index. > +# The IGNORE_PREFIX tag can be used to specify one or more prefixes that > # should be ignored while generating the index headers. > > -IGNORE_PREFIX = > +IGNORE_PREFIX = > > #--------------------------------------------------------------------------- > # configuration options related to the HTML output > #--------------------------------------------------------------------------- > > -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will > +# If the GENERATE_HTML tag is set to YES (the default) Doxygen will > # generate HTML output. > > GENERATE_HTML = YES > > -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. > -# If a relative path is entered the value of OUTPUT_DIRECTORY will be > +# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. > +# If a relative path is entered the value of OUTPUT_DIRECTORY will be > # put in front of it. If left blank `html' will be used as the default path. > > HTML_OUTPUT = html > > -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for > -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank > +# The HTML_FILE_EXTENSION tag can be used to specify the file extension for > +# each generated HTML page (for example: .htm,.php,.asp). If it is left blank > # doxygen will generate files with .html extension. > > HTML_FILE_EXTENSION = .html > > -# The HTML_HEADER tag can be used to specify a personal HTML header for > -# each generated HTML page. If it is left blank doxygen will generate a > +# The HTML_HEADER tag can be used to specify a personal HTML header for > +# each generated HTML page. If it is left blank doxygen will generate a > # standard header. > > -HTML_HEADER = > +HTML_HEADER = > > -# The HTML_FOOTER tag can be used to specify a personal HTML footer for > -# each generated HTML page. If it is left blank doxygen will generate a > +# The HTML_FOOTER tag can be used to specify a personal HTML footer for > +# each generated HTML page. If it is left blank doxygen will generate a > # standard footer. > > -HTML_FOOTER = > +HTML_FOOTER = > > -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading > -# style sheet that is used by each HTML page. It can be used to > -# fine-tune the look of the HTML output. If the tag is left blank doxygen > -# will generate a default style sheet. Note that doxygen will try to copy > -# the style sheet file to the HTML output directory, so don't put your own > +# The HTML_STYLESHEET tag can be used to specify a user-defined cascading > +# style sheet that is used by each HTML page. It can be used to > +# fine-tune the look of the HTML output. If the tag is left blank doxygen > +# will generate a default style sheet. Note that doxygen will try to copy > +# the style sheet file to the HTML output directory, so don't put your own > # stylesheet in the HTML output directory as well, or it will be erased! > > -HTML_STYLESHEET = > +HTML_STYLESHEET = > > -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, > -# files or namespaces will be aligned in HTML using tables. If set to > +# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, > +# files or namespaces will be aligned in HTML using tables. If set to > # NO a bullet list will be used. > > HTML_ALIGN_MEMBERS = YES > > -# If the GENERATE_HTMLHELP tag is set to YES, additional index files > -# will be generated that can be used as input for tools like the > -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) > +# If the GENERATE_HTMLHELP tag is set to YES, additional index files > +# will be generated that can be used as input for tools like the > +# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) > # of the generated HTML documentation. > > GENERATE_HTMLHELP = NO > > -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can > -# be used to specify the file name of the resulting .chm file. You > -# can add a path in front of the file if the result should not be > +# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can > +# be used to specify the file name of the resulting .chm file. You > +# can add a path in front of the file if the result should not be > # written to the html output directory. > > -CHM_FILE = > +CHM_FILE = > > -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can > -# be used to specify the location (absolute path including file name) of > -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run > +# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can > +# be used to specify the location (absolute path including file name) of > +# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run > # the HTML help compiler on the generated index.hhp. > > -HHC_LOCATION = > +HHC_LOCATION = > > -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag > -# controls if a separate .chi index file is generated (YES) or that > +# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag > +# controls if a separate .chi index file is generated (YES) or that > # it should be included in the master .chm file (NO). > > GENERATE_CHI = NO > > -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag > -# controls whether a binary table of contents is generated (YES) or a > +# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag > +# controls whether a binary table of contents is generated (YES) or a > # normal table of contents (NO) in the .chm file. > > BINARY_TOC = NO > > -# The TOC_EXPAND flag can be set to YES to add extra items for group members > +# The TOC_EXPAND flag can be set to YES to add extra items for group members > # to the contents of the HTML help documentation and to the tree view. > > TOC_EXPAND = NO > > -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at > -# top of each HTML page. The value NO (the default) enables the index and > +# The DISABLE_INDEX tag can be used to turn on/off the condensed index at > +# top of each HTML page. The value NO (the default) enables the index and > # the value YES disables it. > > DISABLE_INDEX = NO > > -# This tag can be used to set the number of enum values (range [1..20]) > +# This tag can be used to set the number of enum values (range [1..20]) > # that doxygen will group on one line in the generated HTML documentation. > > ENUM_VALUES_PER_LINE = 4 > > # If the GENERATE_TREEVIEW tag is set to YES, a side panel will be > -# generated containing a tree-like index structure (just like the one that > -# is generated for HTML Help). For this to work a browser that supports > -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, > -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are > +# generated containing a tree-like index structure (just like the one that > +# is generated for HTML Help). For this to work a browser that supports > +# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, > +# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are > # probably better off using the HTML help feature. > > GENERATE_TREEVIEW = NO > > -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be > -# used to set the initial width (in pixels) of the frame in which the tree > +# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be > +# used to set the initial width (in pixels) of the frame in which the tree > # is shown. > > TREEVIEW_WIDTH = 250 > @@ -742,74 +742,74 @@ > # configuration options related to the LaTeX output > #--------------------------------------------------------------------------- > > -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will > +# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will > # generate Latex output. > > GENERATE_LATEX = NO > > -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. > -# If a relative path is entered the value of OUTPUT_DIRECTORY will be > +# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. > +# If a relative path is entered the value of OUTPUT_DIRECTORY will be > # put in front of it. If left blank `latex' will be used as the default path. > > LATEX_OUTPUT = latex > > -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be > +# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be > # invoked. If left blank `latex' will be used as the default command name. > > LATEX_CMD_NAME = latex > > -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to > -# generate index for LaTeX. If left blank `makeindex' will be used as the > +# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to > +# generate index for LaTeX. If left blank `makeindex' will be used as the > # default command name. > > MAKEINDEX_CMD_NAME = makeindex > > -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact > -# LaTeX documents. This may be useful for small projects and may help to > +# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact > +# LaTeX documents. This may be useful for small projects and may help to > # save some trees in general. > > COMPACT_LATEX = NO > > -# The PAPER_TYPE tag can be used to set the paper type that is used > -# by the printer. Possible values are: a4, a4wide, letter, legal and > +# The PAPER_TYPE tag can be used to set the paper type that is used > +# by the printer. Possible values are: a4, a4wide, letter, legal and > # executive. If left blank a4wide will be used. > > PAPER_TYPE = a4wide > > -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX > +# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX > # packages that should be included in the LaTeX output. > > -EXTRA_PACKAGES = > +EXTRA_PACKAGES = > > -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for > -# the generated latex document. The header should contain everything until > -# the first chapter. If it is left blank doxygen will generate a > +# The LATEX_HEADER tag can be used to specify a personal LaTeX header for > +# the generated latex document. The header should contain everything until > +# the first chapter. If it is left blank doxygen will generate a > # standard header. Notice: only use this tag if you know what you are doing! > > -LATEX_HEADER = > +LATEX_HEADER = > > -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated > -# is prepared for conversion to pdf (using ps2pdf). The pdf file will > -# contain links (just like the HTML output) instead of page references > +# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated > +# is prepared for conversion to pdf (using ps2pdf). The pdf file will > +# contain links (just like the HTML output) instead of page references > # This makes the output suitable for online browsing using a pdf viewer. > > PDF_HYPERLINKS = NO > > -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of > -# plain latex in the generated Makefile. Set this option to YES to get a > +# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of > +# plain latex in the generated Makefile. Set this option to YES to get a > # higher quality PDF documentation. > > USE_PDFLATEX = NO > > -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. > -# command to the generated LaTeX files. This will instruct LaTeX to keep > -# running if errors occur, instead of asking the user for help. > +# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. > +# command to the generated LaTeX files. This will instruct LaTeX to keep > +# running if errors occur, instead of asking the user for help. > # This option is also used when generating formulas in HTML. > > LATEX_BATCHMODE = NO > > -# If LATEX_HIDE_INDICES is set to YES then doxygen will not > -# include the index chapters (such as File Index, Compound Index, etc.) > +# If LATEX_HIDE_INDICES is set to YES then doxygen will not > +# include the index chapters (such as File Index, Compound Index, etc.) > # in the output. > > LATEX_HIDE_INDICES = NO > @@ -818,68 +818,68 @@ > # configuration options related to the RTF output > #--------------------------------------------------------------------------- > > -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output > -# The RTF output is optimized for Word 97 and may not look very pretty with > +# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output > +# The RTF output is optimized for Word 97 and may not look very pretty with > # other RTF readers or editors. > > GENERATE_RTF = NO > > -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. > -# If a relative path is entered the value of OUTPUT_DIRECTORY will be > +# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. > +# If a relative path is entered the value of OUTPUT_DIRECTORY will be > # put in front of it. If left blank `rtf' will be used as the default path. > > RTF_OUTPUT = rtf > > -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact > -# RTF documents. This may be useful for small projects and may help to > +# If the COMPACT_RTF tag is set to YES Doxygen generates more compact > +# RTF documents. This may be useful for small projects and may help to > # save some trees in general. > > COMPACT_RTF = NO > > -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated > -# will contain hyperlink fields. The RTF file will > -# contain links (just like the HTML output) instead of page references. > -# This makes the output suitable for online browsing using WORD or other > -# programs which support those fields. > +# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated > +# will contain hyperlink fields. The RTF file will > +# contain links (just like the HTML output) instead of page references. > +# This makes the output suitable for online browsing using WORD or other > +# programs which support those fields. > # Note: wordpad (write) and others do not support links. > > RTF_HYPERLINKS = NO > > -# Load stylesheet definitions from file. Syntax is similar to doxygen's > -# config file, i.e. a series of assignments. You only have to provide > +# Load stylesheet definitions from file. Syntax is similar to doxygen's > +# config file, i.e. a series of assignments. You only have to provide > # replacements, missing definitions are set to their default value. > > -RTF_STYLESHEET_FILE = > +RTF_STYLESHEET_FILE = > > -# Set optional variables used in the generation of an rtf document. > +# Set optional variables used in the generation of an rtf document. > # Syntax is similar to doxygen's config file. > > -RTF_EXTENSIONS_FILE = > +RTF_EXTENSIONS_FILE = > > #--------------------------------------------------------------------------- > # configuration options related to the man page output > #--------------------------------------------------------------------------- > > -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will > +# If the GENERATE_MAN tag is set to YES (the default) Doxygen will > # generate man pages > > GENERATE_MAN = NO > > -# The MAN_OUTPUT tag is used to specify where the man pages will be put. > -# If a relative path is entered the value of OUTPUT_DIRECTORY will be > +# The MAN_OUTPUT tag is used to specify where the man pages will be put. > +# If a relative path is entered the value of OUTPUT_DIRECTORY will be > # put in front of it. If left blank `man' will be used as the default path. > > MAN_OUTPUT = man > > -# The MAN_EXTENSION tag determines the extension that is added to > +# The MAN_EXTENSION tag determines the extension that is added to > # the generated man pages (default is the subroutine's section .3) > > MAN_EXTENSION = .3 > > -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, > -# then it will generate one additional man file for each entity > -# documented in the real man page(s). These additional files > -# only source the real man page, but without them the man command > +# If the MAN_LINKS tag is set to YES and Doxygen generates man output, > +# then it will generate one additional man file for each entity > +# documented in the real man page(s). These additional files > +# only source the real man page, but without them the man command > # would be unable to find the correct page. The default is NO. > > MAN_LINKS = NO > @@ -888,33 +888,33 @@ > # configuration options related to the XML output > #--------------------------------------------------------------------------- > > -# If the GENERATE_XML tag is set to YES Doxygen will > -# generate an XML file that captures the structure of > +# If the GENERATE_XML tag is set to YES Doxygen will > +# generate an XML file that captures the structure of > # the code including all documentation. > > GENERATE_XML = NO > > -# The XML_OUTPUT tag is used to specify where the XML pages will be put. > -# If a relative path is entered the value of OUTPUT_DIRECTORY will be > +# The XML_OUTPUT tag is used to specify where the XML pages will be put. > +# If a relative path is entered the value of OUTPUT_DIRECTORY will be > # put in front of it. If left blank `xml' will be used as the default path. > > XML_OUTPUT = xml > > -# The XML_SCHEMA tag can be used to specify an XML schema, > -# which can be used by a validating XML parser to check the > +# The XML_SCHEMA tag can be used to specify an XML schema, > +# which can be used by a validating XML parser to check the > # syntax of the XML files. > > -XML_SCHEMA = > +XML_SCHEMA = > > -# The XML_DTD tag can be used to specify an XML DTD, > -# which can be used by a validating XML parser to check the > +# The XML_DTD tag can be used to specify an XML DTD, > +# which can be used by a validating XML parser to check the > # syntax of the XML files. > > -XML_DTD = > +XML_DTD = > > -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will > -# dump the program listings (including syntax highlighting > -# and cross-referencing information) to the XML output. Note that > +# If the XML_PROGRAMLISTING tag is set to YES Doxygen will > +# dump the program listings (including syntax highlighting > +# and cross-referencing information) to the XML output. Note that > # enabling this will significantly increase the size of the XML output. > > XML_PROGRAMLISTING = YES > @@ -923,10 +923,10 @@ > # configuration options for the AutoGen Definitions output > #--------------------------------------------------------------------------- > > -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will > -# generate an AutoGen Definitions (see autogen.sf.net) file > -# that captures the structure of the code including all > -# documentation. Note that this feature is still experimental > +# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will > +# generate an AutoGen Definitions (see autogen.sf.net) file > +# that captures the structure of the code including all > +# documentation. Note that this feature is still experimental > # and incomplete at the moment. > > GENERATE_AUTOGEN_DEF = NO > @@ -935,319 +935,319 @@ > # configuration options related to the Perl module output > #--------------------------------------------------------------------------- > > -# If the GENERATE_PERLMOD tag is set to YES Doxygen will > -# generate a Perl module file that captures the structure of > -# the code including all documentation. Note that this > -# feature is still experimental and incomplete at the > +# If the GENERATE_PERLMOD tag is set to YES Doxygen will > +# generate a Perl module file that captures the structure of > +# the code including all documentation. Note that this > +# feature is still experimental and incomplete at the > # moment. > > GENERATE_PERLMOD = NO > > -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate > -# the necessary Makefile rules, Perl scripts and LaTeX code to be able > +# If the PERLMOD_LATEX tag is set to YES Doxygen will generate > +# the necessary Makefile rules, Perl scripts and LaTeX code to be able > # to generate PDF and DVI output from the Perl module output. > > PERLMOD_LATEX = NO > > -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be > -# nicely formatted so it can be parsed by a human reader. This is useful > -# if you want to understand what is going on. On the other hand, if this > -# tag is set to NO the size of the Perl module output will be much smaller > +# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be > +# nicely formatted so it can be parsed by a human reader. This is useful > +# if you want to understand what is going on. On the other hand, if this > +# tag is set to NO the size of the Perl module output will be much smaller > # and Perl will parse it just the same. > > PERLMOD_PRETTY = YES > > -# The names of the make variables in the generated doxyrules.make file > -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. > -# This is useful so different doxyrules.make files included by the same > +# The names of the make variables in the generated doxyrules.make file > +# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. > +# This is useful so different doxyrules.make files included by the same > # Makefile don't overwrite each other's variables. > > -PERLMOD_MAKEVAR_PREFIX = > +PERLMOD_MAKEVAR_PREFIX = > > #--------------------------------------------------------------------------- > -# Configuration options related to the preprocessor > +# Configuration options related to the preprocessor > #--------------------------------------------------------------------------- > > -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will > -# evaluate all C-preprocessor directives found in the sources and include > +# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will > +# evaluate all C-preprocessor directives found in the sources and include > # files. > > ENABLE_PREPROCESSING = YES > > -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro > -# names in the source code. If set to NO (the default) only conditional > -# compilation will be performed. Macro expansion can be done in a controlled > +# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro > +# names in the source code. If set to NO (the default) only conditional > +# compilation will be performed. Macro expansion can be done in a controlled > # way by setting EXPAND_ONLY_PREDEF to YES. > > MACRO_EXPANSION = NO > > -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES > -# then the macro expansion is limited to the macros specified with the > +# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES > +# then the macro expansion is limited to the macros specified with the > # PREDEFINED and EXPAND_AS_DEFINED tags. > > EXPAND_ONLY_PREDEF = NO > > -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files > +# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files > # in the INCLUDE_PATH (see below) will be search if a #include is found. > > SEARCH_INCLUDES = YES > > -# The INCLUDE_PATH tag can be used to specify one or more directories that > -# contain include files that are not input files but should be processed by > +# The INCLUDE_PATH tag can be used to specify one or more directories that > +# contain include files that are not input files but should be processed by > # the preprocessor. > > -INCLUDE_PATH = > +INCLUDE_PATH = > > -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard > -# patterns (like *.h and *.hpp) to filter out the header-files in the > -# directories. If left blank, the patterns specified with FILE_PATTERNS will > +# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard > +# patterns (like *.h and *.hpp) to filter out the header-files in the > +# directories. If left blank, the patterns specified with FILE_PATTERNS will > # be used. > > -INCLUDE_FILE_PATTERNS = > +INCLUDE_FILE_PATTERNS = > > -# The PREDEFINED tag can be used to specify one or more macro names that > -# are defined before the preprocessor is started (similar to the -D option of > -# gcc). The argument of the tag is a list of macros of the form: name > -# or name=definition (no spaces). If the definition and the = are > -# omitted =1 is assumed. To prevent a macro definition from being > -# undefined via #undef or recursively expanded use the := operator > +# The PREDEFINED tag can be used to specify one or more macro names that > +# are defined before the preprocessor is started (similar to the -D option of > +# gcc). The argument of the tag is a list of macros of the form: name > +# or name=definition (no spaces). If the definition and the = are > +# omitted =1 is assumed. To prevent a macro definition from being > +# undefined via #undef or recursively expanded use the := operator > # instead of the = operator. > > -PREDEFINED = > +PREDEFINED = > > -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then > -# this tag can be used to specify a list of macro names that should be expanded. > -# The macro definition that is found in the sources will be used. > +# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then > +# this tag can be used to specify a list of macro names that should be expanded. > +# The macro definition that is found in the sources will be used. > # Use the PREDEFINED tag if you want to use a different macro definition. > > -EXPAND_AS_DEFINED = > +EXPAND_AS_DEFINED = > > -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then > -# doxygen's preprocessor will remove all function-like macros that are alone > -# on a line, have an all uppercase name, and do not end with a semicolon. Such > -# function macros are typically used for boiler-plate code, and will confuse > +# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then > +# doxygen's preprocessor will remove all function-like macros that are alone > +# on a line, have an all uppercase name, and do not end with a semicolon. Such > +# function macros are typically used for boiler-plate code, and will confuse > # the parser if not removed. > > SKIP_FUNCTION_MACROS = YES > > #--------------------------------------------------------------------------- > -# Configuration::additions related to external references > +# Configuration::additions related to external references > #--------------------------------------------------------------------------- > > -# The TAGFILES option can be used to specify one or more tagfiles. > -# Optionally an initial location of the external documentation > -# can be added for each tagfile. The format of a tag file without > -# this location is as follows: > -# TAGFILES = file1 file2 ... > -# Adding location for the tag files is done as follows: > -# TAGFILES = file1=loc1 "file2 = loc2" ... > -# where "loc1" and "loc2" can be relative or absolute paths or > -# URLs. If a location is present for each tag, the installdox tool > +# The TAGFILES option can be used to specify one or more tagfiles. > +# Optionally an initial location of the external documentation > +# can be added for each tagfile. The format of a tag file without > +# this location is as follows: > +# TAGFILES = file1 file2 ... > +# Adding location for the tag files is done as follows: > +# TAGFILES = file1=loc1 "file2 = loc2" ... > +# where "loc1" and "loc2" can be relative or absolute paths or > +# URLs. If a location is present for each tag, the installdox tool > # does not have to be run to correct the links. > # Note that each tag file must have a unique name > # (where the name does NOT include the path) > -# If a tag file is not located in the directory in which doxygen > +# If a tag file is not located in the directory in which doxygen > # is run, you must also specify the path to the tagfile here. > > -TAGFILES = > +TAGFILES = > > -# When a file name is specified after GENERATE_TAGFILE, doxygen will create > +# When a file name is specified after GENERATE_TAGFILE, doxygen will create > # a tag file that is based on the input files it reads. > > -GENERATE_TAGFILE = > +GENERATE_TAGFILE = > > -# If the ALLEXTERNALS tag is set to YES all external classes will be listed > -# in the class index. If set to NO only the inherited external classes > +# If the ALLEXTERNALS tag is set to YES all external classes will be listed > +# in the class index. If set to NO only the inherited external classes > # will be listed. > > ALLEXTERNALS = NO > > -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed > -# in the modules index. If set to NO, only the current project's groups will > +# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed > +# in the modules index. If set to NO, only the current project's groups will > # be listed. > > EXTERNAL_GROUPS = YES > > -# The PERL_PATH should be the absolute path and name of the perl script > +# The PERL_PATH should be the absolute path and name of the perl script > # interpreter (i.e. the result of `which perl'). > > PERL_PATH = /usr/bin/perl > > #--------------------------------------------------------------------------- > -# Configuration options related to the dot tool > +# Configuration options related to the dot tool > #--------------------------------------------------------------------------- > > -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will > -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base > -# or super classes. Setting the tag to NO turns the diagrams off. Note that > -# this option is superseded by the HAVE_DOT option below. This is only a > -# fallback. It is recommended to install and use dot, since it yields more > +# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will > +# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base > +# or super classes. Setting the tag to NO turns the diagrams off. Note that > +# this option is superseded by the HAVE_DOT option below. This is only a > +# fallback. It is recommended to install and use dot, since it yields more > # powerful graphs. > > CLASS_DIAGRAMS = YES > > -# If set to YES, the inheritance and collaboration graphs will hide > -# inheritance and usage relations if the target is undocumented > +# If set to YES, the inheritance and collaboration graphs will hide > +# inheritance and usage relations if the target is undocumented > # or is not a class. > > HIDE_UNDOC_RELATIONS = YES > > -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is > -# available from the path. This tool is part of Graphviz, a graph visualization > -# toolkit from AT&T and Lucent Bell Labs. The other options in this section > +# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is > +# available from the path. This tool is part of Graphviz, a graph visualization > +# toolkit from AT&T and Lucent Bell Labs. The other options in this section > # have no effect if this option is set to NO (the default) > > HAVE_DOT = NO > > -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen > -# will generate a graph for each documented class showing the direct and > -# indirect inheritance relations. Setting this tag to YES will force the > +# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen > +# will generate a graph for each documented class showing the direct and > +# indirect inheritance relations. Setting this tag to YES will force the > # the CLASS_DIAGRAMS tag to NO. > > CLASS_GRAPH = YES > > -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen > -# will generate a graph for each documented class showing the direct and > -# indirect implementation dependencies (inheritance, containment, and > +# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen > +# will generate a graph for each documented class showing the direct and > +# indirect implementation dependencies (inheritance, containment, and > # class references variables) of the class with other documented classes. > > COLLABORATION_GRAPH = YES > > -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen > +# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen > # will generate a graph for groups, showing the direct groups dependencies > > GROUP_GRAPHS = YES > > -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and > -# collaboration diagrams in a style similar to the OMG's Unified Modeling > +# If the UML_LOOK tag is set to YES doxygen will generate inheritance and > +# collaboration diagrams in a style similar to the OMG's Unified Modeling > # Language. > > UML_LOOK = NO > > -# If set to YES, the inheritance and collaboration graphs will show the > +# If set to YES, the inheritance and collaboration graphs will show the > # relations between templates and their instances. > > TEMPLATE_RELATIONS = NO > > -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT > -# tags are set to YES then doxygen will generate a graph for each documented > -# file showing the direct and indirect include dependencies of the file with > +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT > +# tags are set to YES then doxygen will generate a graph for each documented > +# file showing the direct and indirect include dependencies of the file with > # other documented files. > > INCLUDE_GRAPH = YES > > -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and > -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each > -# documented header file showing the documented files that directly or > +# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and > +# HAVE_DOT tags are set to YES then doxygen will generate a graph for each > +# documented header file showing the documented files that directly or > # indirectly include this file. > > INCLUDED_BY_GRAPH = YES > > -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will > -# generate a call dependency graph for every global function or class method. > -# Note that enabling this option will significantly increase the time of a run. > -# So in most cases it will be better to enable call graphs for selected > +# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will > +# generate a call dependency graph for every global function or class method. > +# Note that enabling this option will significantly increase the time of a run. > +# So in most cases it will be better to enable call graphs for selected > # functions only using the \callgraph command. > > CALL_GRAPH = NO > > -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will > -# generate a caller dependency graph for every global function or class method. > -# Note that enabling this option will significantly increase the time of a run. > -# So in most cases it will be better to enable caller graphs for selected > +# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then doxygen will > +# generate a caller dependency graph for every global function or class method. > +# Note that enabling this option will significantly increase the time of a run. > +# So in most cases it will be better to enable caller graphs for selected > # functions only using the \callergraph command. > > CALLER_GRAPH = NO > > -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen > +# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen > # will graphical hierarchy of all classes instead of a textual one. > > GRAPHICAL_HIERARCHY = YES > > -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES > -# then doxygen will show the dependencies a directory has on other directories > +# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES > +# then doxygen will show the dependencies a directory has on other directories > # in a graphical way. The dependency relations are determined by the #include > # relations between the files in the directories. > > DIRECTORY_GRAPH = YES > > -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images > +# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images > # generated by dot. Possible values are png, jpg, or gif > # If left blank png will be used. > > DOT_IMAGE_FORMAT = png > > -# The tag DOT_PATH can be used to specify the path where the dot tool can be > +# The tag DOT_PATH can be used to specify the path where the dot tool can be > # found. If left blank, it is assumed the dot tool can be found in the path. > > -DOT_PATH = > +DOT_PATH = > > -# The DOTFILE_DIRS tag can be used to specify one or more directories that > -# contain dot files that are included in the documentation (see the > +# The DOTFILE_DIRS tag can be used to specify one or more directories that > +# contain dot files that are included in the documentation (see the > # \dotfile command). > > -DOTFILE_DIRS = > +DOTFILE_DIRS = > > -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width > -# (in pixels) of the graphs generated by dot. If a graph becomes larger than > -# this value, doxygen will try to truncate the graph, so that it fits within > -# the specified constraint. Beware that most browsers cannot cope with very > +# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width > +# (in pixels) of the graphs generated by dot. If a graph becomes larger than > +# this value, doxygen will try to truncate the graph, so that it fits within > +# the specified constraint. Beware that most browsers cannot cope with very > # large images. > > MAX_DOT_GRAPH_WIDTH = 1024 > > -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height > -# (in pixels) of the graphs generated by dot. If a graph becomes larger than > -# this value, doxygen will try to truncate the graph, so that it fits within > -# the specified constraint. Beware that most browsers cannot cope with very > +# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height > +# (in pixels) of the graphs generated by dot. If a graph becomes larger than > +# this value, doxygen will try to truncate the graph, so that it fits within > +# the specified constraint. Beware that most browsers cannot cope with very > # large images. > > MAX_DOT_GRAPH_HEIGHT = 1024 > > -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the > -# graphs generated by dot. A depth value of 3 means that only nodes reachable > -# from the root by following a path via at most 3 edges will be shown. Nodes > -# that lay further from the root node will be omitted. Note that setting this > -# option to 1 or 2 may greatly reduce the computation time needed for large > -# code bases. Also note that a graph may be further truncated if the graph's > -# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH > -# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), > +# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the > +# graphs generated by dot. A depth value of 3 means that only nodes reachable > +# from the root by following a path via at most 3 edges will be shown. Nodes > +# that lay further from the root node will be omitted. Note that setting this > +# option to 1 or 2 may greatly reduce the computation time needed for large > +# code bases. Also note that a graph may be further truncated if the graph's > +# image dimensions are not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH > +# and MAX_DOT_GRAPH_HEIGHT). If 0 is used for the depth value (the default), > # the graph is not depth-constrained. > > MAX_DOT_GRAPH_DEPTH = 0 > > -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent > -# background. This is disabled by default, which results in a white background. > -# Warning: Depending on the platform used, enabling this option may lead to > -# badly anti-aliased labels on the edges of a graph (i.e. they become hard to > +# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent > +# background. This is disabled by default, which results in a white background. > +# Warning: Depending on the platform used, enabling this option may lead to > +# badly anti-aliased labels on the edges of a graph (i.e. they become hard to > # read). > > DOT_TRANSPARENT = NO > > -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output > -# files in one run (i.e. multiple -o and -T options on the command line). This > -# makes dot run faster, but since only newer versions of dot (>1.8.10) > +# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output > +# files in one run (i.e. multiple -o and -T options on the command line). This > +# makes dot run faster, but since only newer versions of dot (>1.8.10) > # support this, this feature is disabled by default. > > DOT_MULTI_TARGETS = NO > > -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will > -# generate a legend page explaining the meaning of the various boxes and > +# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will > +# generate a legend page explaining the meaning of the various boxes and > # arrows in the dot generated graphs. > > GENERATE_LEGEND = YES > > -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will > -# remove the intermediate dot files that are used to generate > +# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will > +# remove the intermediate dot files that are used to generate > # the various graphs. > > DOT_CLEANUP = YES > > #--------------------------------------------------------------------------- > -# Configuration::additions related to the search engine > +# Configuration::additions related to the search engine > #--------------------------------------------------------------------------- > > -# The SEARCHENGINE tag specifies whether or not a search engine should be > +# The SEARCHENGINE tag specifies whether or not a search engine should be > # used. If set to NO the values of all tags below this one will be ignored. > > SEARCHENGINE = NO > diff --git a/doc/mainpage b/doc/mainpage > --- a/doc/mainpage > +++ b/doc/mainpage > @@ -2,5 +2,5 @@ > \mainpage Documentation for libcmpiutil > > Browse the interface headers in the "Files" tab above > - > + > */ > diff --git a/eo_parser.c b/eo_parser.c > --- a/eo_parser.c > +++ b/eo_parser.c > @@ -115,16 +115,16 @@ > CMPIStatus s; > uint64_t unsigned_val = 0; > int64_t signed_val = 0; > - > + > switch(type) { > case CMPI_uint64: > case CMPI_uint32: > case CMPI_uint16: > case CMPI_uint8: > unsigned_val = (uint64_t) value; > - s = CMSetProperty(inst, > - prop, > - (CMPIValue *)&(unsigned_val), > + s = CMSetProperty(inst, > + prop, > + (CMPIValue *)&(unsigned_val), > type); > break; > case CMPI_sint64: > @@ -133,9 +133,9 @@ > case CMPI_sint8: > default: > signed_val = (int64_t) value; > - s = CMSetProperty(inst, > - prop, > - (CMPIValue *)&(signed_val), > + s = CMSetProperty(inst, > + prop, > + (CMPIValue *)&(signed_val), > type); > } > > @@ -151,17 +151,17 @@ > { > if (_set_int_prop(value, prop, CMPI_uint64, inst) == 1) > return CMPI_uint64; > - else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) > + else if (_set_int_prop(value, prop, CMPI_uint32, inst) == 1) > return CMPI_uint32; > - else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) > + else if (_set_int_prop(value, prop, CMPI_uint16, inst) == 1) > return CMPI_uint16; > else if (_set_int_prop(value, prop, CMPI_uint8, inst) == 1) > return CMPI_uint8; > else if (_set_int_prop(value, prop, CMPI_sint64, inst) == 1) > return CMPI_sint64; > - else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) > + else if (_set_int_prop(value, prop, CMPI_sint32, inst) == 1) > return CMPI_sint32; > - else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) > + else if (_set_int_prop(value, prop, CMPI_sint16, inst) == 1) > return CMPI_sint16; > else > _set_int_prop(value, prop, CMPI_sint8, inst); > @@ -176,7 +176,7 @@ > { > CMPIString *cm_str; > CMPIStatus s = {CMPI_RC_OK, NULL}; > - > + > cm_str = CMNewString(broker, str,&s); > if (s.rc != CMPI_RC_OK || CMIsNullObject(cm_str)) { > CU_DEBUG("Error creating CMPIString"); > diff --git a/eo_util_lexer.l b/eo_util_lexer.l > --- a/eo_util_lexer.l > +++ b/eo_util_lexer.l > @@ -35,11 +35,11 @@ > QUOTEDTEXT (\"[^"\n]*["\n]) > SINGLEQUOTEDTEXT (\'[^'\n]*['\n]) > FILENAME ([A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*) > -PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) > -HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) > +PATHNAME (\/?[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*(\/[A-Za-z0-9\.][A-Za-z0-9\.\-\+\_]*)*\/?) > +HOSTNAME ([A-Za-z][A-Za-z0-9\-\_]*(\.[A-Za-z][A-Za-z0-9\-\_]*)*) > IPADDR ([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+) > > - /* Special mode to read CLASSNAME after reading INSTANCE OF, > + /* Special mode to read CLASSNAME after reading INSTANCE OF, > * otherwise cannot distinguish this token from a PROPERTYNAME */ > %x READCLASSNAME > > @@ -143,7 +143,7 @@ > > void eo_parse_error(char *errmsg) > { > - fprintf(stderr, "error line %d: %s in '%s'\n", > + fprintf(stderr, "error line %d: %s in '%s'\n", > eolineno, errmsg, eo_parse_text); > } > > diff --git a/eo_util_parser.y b/eo_util_parser.y > --- a/eo_util_parser.y > +++ b/eo_util_parser.y > @@ -117,10 +117,10 @@ > > | PROPERTYNAME '=' INTEGER ';' > { > - EOTRACE("propertyname = %s\n", $1); > + EOTRACE("propertyname = %s\n", $1); > CMPIType t = set_int_prop($3, $1, *_INSTANCE); > EOTRACE("\ttype = %d\n" > - "\tvalue = %lld\n", t, $3); > + "\tvalue = %lld\n", t, $3); > free($1); > } > > @@ -133,7 +133,7 @@ > CMSetProperty(*_INSTANCE, $1,&($3), CMPI_boolean); > free($1); > } > - | PROPERTYNAME '=' OPENBRACKET > + | PROPERTYNAME '=' OPENBRACKET > { > EOTRACE("propertyname = %s\n" > "\ttype = CMPI_charsA\n", > @@ -142,8 +142,8 @@ > stringarraysize = 0; > stringarraypropname = $1; > } > - arrayofstrings CLOSEBRACKET ';' > - > + arrayofstrings CLOSEBRACKET ';' > + > | PROPERTYNAME '=' CIMNULL ';' > { > EOTRACE("propertyname = %s\n" > @@ -152,38 +152,38 @@ > } > ; > > -arrayofstrings: STRING > +arrayofstrings: STRING > { > - EOTRACE("\t%s[%u]=%s\n", > - propertyname, > - stringarraysize, > + EOTRACE("\t%s[%u]=%s\n", > + propertyname, > + stringarraysize, > $1); > > stringarraysize++; > - stringarray = (char **)realloc(stringarray, > - sizeof(char *) * > + stringarray = (char **)realloc(stringarray, > + sizeof(char *) * > stringarraysize); > stringarray[stringarraysize-1] = $1; > } > COMMA arrayofstrings > > - > + > | STRING > { > CMPIArray *arr; > CMPICount i; > CMPIStatus s = {CMPI_RC_OK, NULL}; > - > - EOTRACE("\t%s[%u]=%s\n", > - propertyname, > - stringarraysize, > + > + EOTRACE("\t%s[%u]=%s\n", > + propertyname, > + stringarraysize, > $1); > - > + > stringarraysize++; > > - arr = CMNewArray(_BROKER, > - stringarraysize, > - CMPI_string, > + arr = CMNewArray(_BROKER, > + stringarraysize, > + CMPI_string, > &s); > if (s.rc != CMPI_RC_OK || CMIsNullObject(arr)) { > EOTRACE("Error creating array\n"); > @@ -200,19 +200,19 @@ > if (s.rc != CMPI_RC_OK) > goto str_arr_out; > } > - > - s = ins_chars_into_cmstr_arr(_BROKER, > - arr, > + > + s = ins_chars_into_cmstr_arr(_BROKER, > + arr, > stringarraysize - 1, > $1); > if (s.rc != CMPI_RC_OK) > goto str_arr_out; > > - CMSetProperty(*_INSTANCE, > + CMSetProperty(*_INSTANCE, > stringarraypropname, > &arr, > CMPI_stringA); > - > + > str_arr_out: > free(stringarraypropname); > for (i = 0; i< stringarraysize - 1; i++) > @@ -220,9 +220,9 @@ > free($1); > > if (s.rc != CMPI_RC_OK) { > - return RC_ARR_CREAT_FAILED; > + return RC_ARR_CREAT_FAILED; > } > - > + > } > ; > > diff --git a/instance_util.c b/instance_util.c > --- a/instance_util.c > +++ b/instance_util.c > @@ -92,15 +92,15 @@ > { > const char *ref_cn; > const char *op_cn; > - > + > ref_cn = CLASSNAME(ref); > if (ref_cn == NULL) > return false; > - > + > op_cn = CLASSNAME(op); > if (op_cn == NULL) > return false; > - > + > return STREQC(op_cn, ref_cn); > } > > @@ -108,7 +108,7 @@ > const CMPIInstance *inst) > { > CMPIStatus s = {CMPI_RC_OK, NULL}; > - CMPIObjectPath *op; > + CMPIObjectPath *op; > const char *prop = NULL; > int i; > int count; > @@ -119,14 +119,14 @@ > > if (!_compare_classname(ref, op)) > return "CreationClassName"; > - > + > count = CMGetKeyCount(op,&s); > if (s.rc != CMPI_RC_OK) { > CU_DEBUG("Unable to get key count"); > return NULL; > } > CU_DEBUG("Number of keys: %i", count); > - > + > for (i = 0; i< count; i++) { > CMPIData kd, pd; > CMPIString *str; > @@ -163,14 +163,14 @@ > { > CMPIStatus s = {CMPI_RC_OK, NULL}; > const char *prop; > - > + > prop = cu_compare_ref(ref, inst); > if (prop != NULL) { > cu_statusf(broker,&s, > CMPI_RC_ERR_NOT_FOUND, > "No such instance (%s)", prop); > } > - > + > return s; > } > > @@ -182,7 +182,7 @@ > CMPIStatus s = {CMPI_RC_OK, NULL}; > > if (src_name == NULL) { > - cu_statusf(broker,&s, > + cu_statusf(broker,&s, > CMPI_RC_ERR_FAILED, > "No property name given"); > goto out; > @@ -193,7 +193,7 @@ > > data = CMGetProperty(src_inst, src_name,&s); > if (s.rc != CMPI_RC_OK || CMIsNullValue(data)) { > - cu_statusf(broker,&s, > + cu_statusf(broker,&s, > CMPI_RC_ERR_FAILED, > "Copy failed. Could not get prop '%s'.", src_name); > goto out; > @@ -202,7 +202,7 @@ > CMSetProperty(dest_inst, dest_name,&(data.value), data.type); > > out: > - return s; > + return s; > } > > CMPIInstance *cu_dup_instance(const CMPIBroker *broker, > @@ -222,7 +222,7 @@ > "Could not get objectpath from instance"); > goto out; > } > - > + > dest = CMNewInstance(broker, ref, s); > > prop_count = CMGetPropertyCount(src, s); > @@ -242,8 +242,8 @@ > if (s->rc != CMPI_RC_OK) { > goto out; > } > - > - *s = CMSetProperty(dest, prop_name, > + > + *s = CMSetProperty(dest, prop_name, > &(data.value), data.type); > if (s->rc != CMPI_RC_OK) { > goto out; > @@ -302,7 +302,7 @@ > ref = CMGetObjectPath(inst, NULL); > if (CMIsNullObject(ref)) > goto out; > - > + > ret = CLASSNAME(ref); > > out: > diff --git a/libcmpiutil.h b/libcmpiutil.h > --- a/libcmpiutil.h > +++ b/libcmpiutil.h > @@ -44,7 +44,7 @@ > #define CU_STRINGIFY(x) _CU_STRINGIFY(x) > > /** > - * Dispatch macro for debug_print, fills in the function name and line number > + * Dispatch macro for debug_print, fills in the function name and line number > * of caller. > */ > #define CU_DEBUG(fmt, args...) { \ > @@ -60,7 +60,7 @@ > void debug_print(char *fmt, ...); > > /** > - * Copies a property from one CMPIInstance to another. If dest_name is NULL, > + * Copies a property from one CMPIInstance to another. If dest_name is NULL, > * it is assumed to be the same as src_name. > * > * @param broker CIM broker, needed for status calls > @@ -69,7 +69,7 @@ > * @param src_name Name of property to be copied from src_inst > * @param dest_name Name of property to be copied to dest_inst > */ > -CMPIStatus cu_copy_prop(const CMPIBroker *broker, > +CMPIStatus cu_copy_prop(const CMPIBroker *broker, > CMPIInstance *src_inst, CMPIInstance *dest_inst, > char *src_name, char *dest_name); > > @@ -167,7 +167,7 @@ > * > * @param src Source instance > * @param dest Destination instance > - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and > + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and > * error message otherwise > */ > CMPIStatus cu_merge_instances(CMPIInstance *src, > @@ -178,7 +178,7 @@ > * > * @param src Source instance > * @param dest Destination instance > - * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and > + * @returns {CMPI_RC_OK, NULL} if success, CMPI_RC ERR_FAILED and > * error message otherwise > */ > CMPIInstance *cu_dup_instance(const CMPIBroker *broker, > @@ -226,8 +226,8 @@ > * @param prop The property name > * @param target A pointer to a CMPIarray that will be set > * if successful > - * @returns > - * - CMPI_RC_OK on success, > + * @returns > + * - CMPI_RC_OK on success, > * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, > * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not an array, > * - CMPI_RC_ERROR otherwise > @@ -243,8 +243,8 @@ > * @param prop The property name > * @param target A pointer to a char* that will be set to a malloc'd string > * if successful > - * @returns > - * - CMPI_RC_OK on success, > + * @returns > + * - CMPI_RC_OK on success, > * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, > * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a string, > * - CMPI_RC_ERROR otherwise > @@ -259,8 +259,8 @@ > * @param inst The instance > * @param prop The property name > * @param target A pointer to a bool that will reflect the property status > - * @returns > - * - CMPI_RC_OK on success, > + * @returns > + * - CMPI_RC_OK on success, > * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, > * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a boolean, > * - CMPI_RC_ERROR otherwise > @@ -291,8 +291,8 @@ > * @param inst The instance > * @param prop The property name > * @param target A pointer to a uint32_t that will reflect the property value > - * @returns > - * - CMPI_RC_OK on success, > + * @returns > + * - CMPI_RC_OK on success, > * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, > * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint32, > * - CMPI_RC_ERROR otherwise > @@ -307,8 +307,8 @@ > * @param inst The instance > * @param prop The property name > * @param target A pointer to a uint64_t that will reflect the property value > - * @returns > - * - CMPI_RC_OK on success, > + * @returns > + * - CMPI_RC_OK on success, > * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present, > * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a uint64, > * - CMPI_RC_ERROR otherwise > @@ -425,7 +425,7 @@ > > /** > * Validate a client given reference against the system instance. > - * This is done by comparing the key values of the reference > + * This is done by comparing the key values of the reference > * against the key properties found in the system instance. > * > * @param broker A pointer to the current broker > @@ -440,7 +440,7 @@ > const CMPIInstance *inst); > > /** > - * Returns the classname from an instance without forcing user to get > + * Returns the classname from an instance without forcing user to get > * ObjectPath first. > * > * @param inst Instance to examine > diff --git a/libcmpiutil.spec.in b/libcmpiutil.spec.in > --- a/libcmpiutil.spec.in > +++ b/libcmpiutil.spec.in > @@ -20,7 +20,7 @@ > The goal is to reduce the amount of repetitive work done in > most CMPI providers by encapsulating common procedures with more > "normal" APIs. This extends from operations like getting typed > -instance properties to standardizing method dispatch and argument checking. > +instance properties to standardizing method dispatch and argument checking. > > %package devel > Summary: Libraries, includes, etc. to use the CMPI utility library > @@ -34,7 +34,7 @@ > The goal is to reduce the amount of repetitive work done in > most CMPI providers by encapsulating common procedures with more > "normal" APIs. This extends from operations like getting typed > -instance properties to standardizing method dispatch and argument checking. > +instance properties to standardizing method dispatch and argument checking. > > %prep > %setup -q > @@ -58,7 +58,7 @@ > > %postun -p /sbin/ldconfig > > -%files > +%files > %defattr(-, root, root, -) > > %doc doc/doxygen.conf doc/mainpage README COPYING > diff --git a/std_association.c b/std_association.c > --- a/std_association.c > +++ b/std_association.c > @@ -68,7 +68,7 @@ > > if (comp_class_list == NULL) > return true; > - > + > for (i = 0; comp_class_list[i]; i++) { > comp_class = comp_class_list[i]; > rop = CMNewObjectPath(broker, ns, comp_class, NULL); > @@ -89,10 +89,10 @@ > > for (i = 0; ptr->source_class[i]; i++) { > source_class = ptr->source_class[i]; > - > - if (CMClassPathIsA(broker, > - ref, > - source_class, > + > + if (CMClassPathIsA(broker, > + ref, > + source_class, > NULL)) > return true; > } > @@ -151,9 +151,9 @@ > > if (!match_source_class(ctx->brkr, ref, ptr)) { > CU_DEBUG("Source class doesn't match"); > - continue; > + continue; > } > - > + > if (!ptr) { > CU_DEBUG("Invalid pointer"); > continue; > @@ -162,50 +162,50 @@ > if (info->assoc_class) { > CU_DEBUG("Check client's assocClass: '%s'", > info->assoc_class); > - > - rc = match_class(ctx->brkr, > - NAMESPACE(ref), > + > + rc = match_class(ctx->brkr, > + NAMESPACE(ref), > info->assoc_class, > ptr->assoc_class); > - > + > if (!rc) { > CU_DEBUG("AssocClass not valid."); > continue; > } > CU_DEBUG("AssocClass valid."); > } > - > + > if (info->result_class) { > CU_DEBUG("Check client's resultClass: '%s'", > info->result_class); > - > - rc = match_class(ctx->brkr, > - NAMESPACE(ref), > - info->result_class, > + > + rc = match_class(ctx->brkr, > + NAMESPACE(ref), > + info->result_class, > ptr->target_class); > - > + > if (!rc) { > CU_DEBUG("ResultClass not valid."); > continue; > } > CU_DEBUG("ResultClass valid."); > } > - > + > if (info->role) { > CU_DEBUG("Check client's role: '%s'", > info->role); > - > + > if (!STREQC(info->role, ptr->source_prop)) { > CU_DEBUG("Invalid role"); > continue; > } > CU_DEBUG("Role valid."); > } > - > + > if (info->result_role) { > CU_DEBUG("Check client's resultRole: '%s'", > info->result_role); > - > + > if (!STREQC(info->result_role, ptr->target_prop)) { > CU_DEBUG("ResultRole not valid."); > continue; > @@ -216,9 +216,9 @@ > goto out; > } > > - CU_DEBUG("No valid handler found"); > + CU_DEBUG("No valid handler found"); > ptr = NULL; > - > + > out: > return ptr; > } > @@ -240,11 +240,11 @@ > > for (i = 0; i< tmp_list.cur; i++) { > CMPIInstance *refinst; > - > + > refinst = handler->make_ref(ref, tmp_list.list[i], info, handler); > if (refinst == NULL) > continue; > - > + > inst_list_add(list, refinst); > } > > @@ -271,7 +271,7 @@ > CU_DEBUG("filter_results did not return CMPI_RC_OK."); > return s; > } > - > + > return s; > } > > @@ -377,7 +377,7 @@ > info, > ref, > &list); > - > + > if (s.rc != CMPI_RC_OK) { > CU_DEBUG("Prepare return list did not return CMPI_RC_OK."); > goto out; > diff --git a/std_association.h b/std_association.h > --- a/std_association.h > +++ b/std_association.h > @@ -41,18 +41,18 @@ > * std_assoc is the definition that the developer puts in their source file. It > * defines an association relationship between a set of source and target > * classes, through a named (set of) association classes and the function > - * handler which does the work. > - * It must be registered using the macro STDA_AssocMIStub. > + * handler which does the work. > + * It must be registered using the macro STDA_AssocMIStub. > */ > struct std_assoc { > - /* Defines the list of possible classes that can be passed to the > + /* Defines the list of possible classes that can be passed to the > association for this case */ > char **source_class; > > - > - /* Defines the property of the association class that refers > + > + /* Defines the property of the association class that refers > to the input (source class) of this case. This must match > - that of the schema, and is used for automatic generation of > + that of the schema, and is used for automatic generation of > the reference object in the References() or ReferenceNames() > operation */ > char *source_prop; > @@ -63,20 +63,20 @@ > > /* Same as source_prop, applied for target */ > char *target_prop; > - > + > /* Defines the list of association classes which are implemented by > this handler */ > char **assoc_class; > > /* Function handler responsible for doing the association and > returning the list of target instances of the association. > - The handler function receives the reference of the source > - class of the association and must map it to a list of > + The handler function receives the reference of the source > + class of the association and must map it to a list of > CMPIInstance objects (targets of the association). */ > assoc_handler_t handler; > > /* Function handler responsible for creating an instance of the > - association class. > + association class. > The handler function receives the source object path, > and the target instance, so it can create the reference which is > returned by the function. */ > diff --git a/std_indication.c b/std_indication.c > --- a/std_indication.c > +++ b/std_indication.c > @@ -49,7 +49,7 @@ > break; > } > } > - > + > if (filter == NULL) > CU_DEBUG("get_ind_filter: failed to find %s", ind_name); > > @@ -76,7 +76,7 @@ > "No std_ind_filter for %s", ind_name); > goto out; > } > - > + > ret = filter->active; > if (!ret) > CU_DEBUG("Indication '%s' not in active filter", ind_name); > @@ -101,12 +101,12 @@ > CMPIStatus s = {CMPI_RC_OK, NULL}; > > s = CMSetObjectPath(ind, ref); > - if (s.rc != CMPI_RC_OK) > + if (s.rc != CMPI_RC_OK) > return s; > > CBDeliverIndication(broker, > - context, > - NAMESPACE(ref), > + context, > + NAMESPACE(ref), > ind); > return s; > } > @@ -209,7 +209,7 @@ > "Provider has no indication '%s'", ind_name); > goto out; > } > - > + > filter->active = state; > > out: > @@ -226,7 +226,7 @@ > CMPIStatus s = {CMPI_RC_OK, NULL}; > struct std_indication_ctx *_ctx; > const char *cn = NULL; > - > + > _ctx = (struct std_indication_ctx *)mi->hdl; > cn = CLASSNAME(op); > s = stdi_set_ind_filter_state(_ctx, cn, true); > @@ -397,7 +397,7 @@ > return s; > > CBInvokeMethod(broker, context, op, method, argsin, argsout,&s); > - > + > return s; > } > > diff --git a/std_instance.h b/std_instance.h > --- a/std_instance.h > +++ b/std_instance.h > @@ -24,11 +24,11 @@ > #define __STD_INSTANCE_H > > /** > - * Generates the function table and initialization stub for an > + * Generates the function table and initialization stub for an > * instance provider. > - * @param pfx The prefix for all mandatory association provider > + * @param pfx The prefix for all mandatory association provider > * functions. > - * @param pn The provider name under which this provider is > + * @param pn The provider name under which this provider is > * registered. > * @param broker The CMPIBroker pointer. > * @param hook Perform additional initialization functions. > diff --git a/std_invokemethod.c b/std_invokemethod.c > --- a/std_invokemethod.c > +++ b/std_invokemethod.c > @@ -70,7 +70,7 @@ > return 0; > } > > - return 1; > + return 1; > } > > static int parse_eo_array(CMPIArray *strings_in, > @@ -168,9 +168,9 @@ > return 1; > } > > -static int validate_arg_type(struct method_arg *arg, > +static int validate_arg_type(struct method_arg *arg, > const CMPIArgs *args, > - const CMPIBroker *broker, > + const CMPIBroker *broker, > const char *ns, > CMPIArgs *new_args, > CMPIStatus *s) > @@ -228,7 +228,7 @@ > return 1; > } > > -static int validate_args(struct method_handler *h, > +static int validate_args(struct method_handler *h, > const CMPIArgs **args, > const CMPIObjectPath *ref, > const CMPIBroker *broker, > @@ -243,10 +243,10 @@ > int ret; > struct method_arg *arg =&h->args[i]; > > - ret = validate_arg_type(arg, > - *args, > - broker, > - NAMESPACE(ref), > + ret = validate_arg_type(arg, > + *args, > + broker, > + NAMESPACE(ref), > new_args, > s); > if (!ret) > @@ -288,10 +288,10 @@ > goto exit; > } > > - ret = validate_args(h, > -&argsin, > + ret = validate_args(h, > +&argsin, > reference, > - ctx->broker, > + ctx->broker, > &s); > if (!ret) > goto exit; > @@ -302,7 +302,7 @@ > exit: > CMReturnDone(results); > > - return s; > + return s; > } > > CMPIStatus _std_cleanup(CMPIMethodMI *self, > diff --git a/tools/indication_tester.py b/tools/indication_tester.py > --- a/tools/indication_tester.py > +++ b/tools/indication_tester.py > @@ -14,264 +14,264 @@ > > def filter_xml(name, type, ns, sysname): > return """ > - > - > - > - > - > - > - > - > - > - > + > + > + > + > + > + > + > + > + > + > > - > -CIM_ComputerSystem > - > - > -%s > - > - > -CIM_IndicationFilter > - > - > -%sFilter > - > - > - SELECT * FROM %s > - > - > - > -WQL > - > - > -%s > - > - > - > - > - > - > + > +CIM_ComputerSystem > + > + > +%s > + > + > +CIM_IndicationFilter > + > + > +%sFilter > + > + > + SELECT * FROM %s > + > + > + > +WQL > + > + > +%s > + > + > + > + > + > + > > """ % (sysname, name, type, ns) > > def handler_xml(name, port, sysname): > return """ > - > - > - > - > - > - > - > - > - > - > - > - > -CIM_ComputerSystem > - > - > -%s > - > - > -CIM_IndicationHandlerCIMXML > - > - > -%sHandler > - > - > -http://localhost:%i > - > - > - > - > - > - > + > + > + > + > + > + > + > + > + > + > + > + > +CIM_ComputerSystem > + > + > +%s > + > + > +CIM_IndicationHandlerCIMXML > + > + > +%sHandler > + > + > +http://localhost:%i > + > + > + > + > + > + > > """ % (sysname, name, port) > > def subscription_xml(name, sysname): > return """ > - > - > - > - > - > - > - > - > - > - > - > - - REFERENCECLASS="CIM_IndicationFilter"> > - > - > - > - > - CIM_ComputerSystem > - > - > - > - > - %s > - > - > - > - > - CIM_IndicationFilter > - > - > - > - > - %sFilter > - > - > - > - > - > - - REFERENCECLASS="CIM_IndicationHandler"> > - > - > - > - > - CIM_ComputerSystem > - > - > - > - > + > + > + > + > + > + > + > + > + > + > + > + + REFERENCECLASS="CIM_IndicationFilter"> > + > + > + > + > + CIM_ComputerSystem > + > + > + > + > %s > - > - > - > - > - CIM_IndicationHandlerCIMXML > - > - > - > - > - %sHandler > - > - > - > - > - > - > - 2 > - > - > - > - > - > - > + > + > + > + > + CIM_IndicationFilter > + > + > + > + > + %sFilter > + > + > + > + > + > + + REFERENCECLASS="CIM_IndicationHandler"> > + > + > + > + > + CIM_ComputerSystem > + > + > + > + > + %s > + > + > + > + > + CIM_IndicationHandlerCIMXML > + > + > + > + > + %sHandler > + > + > + > + > + > + > + 2 > + > + > + > + > + > + > > """ % (sysname, name, sysname, name) > > def delete_inst_xml(name, type, sysname, inst_name): > return """ > - > - > - > - > - > - > - > - > - > - > - > - > -CIM_ComputerSystem > - > - > -%s > - > - > -CIM_Indication%s > - > - > -%s > - > - > - > - > - > - > + > + > + > + > + > + > + > + > + > + > + > + > +CIM_ComputerSystem > + > + > +%s > + > + > +CIM_Indication%s > + > + > +%s > + > + > + > + > + > + > ; > """ % (type, sysname, type, inst_name); > > def delete_sub_xml(name, sysname): > return """ > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - > - CIM_ComputerSystem > - > - > - > - > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + > + CIM_ComputerSystem > + > + > + > + > %s > - > - > - > - > - CIM_IndicationFilter > - > - > - > - > - %sFilter > - > - > - > - > - > - > - > - > - > - > - CIM_ComputerSystem > - > - > - > - > + > + > + > + > + CIM_IndicationFilter > + > + > + > + > + %sFilter > + > + > + > + > + > + > + > + > + > + > + CIM_ComputerSystem > + > + > + > + > %s > - > - > - > - > - CIM_IndicationHandlerCIMXML > - > - > - > - > - %sHandler > - > - > - > - > - > - > - > - > - > - > + > + > + > + > + CIM_IndicationHandlerCIMXML > + > + > + > + > + %sHandler > + > + > + > + > + > + > + > + > + > + > ; > """ % (sysname, name, sysname, name) > > @@ -304,8 +304,8 @@ > self.ns = ns > self.sysname = sysname > > - self.port = 8000 + port > - self.server = BaseHTTPServer.HTTPServer(('', self.port), > + self.port = 8000 + port > + self.server = BaseHTTPServer.HTTPServer(('', self.port), > CIMSocketHandler) > self.server.print_ind = print_ind > self.server.indications = [] > @@ -319,14 +319,14 @@ > "CIMMethod" : method, > "CIMObject" : "root/PG_Interop", > "Content-Type" : 'application/xml; charset="utf-8"'} > - > + > if auth_hdr: > headers["Authorization"] = "Basic %s" % auth_hdr > > conn.request("POST", "/cimom", body, headers) > resp = conn.getresponse() > if not resp.getheader("content-length"): > - raise Exception("Request Failed: %d %s" % > + raise Exception("Request Failed: %d %s" % > (resp.status, resp.reason)) > > resp.read() > @@ -380,11 +380,11 @@ > print "DeleteHandler:\n%s\n" % del_handler_str > print "CreateSubscription:\n%s\n" % subscript_str > print "DeleteSubscription:\n%s\n" % del_subscript_str > - > + > def main(): > usage = "usage: %prog [options] provider\nex: %prog CIM_InstModification" > parser = OptionParser(usage) > - > + > parser.add_option("-u", "--url", dest="url", default="localhost:5988", > help="URL of CIMOM to connect to (host:port)") > parser.add_option("-N", "--ns", dest="ns", default="root/virt", > @@ -410,17 +410,17 @@ > if len(args) == 0: > print "Fatal: no indication type provided." > sys.exit(1) > - > + > if options.username: > auth = (options.username, options.password) > else: > auth = None > - > + > if ":" in options.url: > (sysname, port) = options.url.split(":") > else: > sysname = options.url > - > + > if options.dump: > dump_xml(options.name, args[0], options.ns, sysname) > sys.exit(0) > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:25:09 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:25:09 -0400 Subject: [Libvirt-cim] [PATCH 6 of 7] libcmpiutil: Fix file permissions In-Reply-To: References: Message-ID: <4DD679C5.1010807@linux.vnet.ibm.com> +1 & pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305568012 10800 > # Node ID bd7bf41ffea870361297f8327212f3a81aca1084 > # Parent 1177a2ffc8c7333a8e80c7ce743f0f10ef7da99c > libcmpiutil: Fix file permissions > > Removing exec flag from source code files. > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/Makefile.am b/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/acinclude.m4 b/acinclude.m4 > old mode 100755 > new mode 100644 > diff --git a/args_util.c b/args_util.c > old mode 100755 > new mode 100644 > diff --git a/configure.ac b/configure.ac > old mode 100755 > new mode 100644 > diff --git a/eo_parser.c b/eo_parser.c > old mode 100755 > new mode 100644 > diff --git a/eo_parser_xml.c b/eo_parser_xml.c > old mode 100755 > new mode 100644 > diff --git a/eo_util_lexer.l b/eo_util_lexer.l > old mode 100755 > new mode 100644 > diff --git a/eo_util_parser.y b/eo_util_parser.y > old mode 100755 > new mode 100644 > diff --git a/instance_util.c b/instance_util.c > old mode 100755 > new mode 100644 > diff --git a/libcmpiutil.h b/libcmpiutil.h > old mode 100755 > new mode 100644 > diff --git a/libcmpiutil.spec.in b/libcmpiutil.spec.in > old mode 100755 > new mode 100644 > diff --git a/std_association.c b/std_association.c > old mode 100755 > new mode 100644 > diff --git a/std_association.h b/std_association.h > old mode 100755 > new mode 100644 > diff --git a/std_indication.c b/std_indication.c > old mode 100755 > new mode 100644 > diff --git a/std_instance.h b/std_instance.h > old mode 100755 > new mode 100644 > diff --git a/std_invokemethod.c b/std_invokemethod.c > old mode 100755 > new mode 100644 > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:26:53 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:26:53 -0400 Subject: [Libvirt-cim] [PATCH 7 of 7] libcmpituil: Proper definition of LEX_OUTPUT_ROOT In-Reply-To: <308920f42e59be2aa8a4.1305568074@etrunko-t410.br.ibm.com> References: <308920f42e59be2aa8a4.1305568074@etrunko-t410.br.ibm.com> Message-ID: <4DD67A2D.3030606@linux.vnet.ibm.com> +1 & pushed. On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305559378 10800 > # Node ID 308920f42e59be2aa8a4055a277fed5c373a319e > # Parent bd7bf41ffea870361297f8327212f3a81aca1084 > libcmpituil: Proper definition of LEX_OUTPUT_ROOT > > Move definition from Makefile.am to configure.ac to shut up automake > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -31,7 +31,6 @@ > AM_YFLAGS = -d -p eo_parse_ > > if build_eoparser > -LEX_OUTPUT_ROOT = lex.eo_parse_ > libcueoparser_la_SOURCES = eo_util_parser.y eo_util_lexer.l eo_parser.c > libcmpiutil_la_DEPENDENCIES += libcueoparser.la > libcmpiutil_la_LIBADD += -lcueoparser > diff --git a/configure.ac b/configure.ac > --- a/configure.ac > +++ b/configure.ac > @@ -37,6 +37,7 @@ > AC_PROG_CC > > AC_PROG_LEX > +AC_SUBST([LEX_OUTPUT_ROOT], [lex.eo_parse_]) > AC_PROG_YACC > > AC_C_CONST > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:27:36 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:27:36 -0400 Subject: [Libvirt-cim] [PATCH 0 of 7] (#3) libcmpiutil: "Cosmetics" In-Reply-To: References: Message-ID: <4DD67A58.10604@linux.vnet.ibm.com> Thanks for the patches, Eduardo. They are now upstream. changeset: 114:308920f42e59 tag: tip user: Eduardo Lima (Etrunko) date: Mon May 16 12:22:58 2011 -0300 summary: libcmpituil: Proper definition of LEX_OUTPUT_ROOT changeset: 113:bd7bf41ffea8 user: Eduardo Lima (Etrunko) date: Mon May 16 14:46:52 2011 -0300 summary: libcmpiutil: Fix file permissions changeset: 112:1177a2ffc8c7 user: Eduardo Lima (Etrunko) date: Fri May 13 11:35:52 2011 -0300 summary: libcmpiutil: Remove trailing whitespaces changeset: 111:c24bb1e158f5 user: Eduardo Lima (Etrunko) date: Fri May 13 11:26:46 2011 -0300 summary: libcmpiutil: Update .hgignore changeset: 110:71c08398356c user: Eduardo Lima (Etrunko) date: Fri May 13 11:26:17 2011 -0300 summary: libcmpituil: Configure tweaks changeset: 109:af2ffd311f1b user: Eduardo Lima (Etrunko) date: Fri May 13 11:21:55 2011 -0300 summary: libcmpiutil: Cleanup includes changeset: 108:f92b5e72f469 user: Eduardo Lima (Etrunko) date: Fri May 13 11:13:41 2011 -0300 summary: libcmpiutil: Remove warnings On 05/16/2011 01:47 PM, Eduardo Lima (Etrunko) wrote: > Third version of the series, this time with two new patches: > > 6/7: Removes exec permission from source code files. > 7/7: Shuts up automake by defining LEX_OUTPUT_ROOT in configure.ac instead of > Makefile.am. > > Best regards, > > -- > Eduardo de Barros Lima > Software Engineer, Open Virtualization > Linux Technology Center - IBM/Brazil > eblima at br.ibm.com > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 20 14:34:06 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 20 May 2011 10:34:06 -0400 Subject: [Libvirt-cim] [PATCH] (#3) Configure: Check for libuuid In-Reply-To: <845daca07eed6b26555f.1305299618@etrunko-t410.br.ibm.com> References: <845daca07eed6b26555f.1305299618@etrunko-t410.br.ibm.com> Message-ID: <4DD67BDE.4080004@linux.vnet.ibm.com> Patch looks good and works as expected on RHEL 6. +1. On 05/13/2011 11:13 AM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1304971973 10800 > # Node ID 845daca07eed6b26555f71a7c761ec945fdc644a > # Parent 8b428df21c360d1eaedba7157b0dfd429d2db121 > Configure: Check for libuuid > > This patch introduces a macro in acinclude.m4 to check for libuuid > development files and fixes the build accordingly. > > Changes from v1: > Added specific check for libuuid version< 1.41.2 > > Changes from v2: > Respect 80 characters limit > > Signed-off-by: Eduardo Lima (Etrunko) > > diff -r 8b428df21c36 -r 845daca07eed acinclude.m4 > --- a/acinclude.m4 Wed Apr 13 12:27:33 2011 -0700 > +++ b/acinclude.m4 Mon May 09 17:12:53 2011 -0300 > @@ -238,10 +238,32 @@ > AC_DEFUN([CHECK_LIBVIRT], > [ > PKG_CHECK_MODULES([LIBVIRT], [libvirt>= 0.3.2]) > + AC_SUBST([LIBVIRT_CFLAGS]) > + AC_SUBST([LIBVIRT_LIBS]) > CPPFLAGS="$CPPFLAGS $LIBVIRT_CFLAGS" > LDFLAGS="$LDFLAGS $LIBVIRT_LIBS" > ]) > > +AC_DEFUN([CHECK_LIBUUID], > + [ > + PKG_CHECK_MODULES([LIBUUID], [uuid>= 1.41.2], > + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + PKG_CHECK_MODULES([LIBUUID], [uuid], > + [LIBUUID_FOUND=yes], [LIBUUID_FOUND=no]) > + if test "$LIBUUID_FOUND" = "no" ; then > + AC_MSG_ERROR([libuuid development files required]) > + else > + LIBUUID_INCLUDEDIR=$(pkg-config --variable=includedir uuid) > + LIBUUID_CFLAGS+=" -I$LIBUUID_INCLUDEDIR/uuid " > + fi > + fi > + AC_SUBST([LIBUUID_CFLAGS]) > + AC_SUBST([LIBUUID_LIBS]) > + CPPFLAGS="$CPPFLAGS $LIBUUID_CFLAGS" > + LDFLAGS="$LDFLAGS $LIBUUID_LIBS" > + ]) > + > # A convenience macro that spits out a fail message for a particular test > # > # AC_CHECK_FAIL($LIBNAME,$PACKAGE_SUGGEST,$URL,$EXTRA) > diff -r 8b428df21c36 -r 845daca07eed configure.ac > --- a/configure.ac Wed Apr 13 12:27:33 2011 -0700 > +++ b/configure.ac Mon May 09 17:12:53 2011 -0300 > @@ -148,10 +148,14 @@ > # Check for presense of a CIM server (this macro is defined in acinclude.m4) > CHECK_CIMSERVER > > +# Check pkg-config program > +PKG_PROG_PKG_CONFIG > + > # Check for presence of libraries > CHECK_LIBVIRT > CHECK_LIBXML2 > CHECK_LIBCU > +CHECK_LIBUUID > > CFLAGS_STRICT="-Werror" > > diff -r 8b428df21c36 -r 845daca07eed libxkutil/Makefile.am > --- a/libxkutil/Makefile.am Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/Makefile.am Mon May 09 17:12:53 2011 -0300 > @@ -1,7 +1,6 @@ > # Copyright IBM Corp. 2007 > SUBDIRS = tests > > - > CFLAGS += $(CFLAGS_STRICT) > > noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ > @@ -9,14 +8,14 @@ > > lib_LTLIBRARIES = libxkutil.la > > -AM_LDFLAGS = -lvirt -luuid > - > libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ > xmlgen.c infostore.c pool_parsing.c > > +libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ > + @LIBUUID_LIBS@ > + > noinst_PROGRAMS = xml_parse_test > > xml_parse_test_SOURCES = xml_parse_test.c > -xml_parse_test_LDADD = -lvirt > -xml_parse_test_LDFLAGS = libxkutil.la > -xml_parse_test_DEPENDENCIES = libxkutil.la > +xml_parse_test_LDADD = libxkutil.la \ > + @LIBVIRT_LIBS@ > diff -r 8b428df21c36 -r 845daca07eed libxkutil/xmlgen.c > --- a/libxkutil/xmlgen.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/libxkutil/xmlgen.c Mon May 09 17:12:53 2011 -0300 > @@ -22,7 +22,7 @@ > #include > #include > #include > -#include > +#include > > #include > #include > diff -r 8b428df21c36 -r 845daca07eed src/Virt_SettingsDefineCapabilities.c > --- a/src/Virt_SettingsDefineCapabilities.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_SettingsDefineCapabilities.c Mon May 09 17:12:53 2011 -0300 > @@ -26,7 +26,7 @@ > #include > #include > #include > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 845daca07eed src/Virt_VSMigrationService.c > --- a/src/Virt_VSMigrationService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VSMigrationService.c Mon May 09 17:12:53 2011 -0300 > @@ -29,7 +29,7 @@ > #include > #include > > -#include > +#include > > #include > > diff -r 8b428df21c36 -r 845daca07eed src/Virt_VirtualSystemSnapshotService.c > --- a/src/Virt_VirtualSystemSnapshotService.c Wed Apr 13 12:27:33 2011 -0700 > +++ b/src/Virt_VirtualSystemSnapshotService.c Mon May 09 17:12:53 2011 -0300 > @@ -24,7 +24,7 @@ > #include > #include > > -#include > +#include > > #include > #include > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From eblima at linux.vnet.ibm.com Fri May 20 21:05:28 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 20 May 2011 18:05:28 -0300 Subject: [Libvirt-cim] [PATCH] libcmpiutil: Add libtool version info Message-ID: <4bc55e4ed0c003e5e562.1305925528@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1305902058 10800 # Node ID 4bc55e4ed0c003e5e56205d64839b1b239921e92 # Parent 308920f42e59be2aa8a4055a277fed5c373a319e libcmpiutil: Add libtool version info With this patch, we will produce nicely versioned .so for libcmpiutil and libcueoparser, as follows: /usr/lib64/libcmpiutil.so -> libcmpiutil.so.0.5.5 /usr/lib64/libcmpiutil.so.0 -> libcmpiutil.so.0.5.5 /usr/lib64/libcmpiutil.so.0.5.5 /usr/lib64/libcueoparser.so -> libcueoparser.so.0.5.5 /usr/lib64/libcueoparser.so.0 -> libcueoparser.so.0.5.5 /usr/lib64/libcueoparser.so.0.5.5 Signed-off-by: Eduardo Lima (Etrunko) diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -25,6 +25,7 @@ debug_util.c eo_parser_xml.c libcmpiutil_la_CFLAGS = $(CFLAGS) $(CFLAGS_STRICT) libcmpiutil_la_LIBADD = -lxml2 +libcmpiutil_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@ libcmpiutil_la_DEPENDENCIES = AM_LFLAGS = -Peo_parse_ @@ -32,6 +33,7 @@ if build_eoparser libcueoparser_la_SOURCES = eo_util_parser.y eo_util_lexer.l eo_parser.c +libcueoparser_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@ libcmpiutil_la_DEPENDENCIES += libcueoparser.la libcmpiutil_la_LIBADD += -lcueoparser EOPARSER = libcueoparser.la diff --git a/configure.ac b/configure.ac --- a/configure.ac +++ b/configure.ac @@ -1,5 +1,10 @@ # Copyright IBM Corp. 2007 -AC_INIT(CMPI Utility Library, 0.5.5, cvincent at us.ibm.com, libcmpiutil) +m4_define([cmpiutil_maj], [0]) +m4_define([cmpiutil_min], [5]) +m4_define([cmpiutil_mic], [5]) +m4_define([cmpiutil_version], [cmpiutil_maj.cmpiutil_min.cmpiutil_mic]) + +AC_INIT([CMPI Utility Library], [cmpiutil_version], [cvincent at us.ibm.com], [libcmpiutil]) AC_CONFIG_SRCDIR([libcmpiutil.h]) @@ -34,6 +39,12 @@ AM_INIT_AUTOMAKE m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) +m4_define([lt_cur], m4_eval(cmpiutil_maj + cmpiutil_min)) +m4_define([lt_rev], cmpiutil_mic) +m4_define([lt_age], cmpiutil_min) +CMPIUTIL_VERSION_INFO="lt_cur:lt_rev:lt_age" +AC_SUBST(CMPIUTIL_VERSION_INFO) + AC_PROG_CC AC_PROG_LEX From cvincent at linux.vnet.ibm.com Tue May 24 14:35:01 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 24 May 2011 10:35:01 -0400 Subject: [Libvirt-cim] [PATCH] libcmpiutil: Add libtool version info In-Reply-To: <4bc55e4ed0c003e5e562.1305925528@etrunko-t410.br.ibm.com> References: <4bc55e4ed0c003e5e562.1305925528@etrunko-t410.br.ibm.com> Message-ID: <4DDBC215.20304@linux.vnet.ibm.com> +1 before: /usr/lib64/libcmpiutil.so -> libcmpiutil.so.0.0.0 /usr/lib64/libcmpiutil.so.0 -> libcmpiutil.so.0.0.0 /usr/lib64/libcmpiutil.so.0.0.0 after: /usr/lib64/libcmpiutil.so -> libcmpiutil.so.0.5.5 /usr/lib64/libcmpiutil.so.0 -> libcmpiutil.so.0.5.5 /usr/lib64/libcmpiutil.so.0.5.5 On 05/20/2011 05:05 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1305902058 10800 > # Node ID 4bc55e4ed0c003e5e56205d64839b1b239921e92 > # Parent 308920f42e59be2aa8a4055a277fed5c373a319e > libcmpiutil: Add libtool version info > > With this patch, we will produce nicely versioned .so for libcmpiutil > and libcueoparser, as follows: > > /usr/lib64/libcmpiutil.so -> libcmpiutil.so.0.5.5 > /usr/lib64/libcmpiutil.so.0 -> libcmpiutil.so.0.5.5 > /usr/lib64/libcmpiutil.so.0.5.5 > > /usr/lib64/libcueoparser.so -> libcueoparser.so.0.5.5 > /usr/lib64/libcueoparser.so.0 -> libcueoparser.so.0.5.5 > /usr/lib64/libcueoparser.so.0.5.5 > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -25,6 +25,7 @@ > debug_util.c eo_parser_xml.c > libcmpiutil_la_CFLAGS = $(CFLAGS) $(CFLAGS_STRICT) > libcmpiutil_la_LIBADD = -lxml2 > +libcmpiutil_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@ > libcmpiutil_la_DEPENDENCIES = > > AM_LFLAGS = -Peo_parse_ > @@ -32,6 +33,7 @@ > > if build_eoparser > libcueoparser_la_SOURCES = eo_util_parser.y eo_util_lexer.l eo_parser.c > +libcueoparser_la_LDFLAGS = -version-info @CMPIUTIL_VERSION_INFO@ > libcmpiutil_la_DEPENDENCIES += libcueoparser.la > libcmpiutil_la_LIBADD += -lcueoparser > EOPARSER = libcueoparser.la > diff --git a/configure.ac b/configure.ac > --- a/configure.ac > +++ b/configure.ac > @@ -1,5 +1,10 @@ > # Copyright IBM Corp. 2007 > -AC_INIT(CMPI Utility Library, 0.5.5,cvincent at us.ibm.com, libcmpiutil) > +m4_define([cmpiutil_maj], [0]) > +m4_define([cmpiutil_min], [5]) > +m4_define([cmpiutil_mic], [5]) > +m4_define([cmpiutil_version], [cmpiutil_maj.cmpiutil_min.cmpiutil_mic]) > + > +AC_INIT([CMPI Utility Library], [cmpiutil_version], [cvincent at us.ibm.com], [libcmpiutil]) > > AC_CONFIG_SRCDIR([libcmpiutil.h]) > > @@ -34,6 +39,12 @@ > AM_INIT_AUTOMAKE > m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) > > +m4_define([lt_cur], m4_eval(cmpiutil_maj + cmpiutil_min)) > +m4_define([lt_rev], cmpiutil_mic) > +m4_define([lt_age], cmpiutil_min) > +CMPIUTIL_VERSION_INFO="lt_cur:lt_rev:lt_age" > +AC_SUBST(CMPIUTIL_VERSION_INFO) > + > AC_PROG_CC > > AC_PROG_LEX > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From eblima at linux.vnet.ibm.com Tue May 24 18:38:19 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 15:38:19 -0300 Subject: [Libvirt-cim] [PATCH] Fix file permissions Message-ID: <86998e0d6368e290e34b.1306262299@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306261772 10800 # Node ID 86998e0d6368e290e34ba61985b9d19cbeb7fef3 # Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1 Fix file permissions Removing exec flag from source code files. Signed-off-by: Eduardo Lima (Etrunko) diff --git a/Makefile.am b/Makefile.am old mode 100755 new mode 100644 diff --git a/README b/README old mode 100755 new mode 100644 diff --git a/acinclude.m4 b/acinclude.m4 old mode 100755 new mode 100644 diff --git a/base_schema/Makefile.am b/base_schema/Makefile.am old mode 100755 new mode 100644 diff --git a/base_schema/install_base_schema.sh.in b/base_schema/install_base_schema.sh.in old mode 100755 new mode 100644 diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 diff --git a/doc/CodingStyle b/doc/CodingStyle old mode 100755 new mode 100644 diff --git a/doc/Makefile.am b/doc/Makefile.am old mode 100755 new mode 100644 diff --git a/doc/libvirt-cim.html b/doc/libvirt-cim.html old mode 100755 new mode 100644 diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in old mode 100755 new mode 100644 diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am old mode 100755 new mode 100644 diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c old mode 100755 new mode 100644 diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h old mode 100755 new mode 100644 diff --git a/libxkutil/infostore.c b/libxkutil/infostore.c old mode 100755 new mode 100644 diff --git a/libxkutil/misc_util.c b/libxkutil/misc_util.c old mode 100755 new mode 100644 diff --git a/libxkutil/misc_util.h b/libxkutil/misc_util.h old mode 100755 new mode 100644 diff --git a/libxkutil/xml_parse_test.c b/libxkutil/xml_parse_test.c old mode 100755 new mode 100644 diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c old mode 100755 new mode 100644 diff --git a/schema/AllocationCapabilities.registration b/schema/AllocationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystem.registration b/schema/ComputerSystem.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemIndication.registration b/schema/ComputerSystemIndication.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemMigrationIndication.mof b/schema/ComputerSystemMigrationIndication.mof old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemMigrationIndication.registration b/schema/ComputerSystemMigrationIndication.registration old mode 100755 new mode 100644 diff --git a/schema/ConcreteComponent.registration b/schema/ConcreteComponent.registration old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionService.mof b/schema/ConsoleRedirectionService.mof old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionService.registration b/schema/ConsoleRedirectionService.registration old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionServiceCapabilities.registration b/schema/ConsoleRedirectionServiceCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/DiskPool.registration b/schema/DiskPool.registration old mode 100755 new mode 100644 diff --git a/schema/ElementAllocatedFromPool.registration b/schema/ElementAllocatedFromPool.registration old mode 100755 new mode 100644 diff --git a/schema/ElementConformsToProfile.registration b/schema/ElementConformsToProfile.registration old mode 100755 new mode 100644 diff --git a/schema/ElementSettingData.mof b/schema/ElementSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/ElementSettingData.registration b/schema/ElementSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/EnabledLogicalElementCapabilities.registration b/schema/EnabledLogicalElementCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/GraphicsPool.mof b/schema/GraphicsPool.mof old mode 100755 new mode 100644 diff --git a/schema/GraphicsPool.registration b/schema/GraphicsPool.registration old mode 100755 new mode 100644 diff --git a/schema/HostSystem.registration b/schema/HostSystem.registration old mode 100755 new mode 100644 diff --git a/schema/HostedAccessPoint.mof b/schema/HostedAccessPoint.mof old mode 100755 new mode 100644 diff --git a/schema/HostedAccessPoint.registration b/schema/HostedAccessPoint.registration old mode 100755 new mode 100644 diff --git a/schema/HostedDependency.mof b/schema/HostedDependency.mof old mode 100755 new mode 100644 diff --git a/schema/HostedDependency.registration b/schema/HostedDependency.registration old mode 100755 new mode 100644 diff --git a/schema/HostedResourcePool.registration b/schema/HostedResourcePool.registration old mode 100755 new mode 100644 diff --git a/schema/HostedService.registration b/schema/HostedService.registration old mode 100755 new mode 100644 diff --git a/schema/InputPool.mof b/schema/InputPool.mof old mode 100755 new mode 100644 diff --git a/schema/InputPool.registration b/schema/InputPool.registration old mode 100755 new mode 100644 diff --git a/schema/KVMRedirectionSAP.mof b/schema/KVMRedirectionSAP.mof old mode 100755 new mode 100644 diff --git a/schema/KVMRedirectionSAP.registration b/schema/KVMRedirectionSAP.registration old mode 100755 new mode 100644 diff --git a/schema/LogicalDisk.registration b/schema/LogicalDisk.registration old mode 100755 new mode 100644 diff --git a/schema/Memory.registration b/schema/Memory.registration old mode 100755 new mode 100644 diff --git a/schema/MemoryPool.registration b/schema/MemoryPool.registration old mode 100755 new mode 100644 diff --git a/schema/NetPool.registration b/schema/NetPool.registration old mode 100755 new mode 100644 diff --git a/schema/NetworkPort.registration b/schema/NetworkPort.registration old mode 100755 new mode 100644 diff --git a/schema/Processor.registration b/schema/Processor.registration old mode 100755 new mode 100644 diff --git a/schema/ProcessorPool.registration b/schema/ProcessorPool.registration old mode 100755 new mode 100644 diff --git a/schema/ReferencedProfile.mof b/schema/ReferencedProfile.mof old mode 100755 new mode 100644 diff --git a/schema/ReferencedProfile.registration b/schema/ReferencedProfile.registration old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationFromPool.registration b/schema/ResourceAllocationFromPool.registration old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationSettingData.registration b/schema/ResourceAllocationSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/ResourcePoolConfigurationCapabilities.registration b/schema/ResourcePoolConfigurationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/ResourcePoolConfigurationService.registration b/schema/ResourcePoolConfigurationService.registration old mode 100755 new mode 100644 diff --git a/schema/ServiceAccessBySAP.mof b/schema/ServiceAccessBySAP.mof old mode 100755 new mode 100644 diff --git a/schema/ServiceAccessBySAP.registration b/schema/ServiceAccessBySAP.registration old mode 100755 new mode 100644 diff --git a/schema/SettingsDefineCapabilities.registration b/schema/SettingsDefineCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/SettingsDefineState.registration b/schema/SettingsDefineState.registration old mode 100755 new mode 100644 diff --git a/schema/SystemDevice.registration b/schema/SystemDevice.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationCapabilities.mof b/schema/VSMigrationCapabilities.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationCapabilities.registration b/schema/VSMigrationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationService.mof b/schema/VSMigrationService.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationService.registration b/schema/VSMigrationService.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationSettingData.mof b/schema/VSMigrationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationSettingData.registration b/schema/VSMigrationSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/VSSD.mof b/schema/VSSD.mof old mode 100755 new mode 100644 diff --git a/schema/VSSD.registration b/schema/VSSD.registration old mode 100755 new mode 100644 diff --git a/schema/VSSDComponent.mof b/schema/VSSDComponent.mof old mode 100755 new mode 100644 diff --git a/schema/VSSDComponent.registration b/schema/VSSDComponent.registration old mode 100755 new mode 100644 diff --git a/schema/Virt_ResourceAllocationSettingData.mof b/schema/Virt_ResourceAllocationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/Virt_VSSD.mof b/schema/Virt_VSSD.mof old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemManagementCapabilities.registration b/schema/VirtualSystemManagementCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemManagementService.registration b/schema/VirtualSystemManagementService.registration old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemSnapshotService.mof b/schema/VirtualSystemSnapshotService.mof old mode 100755 new mode 100644 diff --git a/src/Makefile.am b/src/Makefile.am old mode 100755 new mode 100644 diff --git a/src/Virt_AllocationCapabilities.c b/src/Virt_AllocationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_AllocationCapabilities.h b/src/Virt_AllocationCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystem.h b/src/Virt_ComputerSystem.h old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystemMigrationIndication.c b/src/Virt_ComputerSystemMigrationIndication.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConcreteComponent.c b/src/Virt_ConcreteComponent.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionService.c b/src/Virt_ConsoleRedirectionService.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.c b/src/Virt_ConsoleRedirectionServiceCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.h b/src/Virt_ConsoleRedirectionServiceCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_Device.c b/src/Virt_Device.c old mode 100755 new mode 100644 diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c old mode 100755 new mode 100644 diff --git a/src/Virt_DevicePool.h b/src/Virt_DevicePool.h old mode 100755 new mode 100644 diff --git a/src/Virt_ElementAllocatedFromPool.c b/src/Virt_ElementAllocatedFromPool.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementCapabilities.c b/src/Virt_ElementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementConformsToProfile.c b/src/Virt_ElementConformsToProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementSettingData.c b/src/Virt_ElementSettingData.c old mode 100755 new mode 100644 diff --git a/src/Virt_EnabledLogicalElementCapabilities.c b/src/Virt_EnabledLogicalElementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostSystem.c b/src/Virt_HostSystem.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostSystem.h b/src/Virt_HostSystem.h old mode 100755 new mode 100644 diff --git a/src/Virt_HostedAccessPoint.c b/src/Virt_HostedAccessPoint.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedDependency.c b/src/Virt_HostedDependency.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedResourcePool.c b/src/Virt_HostedResourcePool.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedService.c b/src/Virt_HostedService.c old mode 100755 new mode 100644 diff --git a/src/Virt_KVMRedirectionSAP.c b/src/Virt_KVMRedirectionSAP.c old mode 100755 new mode 100644 diff --git a/src/Virt_KVMRedirectionSAP.h b/src/Virt_KVMRedirectionSAP.h old mode 100755 new mode 100644 diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c old mode 100755 new mode 100644 diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h old mode 100755 new mode 100644 diff --git a/src/Virt_ReferencedProfile.c b/src/Virt_ReferencedProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_RegisteredProfile.c b/src/Virt_RegisteredProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourceAllocationFromPool.c b/src/Virt_ResourceAllocationFromPool.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationCapabilities.c b/src/Virt_ResourcePoolConfigurationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationService.c b/src/Virt_ResourcePoolConfigurationService.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationService.h b/src/Virt_ResourcePoolConfigurationService.h old mode 100755 new mode 100644 diff --git a/src/Virt_ServiceAccessBySAP.c b/src/Virt_ServiceAccessBySAP.c old mode 100755 new mode 100644 diff --git a/src/Virt_ServiceAffectsElement.c b/src/Virt_ServiceAffectsElement.c old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineCapabilities.h b/src/Virt_SettingsDefineCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineState.c b/src/Virt_SettingsDefineState.c old mode 100755 new mode 100644 diff --git a/src/Virt_SystemDevice.c b/src/Virt_SystemDevice.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationCapabilities.c b/src/Virt_VSMigrationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationService.h b/src/Virt_VSMigrationService.h old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationSettingData.c b/src/Virt_VSMigrationSettingData.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSSD.c b/src/Virt_VSSD.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSSDComponent.c b/src/Virt_VSSDComponent.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementCapabilities.c b/src/Virt_VirtualSystemManagementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementService.h b/src/Virt_VirtualSystemManagementService.h old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemSnapshotService.c b/src/Virt_VirtualSystemSnapshotService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemSnapshotService.h b/src/Virt_VirtualSystemSnapshotService.h old mode 100755 new mode 100644 diff --git a/src/profiles.h b/src/profiles.h old mode 100755 new mode 100644 diff --git a/src/svpc_types.h b/src/svpc_types.h old mode 100755 new mode 100644 From eblima at linux.vnet.ibm.com Tue May 24 20:04:23 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 17:04:23 -0300 Subject: [Libvirt-cim] [PATCH] Update .hgignore Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306267369 10800 # Node ID a93bab93b304329e9f63d50a8d46cab427271c8d # Parent 86998e0d6368e290e34ba61985b9d19cbeb7fef3 Update .hgignore Signed-off-by: Eduardo Lima (Etrunko) diff -r 86998e0d6368 -r a93bab93b304 .hgignore --- a/.hgignore Tue May 24 15:29:32 2011 -0300 +++ b/.hgignore Tue May 24 17:02:49 2011 -0300 @@ -7,6 +7,13 @@ *~ *.o tests/*.err +doc/*.html +.changeset +.revision +*.spec +xml_parse_test +cim_schema_*.zip +install_base_schema.sh syntax: regexp .*\#.*\#$ @@ -33,4 +40,4 @@ .*\.loT$ ^acinclude.m4.orig$ ^config.h.in$ -libcmpiutil/doc/html/.*% \ No newline at end of file +libcmpiutil/doc/html/.*% From eblima at linux.vnet.ibm.com Tue May 24 20:14:40 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 17:14:40 -0300 Subject: [Libvirt-cim] [PATCH] Configure tweaks Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306268000 10800 # Node ID cbca2d7ce313a0d3c26d77e04f5e36d7c4549e3e # Parent a93bab93b304329e9f63d50a8d46cab427271c8d Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Introduce libtool version-info. Notice that changes in Makefile.am are necessary in order to produce versioned .so. Due to the large amount of libraries we generate, it is a big patch and I will send it separately. Signed-off-by: Eduardo Lima (Etrunko) diff -r a93bab93b304 -r cbca2d7ce313 acinclude.m4 --- a/acinclude.m4 Tue May 24 17:02:49 2011 -0300 +++ b/acinclude.m4 Tue May 24 17:13:20 2011 -0300 @@ -71,11 +71,9 @@ ], [ have_CMPI=yes - dnl AC_MSG_RESULT(yes) ], [ have_CMPI=no - dnl AC_MSG_RESULT(no) ]) ]) @@ -88,7 +86,7 @@ AC_DEFUN([CHECK_CMPI], [ - AC_MSG_CHECKING(for CMPI headers) + AC_MSG_NOTICE([checking for CMPI headers...]) dnl Check just with the standard include paths CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) @@ -96,6 +94,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -115,13 +114,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break + else + AC_MSG_RESULT(no) fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI headers files.) fi ] ) @@ -133,7 +134,7 @@ AC_DEFUN([CHECK_PROVIDERDIR], [ - AC_MSG_CHECKING(for CMPI provider directory) + AC_MSG_NOTICE([checking for CMPI provider directory]) _DIRS="$libdir/cmpi" save_exec_prefix=${exec_prefix} save_prefix=${prefix} @@ -146,7 +147,7 @@ for _dir in $_DIRS do _xdir=`eval echo $_dir` - AC_MSG_CHECKING( $_dir ) + AC_MSG_CHECKING([for $_dir]) if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) @@ -172,7 +173,7 @@ AC_DEFUN([CHECK_CIMSERVER], [ - AC_MSG_CHECKING(for CIM servers) + AC_MSG_NOTICE([checking for CIM servers]) if test x"$CIMSERVER" = x then _SERVERS="sfcbd cimserver owcimomd" @@ -194,13 +195,18 @@ esac fi break; - fi + fi + done + if test x"$CIMSERVER" == x; then + AC_MSG_RESULT(no) + else + break + fi done - done PATH=$_SAVE_PATH if test x"$CIMSERVER" == x ; then CIMSERVER=sfcb - AC_MSG_RESULT(implied: $CIMSERVER) + AC_MSG_WARN([CIM server implied: $CIMSERVER]) fi fi # Cross platform only needed for sfcb currently diff -r a93bab93b304 -r cbca2d7ce313 configure.ac --- a/configure.ac Tue May 24 17:02:49 2011 -0300 +++ b/configure.ac Tue May 24 17:13:20 2011 -0300 @@ -1,10 +1,34 @@ # (C) Copyright IBM Corp. 2005 +m4_define([libvirtcim_maj], [0]) +m4_define([libvirtcim_min], [5]) +m4_define([libvirtcim_mic], [12]) +m4_define([libvirtcim_version], [libvirtcim_maj.libvirtcim_min.libvirtcim_mic]) -AC_INIT(libvirt CMPI provider, 0.5.12, cvincent at us.ibm.com, libvirt-cim) +AC_INIT([libvirt CMPI provider], [libvirtcim_version], [cvincent at us.ibm.com], + [libvirt-cim]) AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c]) +# Autogenerate the autoconf header file to store build settings +AC_CONFIG_HEADER([config.h]) + +# Use silent rules if possible +AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +m4_define([lt_cur], m4_eval(libvirtcim_maj + libvirtcim_min)) +m4_define([lt_rev], libvirtcim_mic) +m4_define([lt_age], libvirtcim_min) +VERSION_INFO="lt_cur:lt_rev:lt_age" +AC_SUBST(VERSION_INFO) + +AC_PROG_CC +AC_C_CONST +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) AC_CHECK_HEADERS([stdarg.h errno.h]) +AC_HEADER_STDC AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf]) CPPFLAGS="$CPPFLAGS -DCMPI_VERSION=100" @@ -109,12 +133,6 @@ AC_SUBST(XEN_EMULATOR) AC_DEFINE_UNQUOTED(XEN_EMULATOR, "$XEN_EMULATOR", [Location of Xen FullVirt emulator]) -# Autogenerate the autoconf header file to store build settings -AC_CONFIG_HEADER([config.h]) - -topdir=`pwd` -AC_SUBST(topdir) - AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) # Autogenerate the Makefile @@ -129,14 +147,6 @@ Makefile ]) -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_C_CONST -AC_PROG_LIBTOOL -AC_PROG_INSTALL -AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) -AC_HEADER_STDC # Check for the required CMPI header files (this macro is defined in acinclude.m4) CHECK_CMPI From eblima at linux.vnet.ibm.com Tue May 24 20:31:00 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 17:31:00 -0300 Subject: [Libvirt-cim] [PATCH] Configure tweaks In-Reply-To: References: Message-ID: <4DDC1584.8090208@linux.vnet.ibm.com> On 05/24/2011 05:14 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1306268000 10800 > # Node ID cbca2d7ce313a0d3c26d77e04f5e36d7c4549e3e > # Parent a93bab93b304329e9f63d50a8d46cab427271c8d > Configure tweaks > > acinclude.m4 > - Better output when checking for CMPI includes > configure.ac > - Use automake silent rules if available > - Introduce libtool version-info. Notice that changes in > Makefile.am are necessary in order to produce versioned .so. > Due to the large amount of libraries we generate, it is a big > patch and I will send it separately. > Actually the patch in Makefile.am is a one-liner. Please ignore this message. New version of this patch is on the way. Best regards, Etrunko -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Tue May 24 20:39:01 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 17:39:01 -0300 Subject: [Libvirt-cim] [PATCH] Fix file permissions In-Reply-To: <86998e0d6368e290e34b.1306262299@etrunko-t410.br.ibm.com> References: <86998e0d6368e290e34b.1306262299@etrunko-t410.br.ibm.com> Message-ID: <4DDC1765.7050609@linux.vnet.ibm.com> On 05/24/2011 03:38 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1306261772 10800 > # Node ID 86998e0d6368e290e34ba61985b9d19cbeb7fef3 > # Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1 > Fix file permissions > > Removing exec flag from source code files. > -1 Forgot to chmod on .hgtags. New patch incoming. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Tue May 24 20:48:51 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 24 May 2011 17:48:51 -0300 Subject: [Libvirt-cim] [PATCH] #2 Configure tweaks Message-ID: <1a731e7afdcf6e7115f0.1306270131@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306269980 10800 # Node ID 1a731e7afdcf6e7115f0fe01b2a121c510acd8f1 # Parent a93bab93b304329e9f63d50a8d46cab427271c8d Configure tweaks acinclude.m4 - Better output when checking for CMPI includes configure.ac - Use automake silent rules if available - Introduce libtool version-info. Changes from #1 Makefile.am - Generate versioned .so files Signed-off-by: Eduardo Lima (Etrunko) diff -r a93bab93b304 -r 1a731e7afdcf acinclude.m4 --- a/acinclude.m4 Tue May 24 17:02:49 2011 -0300 +++ b/acinclude.m4 Tue May 24 17:46:20 2011 -0300 @@ -71,11 +71,9 @@ ], [ have_CMPI=yes - dnl AC_MSG_RESULT(yes) ], [ have_CMPI=no - dnl AC_MSG_RESULT(no) ]) ]) @@ -88,7 +86,7 @@ AC_DEFUN([CHECK_CMPI], [ - AC_MSG_CHECKING(for CMPI headers) + AC_MSG_NOTICE([checking for CMPI headers...]) dnl Check just with the standard include paths CMPI_CPP_FLAGS="$CPPFLAGS" _CHECK_CMPI(standard) @@ -96,6 +94,7 @@ dnl The standard include paths worked. AC_MSG_RESULT(yes) else + AC_MSG_RESULT(no) _DIRS_="/usr/include/cmpi \ /usr/local/include/cmpi \ $PEGASUS_ROOT/src/Pegasus/Provider/CMPI \ @@ -115,13 +114,15 @@ dnl Save the new -I parameter CMPI_CPP_FLAGS="$CPPFLAGS" break + else + AC_MSG_RESULT(no) fi CPPFLAGS=$_cppflags done fi CPPFLAGS="$CMPI_CPP_FLAGS" if test "$have_CMPI" == "no"; then - AC_MSG_ERROR(no. Sorry cannot find CMPI headers files.) + AC_MSG_ERROR(Cannot find CMPI headers files.) fi ] ) @@ -133,7 +134,7 @@ AC_DEFUN([CHECK_PROVIDERDIR], [ - AC_MSG_CHECKING(for CMPI provider directory) + AC_MSG_NOTICE([checking for CMPI provider directory]) _DIRS="$libdir/cmpi" save_exec_prefix=${exec_prefix} save_prefix=${prefix} @@ -146,7 +147,7 @@ for _dir in $_DIRS do _xdir=`eval echo $_dir` - AC_MSG_CHECKING( $_dir ) + AC_MSG_CHECKING([for $_dir]) if test -d $_xdir ; then dnl Found it AC_MSG_RESULT(yes) @@ -172,7 +173,7 @@ AC_DEFUN([CHECK_CIMSERVER], [ - AC_MSG_CHECKING(for CIM servers) + AC_MSG_NOTICE([checking for CIM servers]) if test x"$CIMSERVER" = x then _SERVERS="sfcbd cimserver owcimomd" @@ -194,13 +195,18 @@ esac fi break; - fi + fi + done + if test x"$CIMSERVER" == x; then + AC_MSG_RESULT(no) + else + break + fi done - done PATH=$_SAVE_PATH if test x"$CIMSERVER" == x ; then CIMSERVER=sfcb - AC_MSG_RESULT(implied: $CIMSERVER) + AC_MSG_WARN([CIM server implied: $CIMSERVER]) fi fi # Cross platform only needed for sfcb currently diff -r a93bab93b304 -r 1a731e7afdcf configure.ac --- a/configure.ac Tue May 24 17:02:49 2011 -0300 +++ b/configure.ac Tue May 24 17:46:20 2011 -0300 @@ -1,10 +1,34 @@ # (C) Copyright IBM Corp. 2005 +m4_define([libvirtcim_maj], [0]) +m4_define([libvirtcim_min], [5]) +m4_define([libvirtcim_mic], [12]) +m4_define([libvirtcim_version], [libvirtcim_maj.libvirtcim_min.libvirtcim_mic]) -AC_INIT(libvirt CMPI provider, 0.5.12, cvincent at us.ibm.com, libvirt-cim) +AC_INIT([libvirt CMPI provider], [libvirtcim_version], [cvincent at us.ibm.com], + [libvirt-cim]) AC_CONFIG_SRCDIR([src/Virt_ComputerSystem.c]) +# Autogenerate the autoconf header file to store build settings +AC_CONFIG_HEADER([config.h]) + +# Use silent rules if possible +AM_INIT_AUTOMAKE +m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])]) + +m4_define([lt_cur], m4_eval(libvirtcim_maj + libvirtcim_min)) +m4_define([lt_rev], libvirtcim_mic) +m4_define([lt_age], libvirtcim_min) +VERSION_INFO="lt_cur:lt_rev:lt_age" +AC_SUBST(VERSION_INFO) + +AC_PROG_CC +AC_C_CONST +AC_PROG_LIBTOOL +AC_PROG_INSTALL +AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) AC_CHECK_HEADERS([stdarg.h errno.h]) +AC_HEADER_STDC AC_CHECK_FUNCS([popen pclose fgets asprintf vfprintf fprintf snprintf sscanf]) CPPFLAGS="$CPPFLAGS -DCMPI_VERSION=100" @@ -109,12 +133,6 @@ AC_SUBST(XEN_EMULATOR) AC_DEFINE_UNQUOTED(XEN_EMULATOR, "$XEN_EMULATOR", [Location of Xen FullVirt emulator]) -# Autogenerate the autoconf header file to store build settings -AC_CONFIG_HEADER([config.h]) - -topdir=`pwd` -AC_SUBST(topdir) - AC_PATH_PROG(XSLTPROC, xsltproc, /usr/bin/xsltproc) # Autogenerate the Makefile @@ -129,14 +147,6 @@ Makefile ]) -AM_INIT_AUTOMAKE - -AC_PROG_CC -AC_C_CONST -AC_PROG_LIBTOOL -AC_PROG_INSTALL -AC_CHECK_HEADERS([stdlib.h string.h unistd.h]) -AC_HEADER_STDC # Check for the required CMPI header files (this macro is defined in acinclude.m4) CHECK_CMPI diff -r a93bab93b304 -r 1a731e7afdcf libxkutil/Makefile.am --- a/libxkutil/Makefile.am Tue May 24 17:02:49 2011 -0300 +++ b/libxkutil/Makefile.am Tue May 24 17:46:20 2011 -0300 @@ -3,6 +3,8 @@ CFLAGS += $(CFLAGS_STRICT) +AM_LDFLAGS = -version-info @VERSION_INFO@ + noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ pool_parsing.h diff -r a93bab93b304 -r 1a731e7afdcf src/Makefile.am --- a/src/Makefile.am Tue May 24 17:02:49 2011 -0300 +++ b/src/Makefile.am Tue May 24 17:46:20 2011 -0300 @@ -29,7 +29,8 @@ CFLAGS += -I$(top_builddir)/libxkutil $(CFLAGS_STRICT) -AM_LDFLAGS = $(XKUADD) +AM_LDFLAGS = $(XKUADD) \ + -version-info @VERSION_INFO@ providerdir = $(PROVIDERDIR) From cvincent at linux.vnet.ibm.com Wed May 25 04:59:08 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 25 May 2011 00:59:08 -0400 Subject: [Libvirt-cim] [PATCH] Add DCN ACL classes & providers to support libvirt NWFilters Message-ID: <51c1f55fa776f68ce794.1306299548@oc0840652111.ibm.com> # HG changeset patch # User Chip Vincent # Date 1305221061 14400 # Node ID 51c1f55fa776f68ce794ea626b06b08691ff7a47 # Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1 Add DCN ACL classes & providers to support libvirt NWFilters. This patch adds several new classes and providers to add support for filter rules and filter lists. The patch is rather large since all aspects are intertwined. Here's an overview of the implementation: libxkutil: The instrumentation is implemented in acl_parsing.c/.h since this function is essentially independent of the device and/or pool parsing. ACLs are associated to devices (via filterref) so there are some minor changes in device_parsing.c & xmlgen.c to support this. Since there's lots of rule types, there's lots of new functions in xmlgen. A future patch should refactor xmlgen to be more manageable like device/pool/acl_parsing. +libxkutil/acl_parsing.h & .c Adds several new structures to represent filters and rules. Since rules can only exist within the context of a filter, the main structure used in the APIs is acl_fitler. Also adds several new APIs to libxkutil to allow providers (see below) to convert acl_filter and acl_rule structures to CIM objects, and to support associations between themselves and existing resource (host system & network port). schema & providers: The ACL function does not map to an exiting profile so a subset of the classes defined in the CIM Network schema are used. +schema/FilterEntry.mof &.registration +src/FilterEntry.h & .c Adds two new classes to represent IP-level rules (IPHeadersFilter) and MAC-level (Hdr8021Filter). These classes include two new properties to surface libvirt features not defined by the schema (Direction & Priority). NOTE: Read-write. Requires Name property to be in the form :, where is the name of an existing filter, and is an arbitrary number. Example: "clean-traffic:0". This allows the provider to create the rule properly in the context of a pre-defined filter. The element will be changed as needed by the provider to avoid conflict, and will be communicated to the client via the object path returned during a CreateInstance operation. +schema/FilterList.mof & .registration +src/FilterList.h & .c Adds a class to represent ACL filters (FilterList) NOTE: Read-write. Requires Name property only. +schema/EntriesInFilterList.mof & .registration +src/EntriesInFilterList.c Adds a class to represent the relationship (association) between a filter (FilterList) and the rules it contains (IPHeadersFilter or Hdr8021Filter). NOTE: Read-only. Clients may not explicitly create associations between filters and rules. Rather, the relationship is implicitly formed when the rule is created (see above). +schema/NestedFilterList.mof & .registration +src/NestedFilterList.c Adds a class to represent filters that have references (filterref) to other pre-defined filters. This is not covered by the current schema so a new class was introduced to a) allow filters to reference each other, and b) do it in a way that allows the client to determine if a filter reference_s_ a filter or is reference_d_ by a filter. NOTE: New associations are created via CIM intrinsic methods (create/modify/ delete). It requires the client to provide fully qualified object paths to the 'parent' filter and 'child' filter so the providers can a) validate their existance, and b) apply the necessary links in the XML so new associations will appear when queried. +schema/HostedFilterList.mof & .registration +src/HostedFilterList.c Adds a class to represent the relationship (association) between a filter and the computer system that hosts them. In the case of ACL filters, which are essentially defined once but available to all VMs, they are always linked to the host system (hypervisor) rather than the individual computer systems (VMs). NOTE: Read-only. Clients may not change the host associated to filters. +schema/AppliedFilterList.mof & .registration +src/AppliedFilterList.c Adds a class to represent the relationship (association) between a filter and a network port referencing it. This is not covered by the current schema so a new class was introduced. NOTE: New associations are created via CIM intrinsic methods (create/modify/ delete). It requires the client to provide fully qualified object paths to the filter and network port so the providers can a) validate their existance, and b) apply the necessary links in the XML so new associations appear when queried. Signed-off-by: Chip Vincent diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -57,7 +57,13 @@ schema/InputPool.mof \ schema/HostedAccessPoint.mof \ schema/ServiceAccessBySAP.mof \ - schema/SAPAvailableForElement.mof + schema/SAPAvailableForElement.mof \ + schema/FilterEntry.mof \ + schema/FilterList.mof \ + schema/EntriesInFilterList.mof \ + schema/NestedFilterList.mof \ + schema/AppliedFilterList.mof \ + schema/HostedFilterList.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -138,7 +144,13 @@ schema/InputPool.registration \ schema/HostedAccessPoint.registration \ schema/ServiceAccessBySAP.registration \ - schema/SAPAvailableForElement.registration + schema/SAPAvailableForElement.registration \ + schema/FilterEntry.registration \ + schema/FilterList.registration \ + schema/EntriesInFilterList.registration \ + schema/NestedFilterList.registration \ + schema/AppliedFilterList.registration \ + schema/HostedFilterList.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am --- a/libxkutil/Makefile.am +++ b/libxkutil/Makefile.am @@ -4,12 +4,12 @@ CFLAGS += $(CFLAGS_STRICT) noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ - pool_parsing.h + pool_parsing.h acl_parsing.h lib_LTLIBRARIES = libxkutil.la libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ - xmlgen.c infostore.c pool_parsing.c + xmlgen.c infostore.c pool_parsing.c acl_parsing.c libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ @LIBUUID_LIBS@ diff --git a/libxkutil/acl_parsing.c b/libxkutil/acl_parsing.c new file mode 100644 --- /dev/null +++ b/libxkutil/acl_parsing.c @@ -0,0 +1,741 @@ +/* + * Copyright IBM Corp. 2010 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include + +#include + +#include "acl_parsing.h" +#include "device_parsing.h" +#include "xmlgen.h" +#include "../src/svpc_types.h" + +void cleanup_rule(struct acl_rule *rule) +{ + if(rule == NULL) + return; + + free(rule->name); + free(rule->protocol_id); + free(rule->action); + free(rule->direction); + free(rule->priority); + + switch(rule->type) { + case MAC_RULE: + free(rule->var.mac.srcmacaddr); + free(rule->var.mac.srcmacmask); + free(rule->var.mac.dstmacaddr); + free(rule->var.mac.dstmacmask); + free(rule->var.mac.protocol_id); + free(rule->var.mac.comment); + break; + case ARP_RULE: + free(rule->var.arp.srcmacaddr); + free(rule->var.arp.srcmacmask); + free(rule->var.arp.dstmacaddr); + free(rule->var.arp.dstmacmask); + free(rule->var.arp.hw_type); + free(rule->var.arp.protocol_type); + free(rule->var.arp.opcode); + free(rule->var.arp.arpsrcmacaddr); + free(rule->var.arp.arpdstmacaddr); + free(rule->var.arp.arpsrcipaddr); + free(rule->var.arp.arpdstipaddr); + free(rule->var.arp.comment); + break; + case IP_RULE: + free(rule->var.ip.srcmacaddr); + free(rule->var.ip.srcmacmask); + free(rule->var.ip.dstmacaddr); + free(rule->var.ip.dstmacmask); + free(rule->var.ip.srcipaddr); + free(rule->var.ip.srcipmask); + free(rule->var.ip.dstipaddr); + free(rule->var.ip.dstipmask); + free(rule->var.ip.srcportstart); + free(rule->var.ip.srcportend); + free(rule->var.ip.dstportstart); + free(rule->var.ip.dstportend); + free(rule->var.ip.comment); + break; + case TCP_RULE: + free(rule->var.tcp.srcmacaddr); + free(rule->var.tcp.srcipaddr); + free(rule->var.tcp.srcipmask); + free(rule->var.tcp.dstipaddr); + free(rule->var.tcp.srcipfrom); + free(rule->var.tcp.srcipto); + free(rule->var.tcp.dstipfrom); + free(rule->var.tcp.dstipto); + free(rule->var.tcp.srcportstart); + free(rule->var.tcp.srcportend); + free(rule->var.tcp.dstportstart); + free(rule->var.tcp.dstportend); + free(rule->var.tcp.comment); + free(rule->var.tcp.state); + break; + case IGMP_RULE: + free(rule->var.igmp.srcmacaddr); + free(rule->var.igmp.srcmacmask); + free(rule->var.igmp.dstmacaddr); + free(rule->var.igmp.dstmacmask); + free(rule->var.igmp.srcipaddr); + free(rule->var.igmp.srcipmask); + free(rule->var.igmp.dstipaddr); + free(rule->var.igmp.dstipmask); + free(rule->var.igmp.srcipfrom); + free(rule->var.igmp.srcipto); + free(rule->var.igmp.dstipfrom); + free(rule->var.igmp.dstipto); + free(rule->var.igmp.type); + free(rule->var.igmp.code); + free(rule->var.igmp.comment); + free(rule->var.igmp.state); + break; + case ICMP_RULE: + free(rule->var.icmp.srcmacaddr); + free(rule->var.icmp.srcmacmask); + free(rule->var.icmp.dstmacaddr); + free(rule->var.icmp.dstmacmask); + free(rule->var.icmp.srcipaddr); + free(rule->var.icmp.srcipmask); + free(rule->var.icmp.dstipaddr); + free(rule->var.icmp.dstipmask); + free(rule->var.icmp.srcipfrom); + free(rule->var.icmp.srcipto); + free(rule->var.icmp.dstipfrom); + free(rule->var.icmp.dstipto); + free(rule->var.icmp.type); + free(rule->var.icmp.code); + free(rule->var.icmp.comment); + free(rule->var.icmp.state); + break; + case UNKNOWN_RULE: + default: + break; + }; + + rule->type = UNKNOWN_RULE; +} + +void cleanup_filter(struct acl_filter *filter) +{ + int i; + + if(filter == NULL) + return; + + free(filter->uuid); + free(filter->name); + free(filter->chain); + + for (i = 0; i < filter->rule_ct; i++) { + cleanup_rule(filter->rules[i]); + free(filter->rules[i]); + } + + free(filter->rules); + filter->rule_ct = 0; + + for (i = 0; i < filter->ref_ct; i++) + free(filter->refs[i]); + + free(filter->refs); + filter->ref_ct = 0; +} + +void cleanup_filters(struct acl_filter **filters, int count) +{ + int i; + struct acl_filter *_filters = *filters; + + if((filters == NULL) || (*filters == NULL) || (count == 0)) + return; + + for (i = 0; i < count; i++) + cleanup_filter(&_filters[i]); + + free(_filters); + *filters = NULL; +} + + +static int parse_acl_mac_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL mac rule %s", rnode->name); + + rule->type = MAC_RULE; + rule->var.mac.protocol_id = get_attr_value(rnode, "protocolid"); + rule->var.mac.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.mac.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.mac.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.mac.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.mac.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_arp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL arp rule %s", rnode->name); + + rule->type = ARP_RULE; + rule->var.arp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.arp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.arp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.arp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.arp.hw_type = get_attr_value(rnode, "hwtype"); + rule->var.arp.protocol_type = get_attr_value(rnode, "protocoltype"); + rule->var.arp.opcode = get_attr_value(rnode, "opcode"); + rule->var.arp.arpsrcmacaddr = get_attr_value(rnode, "arpsrcmacaddr"); + rule->var.arp.arpdstmacaddr = get_attr_value(rnode, "arpdstmacaddr"); + rule->var.arp.arpsrcipaddr = get_attr_value(rnode, "arpsrcipaddr"); + rule->var.arp.arpdstipaddr = get_attr_value(rnode, "arpdstipaddr"); + rule->var.arp.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_ip_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACP ip rule %s", rnode->name); + + rule->type = IP_RULE; + rule->var.ip.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.ip.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.ip.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.ip.dstmacmask = get_attr_value(rnode, "dstmacmaks"); + rule->var.ip.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.ip.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.ip.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.ip.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.ip.protocol = get_attr_value(rnode, "protocol"); + rule->var.ip.srcportstart = get_attr_value(rnode, "srcportstart"); + rule->var.ip.srcportend = get_attr_value(rnode, "srcportend"); + rule->var.ip.dstportstart = get_attr_value(rnode, "dstportstart"); + rule->var.ip.dstportend = get_attr_value(rnode, "dstportend"); + rule->var.ip.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_tcp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL tcp rule %s", rnode->name); + + rule->type = TCP_RULE; + rule->var.tcp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.tcp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.tcp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.tcp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.tcp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.tcp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.tcp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.tcp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.tcp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.tcp.srcportstart = get_attr_value(rnode, "srcportstart"); + rule->var.tcp.srcportend = get_attr_value(rnode, "srcportend"); + rule->var.tcp.dstportstart = get_attr_value(rnode, "dstportstart"); + rule->var.tcp.dstportend = get_attr_value(rnode, "dstportend"); + rule->var.tcp.comment = get_attr_value(rnode, "comment"); + rule->var.tcp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_icmp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL icmp rule %s", rnode->name); + + rule->type = ICMP_RULE; + rule->var.icmp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.icmp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.icmp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.icmp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.icmp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.icmp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.icmp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.icmp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.icmp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.icmp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.icmp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.icmp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.icmp.comment = get_attr_value(rnode, "comment"); + rule->var.icmp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_igmp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL igmp rule %s", rnode->name); + + rule->type = IGMP_RULE; + rule->var.igmp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.igmp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.igmp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.igmp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.igmp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.igmp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.igmp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.igmp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.igmp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.igmp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.igmp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.igmp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.igmp.type = get_attr_value(rnode, "type"); + rule->var.igmp.code = get_attr_value(rnode, "code"); + rule->var.igmp.comment = get_attr_value(rnode, "comment"); + rule->var.igmp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_rule(xmlNode *rnode, struct acl_rule *rule) +{ + xmlNode *child = NULL; + + memset(rule, 0, sizeof(*rule)); + + rule->action = get_attr_value(rnode, "action"); + if (rule->action == NULL) + goto err; + + rule->direction = get_attr_value(rnode, "direction"); + if (rule->direction == NULL) + goto err; + + rule->priority = get_attr_value(rnode, "priority"); + rule->statematch = get_attr_value(rnode, "statematch"); + + for (child = rnode->children; child != NULL; child = child->next) { + if (XSTREQ(child->name, "mac")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_mac_rule(child, rule); + } else if (XSTREQ(child->name, "arp") || + XSTREQ(child->name, "rarp")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_arp_rule(child, rule); + } else if (XSTREQ(child->name, "ip") || + XSTREQ(child->name, "ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_ip_rule(child, rule); + } else if (XSTREQ(child->name, "tcp") || + XSTREQ(child->name, "tcp-ipv6") || + XSTREQ(child->name, "udp") || + XSTREQ(child->name, "udp-ipv6") || + XSTREQ(child->name, "sctp") || + XSTREQ(child->name, "sctp-ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_tcp_rule(child, rule); + } else if (XSTREQ(child->name, "icmp") || + XSTREQ(child->name, "icmpv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_icmp_rule(child, rule); + } else if (XSTREQ(child->name, "igmp") || + XSTREQ(child->name, "igmp-ipv6") || + XSTREQ(child->name, "esp") || + XSTREQ(child->name, "esp-ipv6") || + XSTREQ(child->name, "ah") || + XSTREQ(child->name, "ah-ipv6") || + XSTREQ(child->name, "udplite") || + XSTREQ(child->name, "udplite-ipv6") || + XSTREQ(child->name, "all") || + XSTREQ(child->name, "all-ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_igmp_rule(child, rule); + } + } + + return 1; + + err: + cleanup_rule(rule); + + return 0; +} + +static int parse_acl_filter(xmlNode *fnode, struct acl_filter *filter) +{ + struct acl_rule *rule = NULL; + char *filter_ref = NULL; + xmlNode *child = NULL; + + filter->name = get_attr_value(fnode, "name"); + if (filter->name == NULL) + goto err; + + filter->chain = get_attr_value(fnode, "chain"); + + for (child = fnode->children; child != NULL; child = child->next) { + if (XSTREQ(child->name, "uuid")) { + STRPROP(filter, uuid, child); + } else if (XSTREQ(child->name, "rule")) { + rule = malloc(sizeof(*rule)); + if (rule == NULL) + goto err; + + if (parse_acl_rule(child, rule) == 0) + goto err; + + append_filter_rule(filter, rule); + } + else if (XSTREQ(child->name, "filterref")) { + filter_ref = get_attr_value(child, "filter"); + if (filter_ref == NULL) + goto err; + + append_filter_ref(filter, filter_ref); + } + } + + return 1; + + err: + cleanup_filter(filter); + + return 0; +} + +/* Dummy function to suppress error message from libxml2 */ +static void swallow_err_msg(void *ctx, const char *msg, ...) +{ + /* do nothing, just swallow the message. */ +} + +int get_filter_from_xml(const char *xml, struct acl_filter **filter) +{ + xmlDoc *xmldoc = NULL; + + if (xml == NULL || filter == NULL) + return 0; + + xmlSetGenericErrorFunc(NULL, swallow_err_msg); + + xmldoc = xmlParseMemory(xml, strlen(xml) + 1); + if (xmldoc == NULL) + goto err; + + *filter = malloc(sizeof(**filter)); + + memset(*filter, 0, sizeof(**filter)); + parse_acl_filter(xmldoc->children, *filter); + + err: + xmlSetGenericErrorFunc(NULL, NULL); + xmlFreeDoc(xmldoc); + + return 1; +} + +int get_filter_by_name( + virConnectPtr conn, + const char *name, + struct acl_filter **filter) +{ + virNWFilterPtr vfilter = NULL; + char *xml = NULL; + + if (name == NULL || filter == NULL) + return 0; + + vfilter = virNWFilterLookupByName(conn, name); + + xml = virNWFilterGetXMLDesc(vfilter, 0); + + virNWFilterFree(vfilter); + + if (xml == NULL) + return 0; + + get_filter_from_xml(xml, filter); + + return 1; +} + +int get_filter_by_uuid( + virConnectPtr conn, + const char *uuid, + struct acl_filter **filter) +{ + virNWFilterPtr vfilter = NULL; + char *xml = NULL; + + if (uuid == NULL || filter == NULL) + return 0; + + vfilter = virNWFilterLookupByUUIDString(conn, uuid); + + xml = virNWFilterGetXMLDesc(vfilter, 0); + + virNWFilterFree(vfilter); + + if (xml == NULL) + return 0; + + get_filter_from_xml(xml, filter); + + return 1; +} + +int get_filters( + virConnectPtr conn, + struct acl_filter **list) +{ + int count = 0; + char **names = NULL; + struct acl_filter *filters = NULL; + int i = 0; + + count = virConnectNumOfNWFilters(conn); + + names = calloc(count, sizeof(char *)); + if (names == NULL) + goto err; + + virConnectListNWFilters(conn, names, count); + + filters = malloc(count * sizeof(struct acl_filter)); + if (filters == NULL) + goto err; + + for(i = 0; i < count; i++) + { + struct acl_filter *filter = NULL; + + get_filter_by_name(conn, names[i], &filter); + + memcpy(&filters[i], filter, sizeof(*filter)); + } + + *list = filters; + + err: + free(names); + + return i; +} + + +int append_filter_rule(struct acl_filter *filter, struct acl_rule *rule) +{ + struct acl_rule **old_rules = NULL; + + if ((filter == NULL) || (rule == NULL)) + return 0; + + rule->name = make_rule_id(filter->name, filter->rule_ct); + if (rule->name == NULL) + return 0; + + old_rules = filter->rules; + + filter->rules = + malloc((filter->rule_ct + 1) * sizeof(struct acl_rule *)); + + memcpy(filter->rules, + old_rules, + filter->rule_ct * sizeof(struct acl_rule *)); + + filter->rules[filter->rule_ct] = rule; + filter->rule_ct++; + + free(old_rules); + + return 1; +} + +int remove_filter_rule(struct acl_filter *filter, struct acl_rule *rule) +{ + char *filter_name = NULL; + int i, index = 0; + struct acl_rule **old_rules = NULL; + + if ((filter == NULL) || (rule == NULL)) + return 0; + + if (parse_rule_id(rule->name, &filter_name, &index) == 0) + return 0; + + if (index > filter->rule_ct) + return 0; + + /* TODO: called infrequently, but needs optimization */ + old_rules = filter->rules; + filter->rules = NULL; + + for (i = 0; i < filter->rule_ct; i++) + if (index == i) { + cleanup_rule(old_rules[i]); + } + else + append_filter_rule(filter, old_rules[i]); + + return 1; +} + +int append_filter_ref(struct acl_filter *filter, char *name) +{ + int i; + char **old_refs = NULL; + + if ((filter == NULL) || (name == NULL)) + return 0; + + for (i = 0; i < filter->ref_ct; i++) + if (STREQC(filter->refs[i], name)) + return 0; /* already exists */ + + old_refs = filter->refs; + + filter->refs = malloc((filter->ref_ct + 1) * sizeof(char *)); + memcpy(filter->refs, old_refs, filter->ref_ct * sizeof(char *)); + + filter->refs[filter->ref_ct] = name; + filter->ref_ct++; + + free(old_refs); + + return 1; +} + +int remove_filter_ref(struct acl_filter *filter, const char *name) +{ + int i; + char **old_refs = NULL; + + if ((filter == NULL) || (name == NULL)) + return 0; + + /* TODO: called infrequently, but needs optimization */ + old_refs = filter->refs; + + for (i = 0; i < filter->ref_ct; i++) + if (STREQC(old_refs[i], name)) { + free(old_refs[i]); + } + else + append_filter_ref(filter, old_refs[i]); + + return 1; +} + +int create_filter(virConnectPtr conn, struct acl_filter *filter) +{ + virNWFilterPtr vfilter = NULL; + char *xml = NULL; + + if (filter == NULL) + return 0; + + xml = filter_to_xml(filter); + if (xml == NULL) + return 0; + + vfilter = virNWFilterDefineXML(conn, xml); + + free(xml); + + if (vfilter == NULL) + return 0; + + virNWFilterFree(vfilter); + + return 1; +} + +int update_filter(virConnectPtr conn, struct acl_filter *filter) +{ + if (delete_filter(conn, filter) == 0 || + create_filter(conn, filter) == 0) + return 0; + + return 1; +} + +int delete_filter(virConnectPtr conn, struct acl_filter *filter) +{ + virNWFilterPtr vfilter = NULL; + + if (filter == NULL) + return 0; + + vfilter = virNWFilterLookupByUUIDString(conn, filter->uuid); + if (vfilter == NULL) + return 0; + + if (virNWFilterUndefine(vfilter) != 0) { + virNWFilterFree(vfilter); + return 0; + } + + return 1; +} + +char *make_rule_id(const char *filter, int index) +{ + int ret; + char *rule_id = NULL; + + if (filter == NULL) + return NULL; + + ret = asprintf(&rule_id, "%s:%u", filter, index); + if (ret == -1) { + free(rule_id); + rule_id = NULL; + } + + + return rule_id; +} + +int parse_rule_id(const char *rule_id, char **filter, int *index) +{ + int ret; + + if ((filter == NULL) || (index == NULL)) + return 0; + ret = sscanf(rule_id, "%as[^:]:%u", filter, index); + if (ret != 2) { + free(*filter); + *filter = NULL; + + return 0; + } + + return 1; +} + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/libxkutil/acl_parsing.h b/libxkutil/acl_parsing.h new file mode 100644 --- /dev/null +++ b/libxkutil/acl_parsing.h @@ -0,0 +1,218 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ACL_PARSING_H +#define __ACL_PARSING_H + +#include +#include +#include +#include + +struct acl_mac_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *protocol_id; + char *comment; +}; + +struct acl_arp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *hw_type; + char *protocol_type; + char *opcode; + char *arpsrcmacaddr; + char *arpdstmacaddr; + char *arpsrcipaddr; + char *arpdstipaddr; + char *comment; +}; + +struct acl_ip_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *protocol; + + char *srcportstart; + char *srcportend; + char *dstportstart; + char *dstportend; + + char *comment; +}; + +struct acl_tcp_rule { + char *srcmacaddr; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *srcportstart; + char *srcportend; + char *dstportstart; + char *dstportend; + + char *comment; + char *state; +}; + +struct acl_igmp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *type; + char *code; + char *comment; + char *state; +}; + +struct acl_icmp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *type; + char *code; + char *comment; + char *state; +}; + +struct acl_rule { + char *name; + char *protocol_id; + char *action; + char *direction; + char *priority; + char *statematch; + + enum { + UNKNOWN_RULE, + MAC_RULE, + ARP_RULE, + IP_RULE, + TCP_RULE, + ICMP_RULE, + IGMP_RULE + } type; + + union { + struct acl_mac_rule mac; + struct acl_arp_rule arp; + struct acl_ip_rule ip; + struct acl_tcp_rule tcp; + struct acl_icmp_rule icmp; + struct acl_igmp_rule igmp; + } var; +}; + +struct acl_filter { + char *uuid; + char *name; + char *chain; + + struct acl_rule **rules; + int rule_ct; + + char **refs; + int ref_ct; +}; + +void cleanup_rule(struct acl_rule *rule); +void cleanup_filter(struct acl_filter *filter); +void cleanup_filters(struct acl_filter **filters, int count); + +int get_filters(virConnectPtr conn, struct acl_filter **list); + +int get_filter_from_xml(const char *xml, struct acl_filter **filter); +int get_filter_by_uuid(virConnectPtr conn, const char *uuid, + struct acl_filter **filter); +int get_filter_by_name(virConnectPtr conn, const char *name, + struct acl_filter **filter); + +char *make_rule_id(const char *filter, int index); +int parse_rule_id(const char *rule_id, char **filter, int *index); + +int append_filter_rule(struct acl_filter *filter, struct acl_rule *rule); +int remove_filter_rule(struct acl_filter *filter, struct acl_rule *rule); + +/* NOTE: caller allocates name and cleanup_filter() releases it */ +int append_filter_ref(struct acl_filter *filter, char *name); +int remove_filter_ref(struct acl_filter *filter, const char *name); + +int create_filter(virConnectPtr conn, struct acl_filter *filter); +int update_filter(virConnectPtr conn, struct acl_filter *filter); +int delete_filter(virConnectPtr conn, struct acl_filter *filter); + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c +++ b/libxkutil/device_parsing.c @@ -80,6 +80,7 @@ free(dev->model); free(dev->device); free(dev->net_mode); + free(dev->filter_ref); } static void cleanup_emu_device(struct emu_device *dev) @@ -386,9 +387,12 @@ ndev->model = get_attr_value(child, "type"); if (ndev->model == NULL) goto err; + } else if (XSTREQ(child->name, "filterref")) { + ndev->filter_ref = get_attr_value(child, "filter"); } else if (XSTREQ(child->name, "virtualport")) { parse_vsi_device(child, ndev); } + } if (ndev->source == NULL) @@ -764,6 +768,7 @@ DUP_FIELD(dev, _dev, dev.net.model); DUP_FIELD(dev, _dev, dev.net.device); DUP_FIELD(dev, _dev, dev.net.net_mode); + DUP_FIELD(dev, _dev, dev.net.filter_ref); DUP_FIELD(dev, _dev, dev.net.vsi.vsi_type); DUP_FIELD(dev, _dev, dev.net.vsi.manager_id); DUP_FIELD(dev, _dev, dev.net.vsi.type_id); diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h +++ b/libxkutil/device_parsing.h @@ -64,6 +64,7 @@ char *model; char *device; char *net_mode; + char *filter_ref; struct vsi_device vsi; }; diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c +++ b/libxkutil/xmlgen.c @@ -301,6 +301,15 @@ xmlNewProp(tmp, BAD_CAST "type", BAD_CAST net->model); } + if (net->filter_ref != NULL) { + tmp = xmlNewChild(nic, NULL, + BAD_CAST "filterref", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST "filter", + BAD_CAST net->filter_ref); + } + if (STREQ(dev->dev.net.type, "network")) msg = set_net_source(nic, net, "network"); else if (STREQ(dev->dev.net.type, "bridge")) @@ -1351,6 +1360,642 @@ return xml; } +static char *mac_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + prop = rule->var.mac.protocol_id; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "protocolid", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.mac.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.mac.srcmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.mac.dstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.mac.dstmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.mac.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error */ + out: + return msg; +} + +static char *arp_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + prop = rule->var.arp.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.srcmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.dstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.dstmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.hw_type; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "hwtype", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.protocol_type; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "protocol_type", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.opcode; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "opcode", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.arpsrcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "arpsrcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.arpdstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "arpdstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.arpsrcipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "arpsrcipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.arp.arpdstipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "arpdstipaddr", + BAD_CAST prop) == NULL) + goto out; + + rule->var.arp.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error */ + out: + + return msg; +} + +static char *ip_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + rule->var.ip.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.srcmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacmask", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacmask", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.srcipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipaddr", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.srcipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipmask", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipaddr", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipmask", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.protocol; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "protocol", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.srcportstart; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcportstart", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.srcportend; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcportend", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstportstart; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstportstart", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.dstportend; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstportend", + BAD_CAST prop) == NULL) + goto out; + + rule->var.ip.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error */ + out: + + return msg; +} + +static char *tcp_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + prop = rule->var.tcp.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop =rule->var.tcp.srcipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.srcipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.dstipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop =rule->var.tcp.dstipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.srcipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.srcipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipto", + BAD_CAST prop) == NULL) + goto out; + + prop =rule->var.tcp.dstipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.dstipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipto", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.srcportstart; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcportstart", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.srcportend; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcportend", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.dstportstart; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstportstart", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.dstportend; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstportend", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.tcp.state; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "state", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error */ + out: + + return msg; +} + +static char *icmp_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + prop = rule->var.icmp.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.srcmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.dstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.dstmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.srcipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.srcipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.dstipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop =rule->var.icmp.dstipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipmask", + BAD_CAST prop) == NULL) + goto out; + + prop =rule->var.icmp.srcipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.srcipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipto", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.dstipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.dstipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipto", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.icmp.state; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "state", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error*/ + out: + + return msg; +} + +static char *igmp_rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + char *msg = XML_ERROR; + char *prop = NULL; + + prop = rule->var.igmp.srcmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.srcmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstmacaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstmacmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstmacmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.srcipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.srcipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstipaddr; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipaddr", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstipmask; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipmask", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.srcipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.srcipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "srcipto", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstipfrom; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipfrom", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.dstipto; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "dstipto", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.type; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "type", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.code; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "code", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.comment; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "comment", + BAD_CAST prop) == NULL) + goto out; + + prop = rule->var.igmp.state; + if (prop != NULL) + if (xmlNewProp(root, BAD_CAST "state", + BAD_CAST prop) == NULL) + goto out; + + msg = NULL; /* no error*/ + out: + + return msg; +} + +static char *rule_to_xml(xmlNodePtr root, struct acl_rule *rule) +{ + xmlNodePtr r = NULL; + char *msg = XML_ERROR; + + r = xmlNewChild(root, NULL, BAD_CAST "rule", NULL); + if (r == NULL) + goto out; + + if (rule->action != NULL) + if (xmlNewProp(r, BAD_CAST "action", + BAD_CAST rule->action) == NULL) + goto out; + + if (rule->direction != NULL) + if (xmlNewProp(r, BAD_CAST "direction", + BAD_CAST rule->direction) == NULL) + goto out; + + if (rule->priority != NULL) + if (xmlNewProp(r, BAD_CAST "priority", + BAD_CAST rule->priority) == NULL) + goto out; + + if (rule->statematch != NULL) + if (xmlNewProp(r, BAD_CAST "statematch", + BAD_CAST rule->statematch) == NULL) + goto out; + + switch (rule->type) { + case MAC_RULE: + msg = mac_rule_to_xml(r, rule); + break; + case ARP_RULE: + msg = arp_rule_to_xml(r, rule); + break; + case IP_RULE: + msg = ip_rule_to_xml(r, rule); + break; + case TCP_RULE: + msg = tcp_rule_to_xml(r, rule); + break; + case ICMP_RULE: + msg = icmp_rule_to_xml(r, rule); + break; + case IGMP_RULE: + msg = igmp_rule_to_xml(r, rule); + break; + case UNKNOWN_RULE: + default: + CU_DEBUG("Ignoring unknown rule."); + break; + } + + out: + return msg; +} + +char *filter_to_xml(struct acl_filter *filter) +{ + char *msg = XML_ERROR; + char *xml = NULL; + xmlNodePtr root = NULL; + xmlNodePtr tmp = NULL; + int i; + + root = xmlNewNode(NULL, BAD_CAST "filter"); + if (root == NULL) + goto out; + + if (xmlNewProp(root, BAD_CAST "name", BAD_CAST filter->name) == NULL) + goto out; + + if (filter->chain != NULL) + if (xmlNewProp(root, BAD_CAST "chain", + BAD_CAST filter->chain) == NULL) + goto out; + + if (filter->uuid != NULL) { + tmp = xmlNewChild(root, NULL, BAD_CAST "uuid", NULL); + if (xmlNewProp(tmp, NULL, BAD_CAST filter->uuid) == NULL) + goto out; + } + + for (i = 0; i < filter->ref_ct; i++) { + tmp = xmlNewChild(root, NULL, BAD_CAST "filterref", NULL); + if (xmlNewProp(tmp, BAD_CAST "filter", + BAD_CAST filter->refs[i]) == NULL) + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + msg = rule_to_xml(root, filter->rules[i]); + if (msg != NULL) + goto out; + } + + xml = tree_to_xml(root); + if (xml != NULL) + msg = NULL; /* no errors */ + + out: + CU_DEBUG("Filter XML: %s", msg); + + xmlFreeNode(root); + + return xml; +} + /* * Local Variables: * mode: C diff --git a/libxkutil/xmlgen.h b/libxkutil/xmlgen.h --- a/libxkutil/xmlgen.h +++ b/libxkutil/xmlgen.h @@ -23,6 +23,7 @@ #include "device_parsing.h" #include "pool_parsing.h" +#include "acl_parsing.h" #include "cmpidt.h" @@ -38,4 +39,6 @@ char *res_to_xml(struct virt_pool_res *res); +char *filter_to_xml(struct acl_filter *filter); + #endif diff --git a/schema/AppliedFilterList.mof b/schema/AppliedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/AppliedFilterList.mof @@ -0,0 +1,8 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_AppliedFilterList")] +class KVM_AppliedFilterList : CIM_ConcreteDependency +{ + CIM_NetworkPort ref Antecedent; + CIM_FilterList ref Dependent; +}; diff --git a/schema/AppliedFilterList.registration b/schema/AppliedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/AppliedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_AppliedFilterList root/virt Virt_AppliedFilterList Virt_AppliedFilterList association diff --git a/schema/EntriesInFilterList.mof b/schema/EntriesInFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/EntriesInFilterList.mof @@ -0,0 +1,6 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_EntriesInFilterList")] +class KVM_EntriesInFilterList : CIM_EntriesInFilterList +{ +}; diff --git a/schema/EntriesInFilterList.registration b/schema/EntriesInFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/EntriesInFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_EntriesInFilterList root/virt Virt_EntriesInFilterList Virt_EntriesInFilterList association diff --git a/schema/FilterEntry.mof b/schema/FilterEntry.mof new file mode 100644 --- /dev/null +++ b/schema/FilterEntry.mof @@ -0,0 +1,60 @@ +// Copyright IBM Corp. 2010 +[Provider("cmpi::Virt_FilterEntry")] +class KVM_Hdr8021Filter : CIM_Hdr8021Filter +{ + [Description("This defines whether the Filter is used for input, " + "output, or both input and output filtering. All values are " + "used with respect to the interface for which the Filter " + "applies. \"Not Applicable\" (0) is used when there is no " + "direction applicable to the Filter. \"Input\" (1) is " + "used when the Filter applies to packets that are inbound " + "on the related interface. \"Output\" (2) is used when the " + "Filter applies to packets that are outbound on the " + "related interface. \"Both\" (3) is used to indicate that " + "the direction is immaterial, e.g., to filter on a source " + "subnet regardless of whether the flow is inbound or " + "outbound."), + ValueMap { "0", "1", "2", "3", "4" }, + Values { "Not Applicable", "Input, Output", "Both", "Mirrored" }] + uint16 Direction; + + [Description("The priority of the rule controls the order in which " + "the rule will be, instantiated relative to other rules. " + "Rules with lower value will be instantiated and therefore " + "evaluated before rules with higher value. Valid values are " + "in the range of 0 to 1000. If this attribute is not " + "provided, the value 500 will automatically be assigned."), + MinValue(0), + MaxValue(1000)] + uint16 Priority = 500; +}; + +[Provider("cmpi::Virt_FilterEntry")] +class KVM_IPHeadersFilter : CIM_IPHeadersFilter +{ + [Description("This defines whether the Filter is used for input, " + "output, or both input and output filtering. All values are " + "used with respect to the interface for which the Filter " + "applies. \"Not Applicable\" (0) is used when there is no " + "direction applicable to the Filter. \"Input\" (1) is " + "used when the Filter applies to packets that are inbound " + "on the related interface. \"Output\" (2) is used when the " + "Filter applies to packets that are outbound on the " + "related interface. \"Both\" (3) is used to indicate that " + "the direction is immaterial, e.g., to filter on a source " + "subnet regardless of whether the flow is inbound or " + "outbound."), + ValueMap { "0", "1", "2", "3", "4" }, + Values { "Not Applicable", "Input, Output", "Both", "Mirrored" }] + uint16 Direction; + + [Description("The priority of the rule controls the order in which " + "the rule will be, instantiated relative to other rules. " + "Rules with lower value will be instantiated and therefore " + "evaluated before rules with higher value. Valid values are " + "in the range of 0 to 1000. If this attribute is not " + "provided, the value 500 will automatically be assigned."), + MinValue(0), + MaxValue(1000)] + uint16 Priority = 500; +}; diff --git a/schema/FilterEntry.registration b/schema/FilterEntry.registration new file mode 100644 --- /dev/null +++ b/schema/FilterEntry.registration @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_Hdr8021Filter root/virt Virt_FilterEntry Virt_FilterEntry instance +KVM_IPHeadersFilter root/virt Virt_FilterEntry Virt_FilterEntry instance diff --git a/schema/FilterList.mof b/schema/FilterList.mof new file mode 100644 --- /dev/null +++ b/schema/FilterList.mof @@ -0,0 +1,4 @@ +// Copyright IBM Corp. 2011 +class KVM_FilterList : CIM_FilterList +{ +}; diff --git a/schema/FilterList.registration b/schema/FilterList.registration new file mode 100755 --- /dev/null +++ b/schema/FilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_FilterList root/virt Virt_FilterList Virt_FilterList instance diff --git a/schema/HostedFilterList.mof b/schema/HostedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/HostedFilterList.mof @@ -0,0 +1,6 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_HostedFilterList")] +class KVM_HostedFilterList : CIM_HostedFilterList +{ +}; diff --git a/schema/HostedFilterList.registration b/schema/HostedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/HostedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_HostedFilterList root/virt Virt_HostedFilterList Virt_HostedFilterList association diff --git a/schema/NestedFilterList.mof b/schema/NestedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/NestedFilterList.mof @@ -0,0 +1,8 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_NestedFilterList")] +class KVM_NestedFilterList : CIM_ConcreteDependency +{ + CIM_FilterList ref Antecedent; + CIM_FilterList ref Dependent; +}; diff --git a/schema/NestedFilterList.registration b/schema/NestedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/NestedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_NestedFilterList root/virt Virt_NestedFilterList Virt_NestedFilterList association diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,9 @@ Virt_VSMigrationSettingData.h \ Virt_ConsoleRedirectionService.h \ Virt_ConsoleRedirectionServiceCapabilities.h \ - Virt_KVMRedirectionSAP.h + Virt_KVMRedirectionSAP.h \ + Virt_FilterList.h \ + Virt_FilterEntry.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -77,7 +79,13 @@ libVirt_ServiceAffectsElement.la \ libVirt_HostedAccessPoint.la \ libVirt_ServiceAccessBySAP.la \ - libVirt_SAPAvailableForElement.la + libVirt_SAPAvailableForElement.la \ + libVirt_FilterList.la \ + libVirt_FilterEntry.la \ + libVirt_EntriesInFilterList.la \ + libVirt_NestedFilterList.la \ + libVirt_HostedFilterList.la \ + libVirt_AppliedFilterList.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -243,3 +251,26 @@ libVirt_SAPAvailableForElement_la_SOURCES = Virt_SAPAvailableForElement.c libVirt_SAPAvailableForElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_KVMRedirectionSAP +libVirt_FilterEntry_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_FilterEntry_la_SOURCES = Virt_FilterEntry.c +libVirt_FilterEntry_la_LIBADD = -lVirt_HostSystem + +libVirt_FilterList_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_FilterList_la_SOURCES = Virt_FilterList.c +libVirt_FilterList_la_LIBADD = -lVirt_HostSystem + +libVirt_EntriesInFilterList_la_DEPENDENCIES = libVirt_FilterEntry.la libVirt_FilterList.la +libVirt_EntriesInFilterList_la_SOURCES = Virt_EntriesInFilterList.c +libVirt_EntriesInFilterList_la_LIBADD = -lVirt_FilterEntry -lVirt_FilterList + +libVirt_NestedFilterList_la_DEPENDENCIES = libVirt_FilterList.la +libVirt_NestedFilterList_la_SOURCES = Virt_NestedFilterList.c +libVirt_NestedFilterList_la_LIBADD = -lVirt_FilterList + +libVirt_HostedFilterList_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_FilterList.la +libVirt_HostedFilterList_la_SOURCES = Virt_HostedFilterList.c +libVirt_HostedFilterList_la_LIBADD = -lVirt_HostSystem -lVirt_FilterList + +libVirt_AppliedFilterList_la_DEPENDENCIES = libVirt_Device.la libVirt_FilterList.la +libVirt_AppliedFilterList_la_SOURCES = Virt_AppliedFilterList.c +libVirt_AppliedFilterList_la_LIBADD = -lVirt_Device -lVirt_FilterList diff --git a/src/Virt_AppliedFilterList.c b/src/Virt_AppliedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_AppliedFilterList.c @@ -0,0 +1,627 @@ +/* + * Copyright IBM Corp. 2010 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include +#include + +#include "device_parsing.h" +#include "acl_parsing.h" +#include "misc_util.h" +#include "cs_util.h" + +#include "Virt_Device.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference property of an instance + * + * @param inst The instance + * @param prop The property name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_prop(const CMPIInstance *instance, + const char *prop, + CMPIObjectPath **reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetProperty(instance, prop, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + if ((value.type != CMPI_ref) || CMIsNullObject(value.value.ref)) + return CMPI_RC_ERR_TYPE_MISMATCH; + + *reference = value.value.ref; + + return CMPI_RC_OK; +} + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference component of an object path + * + * @param _reference The reference + * @param key The key name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_path(const CMPIObjectPath *reference, + const char *key, + CMPIObjectPath **_reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetKey(reference, key, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + /* how to parse and object path? */ + + return CMPI_RC_OK; +} + +/* TODO: Port to libxkutil/device_parsing.c */ +static int update_device(virDomainPtr dom, + struct virt_device *dev) +{ + char *xml = NULL; + int flags = VIR_DOMAIN_DEVICE_MODIFY_CURRENT | + VIR_DOMAIN_DEVICE_MODIFY_CONFIG; + int ret = 0; + + /** device_to_xml() is not exported, so this function needs + * to be moved + */ + + /* xml = device_to_xml(dev); */ + + if (xml == NULL) { + CU_DEBUG("Failed to get XML for device '%s'", dev->id); + goto out; + } + + if (virDomainUpdateDeviceFlags(dom, xml, flags) != 0) { + CU_DEBUG("Failed to dynamically update device:"); + CU_DEBUG("%s", xml); + goto out; + } + + ret = 1; + out: + free(xml); + + return ret; +} + +/* TODO: Port to libxkutil/device_parsing.c */ +static int get_device_by_devid(virDomainPtr dom, + const char *devid, + int type, + struct virt_device **dev) +{ + int i, ret = 0; + struct virt_device *devices = NULL; + int count = get_devices(dom, &devices, type); + + for (i = 0; i < count; i++) { + if (STREQC(devid, devices[i].id)) { + *dev = virt_device_dup(&devices[i]); + if (*dev != NULL) + ret = 1; + + break; + } + } + + cleanup_virt_devices(&devices, count); + + return ret; +} + +/** + * given a filter, get the network interface + */ +static CMPIStatus list_to_net( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + struct acl_filter *filter = NULL; + virDomainPtr *doms = NULL; + virConnectPtr conn = NULL; + int i, j, dcount, ncount; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* validate filter */ + get_filter_by_name(conn, name, &filter); + if (filter == NULL) + goto out; + + cleanup_filter(filter); + + /* get domains */ + dcount = get_domain_list(conn, &doms); + if (dcount < 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get domain list"); + goto out; + } + + for (i = 0; i < dcount; i++) { + /* get domain's network devices */ + struct virt_device *devices = NULL; + ncount = get_devices(doms[i], &devices, CIM_RES_TYPE_NET); + + CU_DEBUG("Found %u network devices", ncount); + + for (j = 0; j < ncount; j++) { + struct net_device *ndev = &(devices[j].dev.net); + + CU_DEBUG("filterref = %s", ndev->filter_ref); + + if ((ndev->filter_ref != NULL) && + STREQC(name, ndev->filter_ref)) { + CU_DEBUG("Getting network device instance"); + + CMPIInstance *instance = NULL; + char *device_id = + get_fq_devid( + (char *)virDomainGetName(doms[i]), + devices[j].id); + + CU_DEBUG("Processing %s", device_id); + + s = get_device_by_name(_BROKER, + reference, + device_id, + CIM_RES_TYPE_NET, + &instance); + + if (instance != NULL) { + CU_DEBUG("adding instance to list"); + inst_list_add(list, instance); + } + } + } + + cleanup_virt_devices(&devices, ncount); + virDomainFree(doms[i]); + } + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a network interface, find the filter lists + */ +static CMPIStatus net_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + char *domain_name = NULL; + const char *device_name = NULL; + char *net_name = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + int i; + struct acl_filter *filter = NULL; + + CU_DEBUG("Reference %s", REF2STR(reference)); + + /* validate device + * TODO: This may be redundant since it's necessary to get + * the device structure in order to determine the filter_ref + */ + if (!STREQC(CLASSNAME(reference), "KVM_NetworkPort")) + goto out; + + s = get_device_by_ref(_BROKER, reference, &instance); + if ((s.rc != CMPI_RC_OK) || (instance == NULL)) + goto out; + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + CU_DEBUG("Failed to get DeviceID"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* connect to domain */ + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + /* get domain's network devices */ + struct virt_device *devices = NULL; + int count = get_devices(dom, &devices, CIM_RES_TYPE_NET); + + for (i = 0; i < count; i++) { + struct net_device *ndev = &(devices[i].dev.net); + + if (STREQC(device_name, devices[i].id)) { + CMPIInstance *instance = NULL; + + CU_DEBUG("Processing %s", ndev->filter_ref); + + get_filter_by_name(conn, ndev->filter_ref, &filter); + if (filter == NULL) + continue; + + s = instance_from_filter(_BROKER, + info->context, + reference, + filter, + &instance); + + if (instance != NULL) + inst_list_add(list, instance); + + } + + } + + cleanup_virt_devices(&devices, count); + out: + + free(domain_name); + free((char *)device_name); + free(net_name); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_FilterList", + NULL +}; + +static char *dependent[] = { + "KVM_NetworkPort", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_AppliedFilterList", + NULL +}; + +static struct std_assoc _list_to_net = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_net, + .make_ref = make_ref +}; + +static struct std_assoc _net_to_list = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = net_to_list, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_net, + &_net_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_AppliedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +DEFAULT_GI(); +DEFAULT_EIN(); +DEFAULT_EI(); + +static CMPIStatus CreateInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *filter_name = NULL; + struct acl_filter *filter = NULL; + CMPIObjectPath *dependent = NULL; + char *domain_name = NULL; + const char *device_name = NULL; + char *net_name = NULL; + struct virt_device *device = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + + if (cu_get_ref_prop(instance, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &filter_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_prop(instance, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.DeviceID property"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + get_device_by_devid(dom, net_name, CIM_RES_TYPE_NET, &device); + if (device == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + free(device->dev.net.filter_ref); + device->dev.net.filter_ref = strdup(filter_name); + + if (update_device(dom, device) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update device"); + goto out; + } + + out: + free((char *)filter_name); + free(domain_name); + free((char *)device_name); + free(net_name); + + cleanup_filter(filter); + cleanup_virt_device(device); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +static CMPIStatus DeleteInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *filter_name = NULL; + struct acl_filter *filter = NULL; + CMPIObjectPath *dependent = NULL; + char *domain_name = NULL; + const char *device_name = NULL; + char *net_name = NULL; + struct virt_device *device = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + + if (cu_get_ref_path(reference, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &filter_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_path(reference, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.DeviceID property"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + get_device_by_devid(dom, net_name, CIM_RES_TYPE_NET, &device); + if (device == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + free(device->dev.net.filter_ref); + device->dev.net.filter_ref = NULL; + + if (update_device(dom, device) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update device"); + goto out; + } + + out: + free((char *)filter_name); + free(domain_name); + free((char *)device_name); + free(net_name); + + cleanup_filter(filter); + cleanup_virt_device(device); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +DEFAULT_MI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_AppliedFilterEntry, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_EntriesInFilterList.c b/src/Virt_EntriesInFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_EntriesInFilterList.c @@ -0,0 +1,214 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "Virt_FilterList.h" +#include "Virt_FilterEntry.h" + +static const CMPIBroker *_BROKER; + +/** + * given a filter, find all *direct* children + */ +static CMPIStatus list_to_rule( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + struct acl_filter *filter = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + name = CMGetCharsPtr(CMGetKey(reference, "Name", &s).value.string, &s); + if (s.rc != CMPI_RC_OK) + goto out; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) + goto out; + + for (i = 0; i < filter->rule_ct; i++) { + + CU_DEBUG("Processing %s", filter->rules[i]->name); + + s = instance_from_rule(_BROKER, + info->context, + reference, + filter->rules[i], + &instance); + + if (instance != NULL) { + inst_list_add(list, instance); + instance = NULL; + } + } + + cleanup_filter(filter); + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a rule, fine the parent filter + */ +static CMPIStatus rule_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *_list = NULL; + struct acl_filter *filter = NULL; + CMPIInstance *instance = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int count, i, j; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + name = CMGetCharsPtr(CMGetKey(reference, "Name", &s).value.string, &s); + if (s.rc != CMPI_RC_OK) + goto out; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &_list); + if (_list == NULL) + goto out; + + /* return the filter that contains the rule */ + for (i = 0; i < count; i++) { + for (j = 0; j < _list[i].rule_ct; j++) { + if (STREQC(name, _list[i].rules[j]->name)) { + CU_DEBUG("Processing %s,", _list[i].name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + &_list[i], + &instance); + + if (instance != NULL) + inst_list_add(list, instance); + + cleanup_filter(filter); + + filter = NULL; + instance = NULL; + } + + } + } + + out: + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *group_component[] = { + "KVM_FilterList", + NULL +}; + +static char *part_component[] = { + "KVM_Hdr8021Filter", + "KVM_IPHeadersFilter", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_EntriesInFilterList", + NULL +}; + +static struct std_assoc _list_to_rule = { + .source_class = (char **)&group_component, + .source_prop = "GroupComponent", + + .target_class = (char **)&part_component, + .target_prop = "PartComponent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_rule, + .make_ref = make_ref +}; + +static struct std_assoc _rule_to_list = { + .source_class = (char **)&part_component, + .source_prop = "PartComponent", + + .target_class = (char **)&group_component, + .target_prop = "GroupComponent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = rule_to_list, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_rule, + &_rule_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_EntriesInFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterEntry.c b/src/Virt_FilterEntry.c new file mode 100644 --- /dev/null +++ b/src/Virt_FilterEntry.c @@ -0,0 +1,886 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "xmlgen.h" + +#include "Virt_FilterEntry.h" +#include "Virt_HostSystem.h" + +const static CMPIBroker *_BROKER; + +static bool is_mac_rule(int type) +{ + if (type == MAC_RULE || type == ARP_RULE) + return 1; + + return 0; +} + +static bool is_ip_rule(int type) +{ + if (type == IP_RULE || type == TCP_RULE || type == ICMP_RULE || + type == IGMP_RULE) + return 1; + + return 0; +} + +static int octets_from_mac(const char * s, unsigned int *buffer, + unsigned int size) +{ + unsigned int _buffer[6]; + unsigned int i, ret; + + if ((s == 0) || (buffer == NULL) || (size < 6)) + return 0; + + ret = sscanf(s, "%x:%x:%x:%x:%x:%x", + &_buffer[0], &_buffer[1], &_buffer[2], + &_buffer[3], &_buffer[4], &_buffer[5]); + + for (i = 0; i < ret; i++) + buffer[i] = _buffer[i]; + + return ret; +} + +static int octets_from_ip(const char * s, unsigned int *buffer, + unsigned int size) +{ + struct in6_addr addr; + unsigned int family = 0; + unsigned int n = 0; + int i; + + if (s == 0) + return 0; + + family = strstr(s, ":") ? AF_INET6 : AF_INET; + n = family == AF_INET6 ? 16 : 4; + + if (size < n) + return 0; + + if (inet_pton(family, s, &addr)) { + n = n <= size ? n : size; + for (i = 0; i < n; i++) + buffer[i] = addr.s6_addr[i]; + } + + return n; +} + +static CMPIArray *octets_to_cmpi(unsigned int *bytes, int size) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIArray *array = NULL; + int i; + + if (bytes == 0 || size == 0) + return array; + + array = CMNewArray(_BROKER, size, CMPI_uint8, &s); + + for (i = 0; i < size; i++) { + s = CMSetArrayElementAt(array, i, + (CMPIValue*)&bytes[i], CMPI_uint8); + } + + return array; +} + +static int convert_direction(const char *s) +{ + enum {NOT_APPLICABLE, INPUT, OUTPUT, BOTH} direction = NOT_APPLICABLE; + + if (s != NULL) { + if (STREQC(s, "in")) + direction = INPUT; + else if (STREQC(s, "out")) + direction = OUTPUT; + else if (STREQC(s, "inout")) + direction = BOTH; + } + + return direction; +} + +static int convert_priority(const char *s) +{ + int priority = 0; + + if (s != NULL) { + priority = atoi(s); + } + + return priority; +} + +static int parse_rule_name(const char *name, char **filter, int *index) +{ + int ret; + + ret = sscanf(name, "%a[^:]:%u", filter, index); + if (ret != 2) { + free(*filter); + return 0; + } + + return 1; +} + + +static CMPIInstance *convert_mac_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction, priority = 0; + unsigned int bytes[48]; + unsigned int size = 0; + CMPIArray *array = NULL; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "Hdr8021Filter", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get 8021 filter instance"); + + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)rule->name, CMPI_chars); + + direction = convert_direction(rule->direction); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + priority = convert_priority(rule->priority); + CMSetProperty(inst, "Priority", (CMPIValue *)&priority, CMPI_uint16); + + size = octets_from_mac(rule->var.mac.srcmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMACAddr8021", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_mac(rule->var.mac.srcmacmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMACMask8021", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_mac(rule->var.mac.dstmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMACAddr8021", (CMPIValue *) + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_mac(rule->var.mac.dstmacmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMACMask8021", (CMPIValue *) + (CMPIValue *)&array, CMPI_uint8A); + + out: + return inst; +} + +static CMPIInstance *convert_ip_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction, priority = 0; + unsigned int bytes[48]; + unsigned int size = 0; + unsigned int n = 0; + CMPIArray *array = NULL; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "IPHeadersFilter", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get ip headers filter instance"); + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)rule->name, CMPI_chars); + + direction = convert_direction(rule->direction); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + priority = convert_priority(rule->priority); + CMSetProperty(inst, "Priority", (CMPIValue *)&priority, CMPI_uint16); + + if (strstr(rule->protocol_id, "v6")) + n = 6; + else + n = 4; + + CMSetProperty(inst, "HdrIPVersion",(CMPIValue *)&n, CMPI_uint8); + + if (rule->var.tcp.srcipfrom && rule->var.tcp.srcipto) { + size = octets_from_ip(rule->var.tcp.srcipfrom, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddress", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_ip(rule->var.tcp.srcipto, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddressEndOfRange", + (CMPIValue *)&array, CMPI_uint8A); + } else { + size = octets_from_ip(rule->var.tcp.srcmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddress", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_ip(rule->var.tcp.srcipmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMask", + (CMPIValue *)&array, CMPI_uint8A); + } + + if (rule->var.tcp.dstipfrom && rule->var.tcp.dstipto) { + size = octets_from_ip(rule->var.tcp.dstipfrom, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddress", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_ip(rule->var.tcp.dstipto, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddressEndOfRange", + (CMPIValue *)&array, CMPI_uint8A); + } else { + size = octets_from_ip(rule->var.tcp.dstipaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddress", + (CMPIValue *)&array, CMPI_uint8A); + + size = octets_from_ip(rule->var.tcp.dstipmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMask", + (CMPIValue *)&array, CMPI_uint8A); + } + + if ((rule->type == IP_RULE) || (rule->type == TCP_RULE)) { + if (rule->var.tcp.srcportstart) { + n = atoi(rule->var.tcp.srcportstart); + CMSetProperty(inst, "HdrSrcPortStart", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.srcportend) { + n = atoi(rule->var.tcp.srcportend); + CMSetProperty(inst, "HdrSrcPortEnd", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.dstportstart) { + n = atoi(rule->var.tcp.dstportstart); + CMSetProperty(inst, "HdrDestPortStart", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.dstportend) { + n = atoi(rule->var.tcp.dstportend); + CMSetProperty(inst, "HdrDestPortEnd", + (CMPIValue *)&n, CMPI_uint16); + } + } + + out: + return inst; +} + +static CMPIInstance *convert_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *instance = NULL; + + if (rule == NULL) + return NULL; + + if(is_mac_rule(rule->type)) { + instance = convert_mac_rule_to_instance(rule, + broker, + context, + reference, + s); + } + else if(is_ip_rule(rule->type)) { + instance = convert_ip_rule_to_instance(rule, + broker, + context, + reference, + s); + } + + return instance; +} + +static struct acl_rule *convert_instance_to_rule( + const CMPIInstance *instance) +{ + struct acl_rule *rule = NULL; + + return rule; +} + +CMPIStatus enum_filter_rules( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + struct acl_filter *filters = NULL; + int i, j, count = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + enum {NONE, MAC, IP, FILTER} class_type = NONE; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (STREQC(CLASSNAME(reference), "KVM_Hdr8021Filter")) + class_type = MAC; + else if (STREQC(CLASSNAME(reference), "KVM_IPHeadersFilter")) + class_type = IP; + else if (STREQC(CLASSNAME(reference), "KVM_FilterEntry")) + class_type = FILTER; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &filters); + + CU_DEBUG("Found %d filters", count); + + for (i = 0; i < count; i++) { + for (j = 0; j < filters[i].rule_ct; j++) { + CMPIInstance *instance = NULL; + + if (((class_type == NONE) || + (class_type == MAC)) && + is_mac_rule(filters[i].rules[j]->type)) { + instance = convert_mac_rule_to_instance( + filters[i].rules[j], + broker, + context, + reference, + &s); + } + else if (((class_type == NONE) || + (class_type == IP)) && + is_ip_rule(filters[i].rules[j]->type)) { + instance = convert_ip_rule_to_instance( + filters[i].rules[j], + broker, + context, + reference, + &s); + } + else + CU_DEBUG("Unrecognized rule type %u", + filters[i].rules[j]->type); + + if (instance != NULL) + inst_list_add(list, instance); + } + + } + + out: + cleanup_filters(&filters, count); + virConnectClose(conn); + + return s; +} + +CMPIStatus get_rule_by_ref( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *filter = NULL; + struct acl_rule *rule = NULL; + const char *name = NULL; + char *filter_name = NULL; + int rule_index; + virConnectPtr conn = NULL; + int ret, i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + ret = sscanf(name, "%a[^:]:%u", &filter_name, &rule_index); + if (ret != 2) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not parse filter name"); + goto out; + } + + CU_DEBUG("Filter name = %s, rule index = %u", filter_name, rule_index); + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve filter"); + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + if (rule_index == i) { + rule = filter->rules[i]; + break; + } + } + + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve rule"); + goto out; + } + + *instance = convert_rule_to_instance(rule, + broker, + context, + reference, + &s); + out: + free(filter_name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + + +CMPIStatus instance_from_rule( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_rule *rule, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + *instance = convert_rule_to_instance(rule, + broker, + context, + reference, + &s); + + return s; + +} + +static CMPIStatus GetInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + s = get_rule_by_ref(_BROKER, context, reference, &instance); + + if (instance != NULL) + CMReturnInstance(results, instance); + + return s; +} + +static CMPIStatus EnumInstanceNames( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_rules(_BROKER, context, reference, &list); + + cu_return_instance_names(results, &list); + + inst_list_free(&list); + + return s; +} + +static CMPIStatus EnumInstances( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_rules(_BROKER, context, reference, &list); + + cu_return_instances(results, &list); + + return s; +} + +static CMPIStatus CreateInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + virConnectPtr conn = NULL; + struct acl_filter *filter = NULL; + struct acl_rule *rule = NULL; + char *filter_name = NULL; + int index; + + /** Get Name from instance rather than reference since keys + * are set by this provider, not the client. + */ + if (cu_get_str_prop(instance, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Name property"); + goto out; + } + + if (parse_rule_name(name, &filter_name, &index) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to parse Name property"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, filter_name, &filter); + if (filter != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve parent filter"); + CU_DEBUG("%s:%s", s.msg, filter_name); + goto out; + } + + rule = convert_instance_to_rule(instance); + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to convert instance"); + goto out; + } + + append_filter_rule(filter, rule); + update_filter(conn, filter); + + out: + free(filter_name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +static CMPIStatus ModifyInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + struct acl_filter *filter = NULL; + struct acl_rule *rule = NULL; + const char *name = NULL; + char *filter_name = NULL; + int i, index; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + if (parse_rule_name(name, &filter_name, &index) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to parse Name property"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, filter_name, &filter); + if (filter != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve parent filter"); + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + if (index == i) { + rule = filter->rules[i]; + break; + } + } + + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve rule"); + goto out; + } + + /* TODO: Needs to be done so that previous instance is not + * removed if error occurs later + */ + remove_filter_rule(filter, rule); + cleanup_rule(rule); + + rule = convert_instance_to_rule(instance); + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to convert instance"); + goto out; + } + + append_filter_rule(filter, rule); + update_filter(conn, filter); + + out: + free(filter_name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +static CMPIStatus DeleteInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + virConnectPtr conn = NULL; + struct acl_filter *filter = NULL; + struct acl_rule *rule = NULL; + const char *name = NULL; + char *filter_name = NULL; + int i, index; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + if (parse_rule_name(name, &filter_name, &index) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to parse Name property"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, filter_name, &filter); + if (filter != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve parent filter"); + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + if (i == index) { + rule = filter->rules[i]; + break; + } + } + + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve rule"); + goto out; + } + + remove_filter_rule(filter, rule); + update_filter(conn, filter); + + out: + free(filter_name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_FilterEntry, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterEntry.h b/src/Virt_FilterEntry.h new file mode 100644 --- /dev/null +++ b/src/Virt_FilterEntry.h @@ -0,0 +1,85 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __VIRT_FILTERENTRY_H +#define __VIRT_FILTERENTRY_H + +/** + * Return a list of filter instances + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param list A pointer to an array of CMPIInstance objects + * (called inits before and frees after) + */ +CMPIStatus enum_filter_rules( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list); + +/** + * Return a single filter instance by reference + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param list A pointer to a CMPIInstance * + */ +CMPIStatus get_rule_by_ref( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance); + +/** + * Get an instance representing a filter rule + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param rule A pointer to a filter rule + * @param instance A pointer to a CMPIInstance * + */ +CMPIStatus instance_from_rule( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_rule *rule, + CMPIInstance **instance); + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterList.c b/src/Virt_FilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_FilterList.c @@ -0,0 +1,446 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "xmlgen.h" + +#include "Virt_FilterList.h" +#include "Virt_HostSystem.h" + +const static CMPIBroker *_BROKER; + +static CMPIInstance *convert_filter_to_instance( + struct acl_filter *filter, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction = 0; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "FilterList", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get filter list instance"); + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)filter->name, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)filter->uuid, + CMPI_chars); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + out: + return inst; +} + +static struct acl_filter *convert_instance_to_filter( + const CMPIInstance *instance, + const CMPIContext *context, + CMPIStatus *s) +{ + struct acl_filter *filter = NULL; + const char *name = NULL; + + if (cu_get_str_prop(instance, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, s, + CMPI_RC_ERR_FAILED, + "Unable to get Name property"); + goto out; + } + + filter = malloc(sizeof(*filter)); + if (filter == NULL) + goto out; + + memset(filter, 0, sizeof(*filter)); + filter->name = (char *)name; + + out: + return filter; +} + +CMPIStatus enum_filter_lists(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + struct acl_filter *filters = NULL; + int i, count = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + conn = connect_by_classname(broker, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &filters); + + CU_DEBUG("found %d filters", count); + + for (i = 0; i < count; i++) { + instance = convert_filter_to_instance(&filters[i], + broker, + context, + reference, + &s); + + if (instance != NULL) + inst_list_add(list, instance); + } + + out: + cleanup_filters(&filters, count); + virConnectClose(conn); + + return s; +} + +CMPIStatus get_filter_by_ref(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance) +{ + virConnectPtr conn = NULL; + struct acl_filter *filter = NULL; + + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(broker, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (Name)"); + goto out; + } + + s = instance_from_filter(broker, context, reference, filter, instance); + + out: + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +CMPIStatus instance_from_filter(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_filter *filter, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + *instance = convert_filter_to_instance(filter, broker, context, + reference, &s); + + return s; +} + +static CMPIStatus GetInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + s = get_filter_by_ref(_BROKER, context, reference, &instance); + + if (instance != NULL) + CMReturnInstance(results, instance); + + return s; +} + +static CMPIStatus EnumInstanceNames( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_lists(_BROKER, context, reference, &list); + + cu_return_instance_names(results, &list); + + inst_list_free(&list); + + return s; +} + +static CMPIStatus EnumInstances( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_lists(_BROKER, context, reference, &list); + + cu_return_instances(results, &list); + + inst_list_free(&list); + + return s; +} + +static CMPIStatus CreateInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + struct acl_filter *filter = NULL; + CMPIInstance *_instance = NULL; + virConnectPtr conn = NULL; + + /**Get Name from instance rather than reference since keys + * are set by this provider, not the client. + */ + if (cu_get_str_prop(instance, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Name property"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter != NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_ALREADY_EXISTS, + "Instance already exists"); + goto out; + } + + filter = convert_instance_to_filter(instance, context, &s); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to convert instance to filter"); + goto out; + } + + if (create_filter(conn, filter) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to create filter"); + goto out; + } + + cleanup_filter(filter); + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get filter"); + goto out; + } + + _instance = convert_filter_to_instance(filter, + _BROKER, + context, + reference, + &s); + + if(_instance != NULL) + cu_return_instance_name(results, _instance); + + CU_DEBUG("CreateInstance complete"); + + out: + free((char *)name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +static CMPIStatus ModifyInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + struct acl_filter *filter = NULL; + virConnectPtr conn = NULL; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Instance does not exist"); + goto out; + } + + filter = convert_instance_to_filter(instance, context, &s); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Failed to convert instance to filter"); + goto out; + } + + if (create_filter(conn, filter) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to create filter"); + goto out; + } + out: + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +static CMPIStatus DeleteInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + struct acl_filter *filter = NULL; + virConnectPtr conn = NULL; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Instance does not exist"); + goto out; + } + + delete_filter(conn, filter); + + out: + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_FilterList, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterList.h b/src/Virt_FilterList.h new file mode 100644 --- /dev/null +++ b/src/Virt_FilterList.h @@ -0,0 +1,87 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __VIRT_FILTERLIST_H +#define __VIRT_FILTERLIST_H + +#include "acl_parsing.h" + +/** + * Return a list of filter lists + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param list A pointer to an array of CMPIInstance objects + * (caller inits before and frees after) + */ +CMPIStatus enum_filter_lists( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list); + +/** + * Return a filter instance by reference + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param instance A pointer to a CMPIInstance * to place the new instance + */ +CMPIStatus get_filter_by_ref( + const CMPIBroker *broker, + const CMPIContext *contest, + const CMPIObjectPath *reference, + CMPIInstance **instance); + +/** + * Return a list of filter lists + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param filter A pointer to a acl_filter + * @param instance A pointer to a CMPIInstance * to place the new instance + */ +CMPIStatus instance_from_filter( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_filter *filter, + CMPIInstance **instance); + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_HostedFilterList.c b/src/Virt_HostedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_HostedFilterList.c @@ -0,0 +1,144 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include "misc_util.h" +#include "Virt_HostSystem.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +static CMPIStatus host_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + /* validate host reference */ + s = get_host(_BROKER, info->context, reference, &instance, false); + if (s.rc != CMPI_RC_OK) + goto out; + + s = cu_validate_ref(_BROKER, reference, instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_filter_lists(_BROKER, info->context, reference, list); + + out: + return s; +} + +static CMPIStatus list_to_host( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + /* validate filter reference */ + s = get_filter_by_ref(_BROKER, info->context, reference, &instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s = get_host(_BROKER, info->context, reference, &instance, false); + if (s.rc != CMPI_RC_OK) + goto out; + + if (instance != NULL) + inst_list_add(list, instance); + + out: + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_HostSystem", + NULL +}; + +static char *dependent[] = { + "KVM_FilterList", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_HostedFilterList", + NULL +}; + +static struct std_assoc _host_to_list = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = host_to_list, + .make_ref = make_ref +}; + +static struct std_assoc _list_to_host = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_host, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_host_to_list, + &_list_to_host, + NULL +}; + +STDA_AssocMIStub(, + Virt_HostedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_NestedFilterList.c b/src/Virt_NestedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_NestedFilterList.c @@ -0,0 +1,503 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include +#include + +/* FIXME: This seems to be needed to compile STREQC, which suggests + * libcmpiutil.h needs to add the include since the marco is defined there. + */ +#include +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference property of an instance + * + * @param inst The instance + * @param prop The property name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_prop(const CMPIInstance *instance, + const char *prop, + CMPIObjectPath **reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetProperty(instance, prop, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + if ((value.type != CMPI_ref) || CMIsNullObject(value.value.ref)) + return CMPI_RC_ERR_TYPE_MISMATCH; + + *reference = value.value.ref; + + return CMPI_RC_OK; +} + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference component of an object path + * + * @param _reference The reference + * @param key The key name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_path(const CMPIObjectPath *reference, + const char *key, + CMPIObjectPath **_reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetKey(reference, key, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + /* how to parse and object path? */ + + return CMPI_RC_OK; +} + + +/** + * given a filter, find all *direct* filter_refs + */ +static CMPIStatus parent_to_child( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *parent_filter = NULL; + struct acl_filter *child_filter = NULL; + CMPIInstance *instance = NULL; + const char * name = NULL; + virConnectPtr conn = NULL; + int i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &parent_filter); + if (parent_filter == NULL) + goto out; + + for (i = 0; i < parent_filter->ref_ct; i++) { + get_filter_by_name(conn, parent_filter->refs[i], + &child_filter); + if (child_filter == NULL) + continue; + + CU_DEBUG("Processing %s,", child_filter->name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + child_filter, + &instance); + + if (instance != NULL) { + CU_DEBUG("Adding instance to inst_list"); + inst_list_add(list, instance); + } + + cleanup_filter(child_filter); + + child_filter = NULL; + instance = NULL; + } + + cleanup_filter(parent_filter); + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a filter, find all the other filters that reference it + */ +static CMPIStatus child_to_parent( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *_list = NULL; + CMPIInstance *instance = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int count, i, j; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* TODO: Ensure the referenced filter exists */ + + count = get_filters(conn, &_list); + if (_list == NULL) + goto out; + + /* return any filter that has name in refs */ + for (i = 0; i < count; i++) { + for (j = 0; j < _list[i].ref_ct; j++) { + if (STREQC(name, _list[i].refs[j])) { + CU_DEBUG("Processing %s,", _list[i].name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + &_list[i], + &instance); + + if (instance != NULL) + inst_list_add(list, instance); + + instance = NULL; + } + + } + + cleanup_filter(&_list[i]); + } + + free(_list); + + out: + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_FilterList", + NULL +}; + +static char *dependent[] = { + "KVM_FilterList", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_NestedFilterList", + NULL +}; + +static struct std_assoc _list_to_filter_ref = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = parent_to_child, + .make_ref = make_ref +}; + +static struct std_assoc _filter_ref_to_list = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = child_to_parent, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_filter_ref, + &_filter_ref_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_NestedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +DEFAULT_GI(); +DEFAULT_EIN(); +DEFAULT_EI(); + +static CMPIStatus CreateInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *parent_name = NULL; + struct acl_filter *parent_filter = NULL; + CMPIObjectPath *dependent = NULL; + const char *child_name = NULL; + struct acl_filter *child_filter = NULL; + virConnectPtr conn = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + if (cu_get_ref_prop(instance, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &parent_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, parent_name, &parent_filter); + if (parent_filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_prop(instance, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &child_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.Name property"); + goto out; + } + + get_filter_by_name(conn, child_name, &child_filter); + if (child_filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + char *dup = strdup(child_name); + + if (append_filter_ref(parent_filter, dup) == 0) { + free(dup); + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to append filter reference"); + goto out; + } + + if (update_filter(conn, parent_filter) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update filter"); + goto out; + } + + out: + free((char *)parent_name); + free((char *)child_name); + + cleanup_filter(parent_filter); + cleanup_filter(child_filter); + + virConnectClose(conn); + + return s; +} + +static CMPIStatus DeleteInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *parent_name = NULL; + struct acl_filter *parent_filter = NULL; + CMPIObjectPath *dependent = NULL; + const char *child_name = NULL; + struct acl_filter *child_filter = NULL; + virConnectPtr conn = NULL; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + if (cu_get_ref_path(reference, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &parent_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, parent_name, &parent_filter); + if (parent_filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_path(reference, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &child_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.Name property"); + goto out; + } + + get_filter_by_name(conn, child_name, &child_filter); + if (child_filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + if (remove_filter_ref(parent_filter, child_name) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to remove filter reference"); + goto out; + } + + if (update_filter(conn, parent_filter) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update filter"); + goto out; + } + + out: + free((char *)parent_name); + free((char *)child_name); + + cleanup_filter(parent_filter); + cleanup_filter(child_filter); + + virConnectClose(conn); + + return s; +} + + +DEFAULT_MI(); + +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_AppliedFilterEntry, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ + From eblima at linux.vnet.ibm.com Wed May 25 14:32:03 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Wed, 25 May 2011 11:32:03 -0300 Subject: [Libvirt-cim] [PATCH] #2 Fix file permissions Message-ID: <12538a8f8fee7574119b.1306333923@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306261772 10800 # Node ID 12538a8f8fee7574119b4b16411ea80e6cda0ec2 # Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1 Fix file permissions Removing exec flag from source code files. Changes from #1 - Added .hgtags to the patch Signed-off-by: Eduardo Lima (Etrunko) diff --git a/.hgtags b/.hgtags old mode 100755 new mode 100644 diff --git a/Makefile.am b/Makefile.am old mode 100755 new mode 100644 diff --git a/README b/README old mode 100755 new mode 100644 diff --git a/acinclude.m4 b/acinclude.m4 old mode 100755 new mode 100644 diff --git a/base_schema/Makefile.am b/base_schema/Makefile.am old mode 100755 new mode 100644 diff --git a/base_schema/install_base_schema.sh.in b/base_schema/install_base_schema.sh.in old mode 100755 new mode 100644 diff --git a/configure.ac b/configure.ac old mode 100755 new mode 100644 diff --git a/doc/CodingStyle b/doc/CodingStyle old mode 100755 new mode 100644 diff --git a/doc/Makefile.am b/doc/Makefile.am old mode 100755 new mode 100644 diff --git a/doc/libvirt-cim.html b/doc/libvirt-cim.html old mode 100755 new mode 100644 diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in old mode 100755 new mode 100644 diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am old mode 100755 new mode 100644 diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c old mode 100755 new mode 100644 diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h old mode 100755 new mode 100644 diff --git a/libxkutil/infostore.c b/libxkutil/infostore.c old mode 100755 new mode 100644 diff --git a/libxkutil/misc_util.c b/libxkutil/misc_util.c old mode 100755 new mode 100644 diff --git a/libxkutil/misc_util.h b/libxkutil/misc_util.h old mode 100755 new mode 100644 diff --git a/libxkutil/xml_parse_test.c b/libxkutil/xml_parse_test.c old mode 100755 new mode 100644 diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c old mode 100755 new mode 100644 diff --git a/schema/AllocationCapabilities.registration b/schema/AllocationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystem.registration b/schema/ComputerSystem.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemIndication.registration b/schema/ComputerSystemIndication.registration old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemMigrationIndication.mof b/schema/ComputerSystemMigrationIndication.mof old mode 100755 new mode 100644 diff --git a/schema/ComputerSystemMigrationIndication.registration b/schema/ComputerSystemMigrationIndication.registration old mode 100755 new mode 100644 diff --git a/schema/ConcreteComponent.registration b/schema/ConcreteComponent.registration old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionService.mof b/schema/ConsoleRedirectionService.mof old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionService.registration b/schema/ConsoleRedirectionService.registration old mode 100755 new mode 100644 diff --git a/schema/ConsoleRedirectionServiceCapabilities.registration b/schema/ConsoleRedirectionServiceCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/DiskPool.registration b/schema/DiskPool.registration old mode 100755 new mode 100644 diff --git a/schema/ElementAllocatedFromPool.registration b/schema/ElementAllocatedFromPool.registration old mode 100755 new mode 100644 diff --git a/schema/ElementConformsToProfile.registration b/schema/ElementConformsToProfile.registration old mode 100755 new mode 100644 diff --git a/schema/ElementSettingData.mof b/schema/ElementSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/ElementSettingData.registration b/schema/ElementSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/EnabledLogicalElementCapabilities.registration b/schema/EnabledLogicalElementCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/GraphicsPool.mof b/schema/GraphicsPool.mof old mode 100755 new mode 100644 diff --git a/schema/GraphicsPool.registration b/schema/GraphicsPool.registration old mode 100755 new mode 100644 diff --git a/schema/HostSystem.registration b/schema/HostSystem.registration old mode 100755 new mode 100644 diff --git a/schema/HostedAccessPoint.mof b/schema/HostedAccessPoint.mof old mode 100755 new mode 100644 diff --git a/schema/HostedAccessPoint.registration b/schema/HostedAccessPoint.registration old mode 100755 new mode 100644 diff --git a/schema/HostedDependency.mof b/schema/HostedDependency.mof old mode 100755 new mode 100644 diff --git a/schema/HostedDependency.registration b/schema/HostedDependency.registration old mode 100755 new mode 100644 diff --git a/schema/HostedResourcePool.registration b/schema/HostedResourcePool.registration old mode 100755 new mode 100644 diff --git a/schema/HostedService.registration b/schema/HostedService.registration old mode 100755 new mode 100644 diff --git a/schema/InputPool.mof b/schema/InputPool.mof old mode 100755 new mode 100644 diff --git a/schema/InputPool.registration b/schema/InputPool.registration old mode 100755 new mode 100644 diff --git a/schema/KVMRedirectionSAP.mof b/schema/KVMRedirectionSAP.mof old mode 100755 new mode 100644 diff --git a/schema/KVMRedirectionSAP.registration b/schema/KVMRedirectionSAP.registration old mode 100755 new mode 100644 diff --git a/schema/LogicalDisk.registration b/schema/LogicalDisk.registration old mode 100755 new mode 100644 diff --git a/schema/Memory.registration b/schema/Memory.registration old mode 100755 new mode 100644 diff --git a/schema/MemoryPool.registration b/schema/MemoryPool.registration old mode 100755 new mode 100644 diff --git a/schema/NetPool.registration b/schema/NetPool.registration old mode 100755 new mode 100644 diff --git a/schema/NetworkPort.registration b/schema/NetworkPort.registration old mode 100755 new mode 100644 diff --git a/schema/Processor.registration b/schema/Processor.registration old mode 100755 new mode 100644 diff --git a/schema/ProcessorPool.registration b/schema/ProcessorPool.registration old mode 100755 new mode 100644 diff --git a/schema/ReferencedProfile.mof b/schema/ReferencedProfile.mof old mode 100755 new mode 100644 diff --git a/schema/ReferencedProfile.registration b/schema/ReferencedProfile.registration old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationFromPool.registration b/schema/ResourceAllocationFromPool.registration old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/ResourceAllocationSettingData.registration b/schema/ResourceAllocationSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/ResourcePoolConfigurationCapabilities.registration b/schema/ResourcePoolConfigurationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/ResourcePoolConfigurationService.registration b/schema/ResourcePoolConfigurationService.registration old mode 100755 new mode 100644 diff --git a/schema/ServiceAccessBySAP.mof b/schema/ServiceAccessBySAP.mof old mode 100755 new mode 100644 diff --git a/schema/ServiceAccessBySAP.registration b/schema/ServiceAccessBySAP.registration old mode 100755 new mode 100644 diff --git a/schema/SettingsDefineCapabilities.registration b/schema/SettingsDefineCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/SettingsDefineState.registration b/schema/SettingsDefineState.registration old mode 100755 new mode 100644 diff --git a/schema/SystemDevice.registration b/schema/SystemDevice.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationCapabilities.mof b/schema/VSMigrationCapabilities.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationCapabilities.registration b/schema/VSMigrationCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationService.mof b/schema/VSMigrationService.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationService.registration b/schema/VSMigrationService.registration old mode 100755 new mode 100644 diff --git a/schema/VSMigrationSettingData.mof b/schema/VSMigrationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/VSMigrationSettingData.registration b/schema/VSMigrationSettingData.registration old mode 100755 new mode 100644 diff --git a/schema/VSSD.mof b/schema/VSSD.mof old mode 100755 new mode 100644 diff --git a/schema/VSSD.registration b/schema/VSSD.registration old mode 100755 new mode 100644 diff --git a/schema/VSSDComponent.mof b/schema/VSSDComponent.mof old mode 100755 new mode 100644 diff --git a/schema/VSSDComponent.registration b/schema/VSSDComponent.registration old mode 100755 new mode 100644 diff --git a/schema/Virt_ResourceAllocationSettingData.mof b/schema/Virt_ResourceAllocationSettingData.mof old mode 100755 new mode 100644 diff --git a/schema/Virt_VSSD.mof b/schema/Virt_VSSD.mof old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemManagementCapabilities.registration b/schema/VirtualSystemManagementCapabilities.registration old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemManagementService.registration b/schema/VirtualSystemManagementService.registration old mode 100755 new mode 100644 diff --git a/schema/VirtualSystemSnapshotService.mof b/schema/VirtualSystemSnapshotService.mof old mode 100755 new mode 100644 diff --git a/src/Makefile.am b/src/Makefile.am old mode 100755 new mode 100644 diff --git a/src/Virt_AllocationCapabilities.c b/src/Virt_AllocationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_AllocationCapabilities.h b/src/Virt_AllocationCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystem.h b/src/Virt_ComputerSystem.h old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c old mode 100755 new mode 100644 diff --git a/src/Virt_ComputerSystemMigrationIndication.c b/src/Virt_ComputerSystemMigrationIndication.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConcreteComponent.c b/src/Virt_ConcreteComponent.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionService.c b/src/Virt_ConsoleRedirectionService.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.c b/src/Virt_ConsoleRedirectionServiceCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.h b/src/Virt_ConsoleRedirectionServiceCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_Device.c b/src/Virt_Device.c old mode 100755 new mode 100644 diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c old mode 100755 new mode 100644 diff --git a/src/Virt_DevicePool.h b/src/Virt_DevicePool.h old mode 100755 new mode 100644 diff --git a/src/Virt_ElementAllocatedFromPool.c b/src/Virt_ElementAllocatedFromPool.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementCapabilities.c b/src/Virt_ElementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementConformsToProfile.c b/src/Virt_ElementConformsToProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_ElementSettingData.c b/src/Virt_ElementSettingData.c old mode 100755 new mode 100644 diff --git a/src/Virt_EnabledLogicalElementCapabilities.c b/src/Virt_EnabledLogicalElementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostSystem.c b/src/Virt_HostSystem.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostSystem.h b/src/Virt_HostSystem.h old mode 100755 new mode 100644 diff --git a/src/Virt_HostedAccessPoint.c b/src/Virt_HostedAccessPoint.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedDependency.c b/src/Virt_HostedDependency.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedResourcePool.c b/src/Virt_HostedResourcePool.c old mode 100755 new mode 100644 diff --git a/src/Virt_HostedService.c b/src/Virt_HostedService.c old mode 100755 new mode 100644 diff --git a/src/Virt_KVMRedirectionSAP.c b/src/Virt_KVMRedirectionSAP.c old mode 100755 new mode 100644 diff --git a/src/Virt_KVMRedirectionSAP.h b/src/Virt_KVMRedirectionSAP.h old mode 100755 new mode 100644 diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c old mode 100755 new mode 100644 diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h old mode 100755 new mode 100644 diff --git a/src/Virt_ReferencedProfile.c b/src/Virt_ReferencedProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_RegisteredProfile.c b/src/Virt_RegisteredProfile.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourceAllocationFromPool.c b/src/Virt_ResourceAllocationFromPool.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationCapabilities.c b/src/Virt_ResourcePoolConfigurationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationService.c b/src/Virt_ResourcePoolConfigurationService.c old mode 100755 new mode 100644 diff --git a/src/Virt_ResourcePoolConfigurationService.h b/src/Virt_ResourcePoolConfigurationService.h old mode 100755 new mode 100644 diff --git a/src/Virt_ServiceAccessBySAP.c b/src/Virt_ServiceAccessBySAP.c old mode 100755 new mode 100644 diff --git a/src/Virt_ServiceAffectsElement.c b/src/Virt_ServiceAffectsElement.c old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineCapabilities.h b/src/Virt_SettingsDefineCapabilities.h old mode 100755 new mode 100644 diff --git a/src/Virt_SettingsDefineState.c b/src/Virt_SettingsDefineState.c old mode 100755 new mode 100644 diff --git a/src/Virt_SystemDevice.c b/src/Virt_SystemDevice.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationCapabilities.c b/src/Virt_VSMigrationCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationService.h b/src/Virt_VSMigrationService.h old mode 100755 new mode 100644 diff --git a/src/Virt_VSMigrationSettingData.c b/src/Virt_VSMigrationSettingData.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSSD.c b/src/Virt_VSSD.c old mode 100755 new mode 100644 diff --git a/src/Virt_VSSDComponent.c b/src/Virt_VSSDComponent.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementCapabilities.c b/src/Virt_VirtualSystemManagementCapabilities.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemManagementService.h b/src/Virt_VirtualSystemManagementService.h old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemSnapshotService.c b/src/Virt_VirtualSystemSnapshotService.c old mode 100755 new mode 100644 diff --git a/src/Virt_VirtualSystemSnapshotService.h b/src/Virt_VirtualSystemSnapshotService.h old mode 100755 new mode 100644 diff --git a/src/profiles.h b/src/profiles.h old mode 100755 new mode 100644 diff --git a/src/svpc_types.h b/src/svpc_types.h old mode 100755 new mode 100644 From cvincent at linux.vnet.ibm.com Wed May 25 19:06:36 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 25 May 2011 15:06:36 -0400 Subject: [Libvirt-cim] [PATCH] Update .hgignore In-Reply-To: References: Message-ID: <4DDD533C.9050201@linux.vnet.ibm.com> +1. Pushed. On 05/24/2011 04:04 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1306267369 10800 > # Node ID a93bab93b304329e9f63d50a8d46cab427271c8d > # Parent 86998e0d6368e290e34ba61985b9d19cbeb7fef3 > Update .hgignore > > Signed-off-by: Eduardo Lima (Etrunko) > > diff -r 86998e0d6368 -r a93bab93b304 .hgignore > --- a/.hgignore Tue May 24 15:29:32 2011 -0300 > +++ b/.hgignore Tue May 24 17:02:49 2011 -0300 > @@ -7,6 +7,13 @@ > *~ > *.o > tests/*.err > +doc/*.html > +.changeset > +.revision > +*.spec > +xml_parse_test > +cim_schema_*.zip > +install_base_schema.sh > > syntax: regexp > .*\#.*\#$ > @@ -33,4 +40,4 @@ > .*\.loT$ > ^acinclude.m4.orig$ > ^config.h.in$ > -libcmpiutil/doc/html/.*% > \ No newline at end of file > +libcmpiutil/doc/html/.*% > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Wed May 25 19:20:47 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Wed, 25 May 2011 15:20:47 -0400 Subject: [Libvirt-cim] [PATCH] #2 Fix file permissions In-Reply-To: <12538a8f8fee7574119b.1306333923@etrunko-t410.br.ibm.com> References: <12538a8f8fee7574119b.1306333923@etrunko-t410.br.ibm.com> Message-ID: <4DDD568F.5050302@linux.vnet.ibm.com> Nice to see all the src files with the same permissions. +1. Pushed. On 05/25/2011 10:32 AM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1306261772 10800 > # Node ID 12538a8f8fee7574119b4b16411ea80e6cda0ec2 > # Parent f51a1ccadbcce1c7f9ba6268267866f7721420c1 > Fix file permissions > > Removing exec flag from source code files. > > Changes from #1 > - Added .hgtags to the patch > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/.hgtags b/.hgtags > old mode 100755 > new mode 100644 > diff --git a/Makefile.am b/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/README b/README > old mode 100755 > new mode 100644 > diff --git a/acinclude.m4 b/acinclude.m4 > old mode 100755 > new mode 100644 > diff --git a/base_schema/Makefile.am b/base_schema/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/base_schema/install_base_schema.sh.in b/base_schema/install_base_schema.sh.in > old mode 100755 > new mode 100644 > diff --git a/configure.ac b/configure.ac > old mode 100755 > new mode 100644 > diff --git a/doc/CodingStyle b/doc/CodingStyle > old mode 100755 > new mode 100644 > diff --git a/doc/Makefile.am b/doc/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/doc/libvirt-cim.html b/doc/libvirt-cim.html > old mode 100755 > new mode 100644 > diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in > old mode 100755 > new mode 100644 > diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c > old mode 100755 > new mode 100644 > diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h > old mode 100755 > new mode 100644 > diff --git a/libxkutil/infostore.c b/libxkutil/infostore.c > old mode 100755 > new mode 100644 > diff --git a/libxkutil/misc_util.c b/libxkutil/misc_util.c > old mode 100755 > new mode 100644 > diff --git a/libxkutil/misc_util.h b/libxkutil/misc_util.h > old mode 100755 > new mode 100644 > diff --git a/libxkutil/xml_parse_test.c b/libxkutil/xml_parse_test.c > old mode 100755 > new mode 100644 > diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c > old mode 100755 > new mode 100644 > diff --git a/schema/AllocationCapabilities.registration b/schema/AllocationCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ComputerSystem.registration b/schema/ComputerSystem.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ComputerSystemIndication.registration b/schema/ComputerSystemIndication.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ComputerSystemMigrationIndication.mof b/schema/ComputerSystemMigrationIndication.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ComputerSystemMigrationIndication.registration b/schema/ComputerSystemMigrationIndication.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ConcreteComponent.registration b/schema/ConcreteComponent.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ConsoleRedirectionService.mof b/schema/ConsoleRedirectionService.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ConsoleRedirectionService.registration b/schema/ConsoleRedirectionService.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ConsoleRedirectionServiceCapabilities.registration b/schema/ConsoleRedirectionServiceCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/DiskPool.registration b/schema/DiskPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ElementAllocatedFromPool.registration b/schema/ElementAllocatedFromPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ElementConformsToProfile.registration b/schema/ElementConformsToProfile.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ElementSettingData.mof b/schema/ElementSettingData.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ElementSettingData.registration b/schema/ElementSettingData.registration > old mode 100755 > new mode 100644 > diff --git a/schema/EnabledLogicalElementCapabilities.registration b/schema/EnabledLogicalElementCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/GraphicsPool.mof b/schema/GraphicsPool.mof > old mode 100755 > new mode 100644 > diff --git a/schema/GraphicsPool.registration b/schema/GraphicsPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/HostSystem.registration b/schema/HostSystem.registration > old mode 100755 > new mode 100644 > diff --git a/schema/HostedAccessPoint.mof b/schema/HostedAccessPoint.mof > old mode 100755 > new mode 100644 > diff --git a/schema/HostedAccessPoint.registration b/schema/HostedAccessPoint.registration > old mode 100755 > new mode 100644 > diff --git a/schema/HostedDependency.mof b/schema/HostedDependency.mof > old mode 100755 > new mode 100644 > diff --git a/schema/HostedDependency.registration b/schema/HostedDependency.registration > old mode 100755 > new mode 100644 > diff --git a/schema/HostedResourcePool.registration b/schema/HostedResourcePool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/HostedService.registration b/schema/HostedService.registration > old mode 100755 > new mode 100644 > diff --git a/schema/InputPool.mof b/schema/InputPool.mof > old mode 100755 > new mode 100644 > diff --git a/schema/InputPool.registration b/schema/InputPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/KVMRedirectionSAP.mof b/schema/KVMRedirectionSAP.mof > old mode 100755 > new mode 100644 > diff --git a/schema/KVMRedirectionSAP.registration b/schema/KVMRedirectionSAP.registration > old mode 100755 > new mode 100644 > diff --git a/schema/LogicalDisk.registration b/schema/LogicalDisk.registration > old mode 100755 > new mode 100644 > diff --git a/schema/Memory.registration b/schema/Memory.registration > old mode 100755 > new mode 100644 > diff --git a/schema/MemoryPool.registration b/schema/MemoryPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/NetPool.registration b/schema/NetPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/NetworkPort.registration b/schema/NetworkPort.registration > old mode 100755 > new mode 100644 > diff --git a/schema/Processor.registration b/schema/Processor.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ProcessorPool.registration b/schema/ProcessorPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ReferencedProfile.mof b/schema/ReferencedProfile.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ReferencedProfile.registration b/schema/ReferencedProfile.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ResourceAllocationFromPool.registration b/schema/ResourceAllocationFromPool.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ResourceAllocationSettingData.mof b/schema/ResourceAllocationSettingData.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ResourceAllocationSettingData.registration b/schema/ResourceAllocationSettingData.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ResourcePoolConfigurationCapabilities.registration b/schema/ResourcePoolConfigurationCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ResourcePoolConfigurationService.registration b/schema/ResourcePoolConfigurationService.registration > old mode 100755 > new mode 100644 > diff --git a/schema/ServiceAccessBySAP.mof b/schema/ServiceAccessBySAP.mof > old mode 100755 > new mode 100644 > diff --git a/schema/ServiceAccessBySAP.registration b/schema/ServiceAccessBySAP.registration > old mode 100755 > new mode 100644 > diff --git a/schema/SettingsDefineCapabilities.registration b/schema/SettingsDefineCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/SettingsDefineState.registration b/schema/SettingsDefineState.registration > old mode 100755 > new mode 100644 > diff --git a/schema/SystemDevice.registration b/schema/SystemDevice.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationCapabilities.mof b/schema/VSMigrationCapabilities.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationCapabilities.registration b/schema/VSMigrationCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationService.mof b/schema/VSMigrationService.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationService.registration b/schema/VSMigrationService.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationSettingData.mof b/schema/VSMigrationSettingData.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VSMigrationSettingData.registration b/schema/VSMigrationSettingData.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VSSD.mof b/schema/VSSD.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VSSD.registration b/schema/VSSD.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VSSDComponent.mof b/schema/VSSDComponent.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VSSDComponent.registration b/schema/VSSDComponent.registration > old mode 100755 > new mode 100644 > diff --git a/schema/Virt_ResourceAllocationSettingData.mof b/schema/Virt_ResourceAllocationSettingData.mof > old mode 100755 > new mode 100644 > diff --git a/schema/Virt_VSSD.mof b/schema/Virt_VSSD.mof > old mode 100755 > new mode 100644 > diff --git a/schema/VirtualSystemManagementCapabilities.registration b/schema/VirtualSystemManagementCapabilities.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VirtualSystemManagementService.registration b/schema/VirtualSystemManagementService.registration > old mode 100755 > new mode 100644 > diff --git a/schema/VirtualSystemSnapshotService.mof b/schema/VirtualSystemSnapshotService.mof > old mode 100755 > new mode 100644 > diff --git a/src/Makefile.am b/src/Makefile.am > old mode 100755 > new mode 100644 > diff --git a/src/Virt_AllocationCapabilities.c b/src/Virt_AllocationCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_AllocationCapabilities.h b/src/Virt_AllocationCapabilities.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ComputerSystem.c b/src/Virt_ComputerSystem.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ComputerSystem.h b/src/Virt_ComputerSystem.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ComputerSystemIndication.c b/src/Virt_ComputerSystemIndication.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ComputerSystemMigrationIndication.c b/src/Virt_ComputerSystemMigrationIndication.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ConcreteComponent.c b/src/Virt_ConcreteComponent.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ConsoleRedirectionService.c b/src/Virt_ConsoleRedirectionService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.c b/src/Virt_ConsoleRedirectionServiceCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ConsoleRedirectionServiceCapabilities.h b/src/Virt_ConsoleRedirectionServiceCapabilities.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_Device.c b/src/Virt_Device.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_DevicePool.h b/src/Virt_DevicePool.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ElementAllocatedFromPool.c b/src/Virt_ElementAllocatedFromPool.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ElementCapabilities.c b/src/Virt_ElementCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ElementConformsToProfile.c b/src/Virt_ElementConformsToProfile.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ElementSettingData.c b/src/Virt_ElementSettingData.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_EnabledLogicalElementCapabilities.c b/src/Virt_EnabledLogicalElementCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostSystem.c b/src/Virt_HostSystem.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostSystem.h b/src/Virt_HostSystem.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostedAccessPoint.c b/src/Virt_HostedAccessPoint.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostedDependency.c b/src/Virt_HostedDependency.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostedResourcePool.c b/src/Virt_HostedResourcePool.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_HostedService.c b/src/Virt_HostedService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_KVMRedirectionSAP.c b/src/Virt_KVMRedirectionSAP.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_KVMRedirectionSAP.h b/src/Virt_KVMRedirectionSAP.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_RASD.c b/src/Virt_RASD.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_RASD.h b/src/Virt_RASD.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ReferencedProfile.c b/src/Virt_ReferencedProfile.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_RegisteredProfile.c b/src/Virt_RegisteredProfile.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ResourceAllocationFromPool.c b/src/Virt_ResourceAllocationFromPool.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ResourcePoolConfigurationCapabilities.c b/src/Virt_ResourcePoolConfigurationCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ResourcePoolConfigurationService.c b/src/Virt_ResourcePoolConfigurationService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ResourcePoolConfigurationService.h b/src/Virt_ResourcePoolConfigurationService.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ServiceAccessBySAP.c b/src/Virt_ServiceAccessBySAP.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_ServiceAffectsElement.c b/src/Virt_ServiceAffectsElement.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_SettingsDefineCapabilities.c b/src/Virt_SettingsDefineCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_SettingsDefineCapabilities.h b/src/Virt_SettingsDefineCapabilities.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_SettingsDefineState.c b/src/Virt_SettingsDefineState.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_SystemDevice.c b/src/Virt_SystemDevice.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSMigrationCapabilities.c b/src/Virt_VSMigrationCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSMigrationService.c b/src/Virt_VSMigrationService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSMigrationService.h b/src/Virt_VSMigrationService.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSMigrationSettingData.c b/src/Virt_VSMigrationSettingData.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSSD.c b/src/Virt_VSSD.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VSSDComponent.c b/src/Virt_VSSDComponent.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VirtualSystemManagementCapabilities.c b/src/Virt_VirtualSystemManagementCapabilities.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VirtualSystemManagementService.c b/src/Virt_VirtualSystemManagementService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VirtualSystemManagementService.h b/src/Virt_VirtualSystemManagementService.h > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VirtualSystemSnapshotService.c b/src/Virt_VirtualSystemSnapshotService.c > old mode 100755 > new mode 100644 > diff --git a/src/Virt_VirtualSystemSnapshotService.h b/src/Virt_VirtualSystemSnapshotService.h > old mode 100755 > new mode 100644 > diff --git a/src/profiles.h b/src/profiles.h > old mode 100755 > new mode 100644 > diff --git a/src/svpc_types.h b/src/svpc_types.h > old mode 100755 > new mode 100644 > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com From cvincent at linux.vnet.ibm.com Fri May 27 05:08:43 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Fri, 27 May 2011 01:08:43 -0400 Subject: [Libvirt-cim] [PATCH] (#2) Add DCN ACL classes & providers Message-ID: <68e37b55a0687ca55554.1306472923@oc0840652111.ibm.com> # HG changeset patch # User Chip Vincent # Date 1305221061 14400 # Node ID 68e37b55a0687ca55554ca84c79c3358c05aee90 # Parent 8e7c9a8ad1f9e5bf6765c89a36ccca43f0564934 (#2) Add DCN ACL classes & providers Changes in this version: #2 - Scoped code to primary use case: link network interfaces to existing fitlers. - Updated copyright year in a few places. - Fixed octets_to_cmpi() to work when called from an associattion provider This patch adds several new classes and providers to add support for filter rules and filter lists. The patch is rather large since all aspects are intertwined. Here's an overview of the implementation: libxkutil: The instrumentation is implemented in acl_parsing.c/.h since this function is essentially independent of the device and/or pool parsing. ACLs are associated to devices (via filterref) so there are some minor changes in device_parsing.c & xmlgen.c to support this. +libxkutil/acl_parsing.h & .c Adds several new structures to represent filters and rules. Since rules can only exist within the context of a filter, the main structure used in the APIs is acl_fitler. Also adds several new APIs to libxkutil to allow providers (see below) to convert acl_filter and acl_rule structures to CIM objects, and to support associations between themselves and existing resource (host system & network port). schema & providers: The ACL function does not map to an exiting profile so a subset of the classes defined in the CIM Network schema are used. +schema/FilterEntry.mof &.registration +src/FilterEntry.h & .c Adds two new classes to represent IP-level rules (IPHeadersFilter) and MAC-level (Hdr8021Filter). These classes include two new properties to surface libvirt features not defined by the schema (Direction & Priority). +schema/FilterList.mof & .registration +src/FilterList.h & .c Adds a class to represent ACL filters (FilterList) NOTE: Read-write. Requires Name property only. +schema/EntriesInFilterList.mof & .registration +src/EntriesInFilterList.c Adds a class to represent the relationship (association) between a filter (FilterList) and the rules it contains (IPHeadersFilter or Hdr8021Filter). +schema/NestedFilterList.mof & .registration +src/NestedFilterList.c Adds a class to represent filters that have references (filterref) to other pre-defined filters. This is not covered by the current schema so a new class was introduced to a) allow filters to reference each other, and b) do it in a way that allows the client to determine if a filter reference_s_ a filter or is reference_d_ by a filter. +schema/HostedFilterList.mof & .registration +src/HostedFilterList.c Adds a class to represent the relationship (association) between a filter and the computer system that hosts them. In the case of ACL filters, which are essentially defined once but available to all VMs, they are always linked to the host system (hypervisor) rather than the individual computer systems (VMs). +schema/AppliedFilterList.mof & .registration +src/AppliedFilterList.c Adds a class to represent the relationship (association) between a filter and a network port referencing it. This is not covered by the current schema so a new class was introduced. NOTE: New associations are created via CIM intrinsic methods (create/modify/ delete). It requires the client to provide fully qualified object paths to the filter and network port so the providers can a) validate their existance, and b) apply the necessary links in the XML so new associations appear when queried. Signed-off-by: Chip Vincent diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -57,7 +57,13 @@ schema/InputPool.mof \ schema/HostedAccessPoint.mof \ schema/ServiceAccessBySAP.mof \ - schema/SAPAvailableForElement.mof + schema/SAPAvailableForElement.mof \ + schema/FilterEntry.mof \ + schema/FilterList.mof \ + schema/EntriesInFilterList.mof \ + schema/NestedFilterList.mof \ + schema/AppliedFilterList.mof \ + schema/HostedFilterList.mof INTEROP_MOFS = \ schema/ComputerSystem.mof \ @@ -138,7 +144,13 @@ schema/InputPool.registration \ schema/HostedAccessPoint.registration \ schema/ServiceAccessBySAP.registration \ - schema/SAPAvailableForElement.registration + schema/SAPAvailableForElement.registration \ + schema/FilterEntry.registration \ + schema/FilterList.registration \ + schema/EntriesInFilterList.registration \ + schema/NestedFilterList.registration \ + schema/AppliedFilterList.registration \ + schema/HostedFilterList.registration INTEROP_REGS = \ schema/RegisteredProfile.registration \ diff --git a/libxkutil/Makefile.am b/libxkutil/Makefile.am --- a/libxkutil/Makefile.am +++ b/libxkutil/Makefile.am @@ -4,12 +4,12 @@ CFLAGS += $(CFLAGS_STRICT) noinst_HEADERS = cs_util.h misc_util.h device_parsing.h xmlgen.h infostore.h \ - pool_parsing.h + pool_parsing.h acl_parsing.h lib_LTLIBRARIES = libxkutil.la libxkutil_la_SOURCES = cs_util_instance.c misc_util.c device_parsing.c \ - xmlgen.c infostore.c pool_parsing.c + xmlgen.c infostore.c pool_parsing.c acl_parsing.c libxkutil_la_LIBADD = @LIBVIRT_LIBS@ \ @LIBUUID_LIBS@ diff --git a/libxkutil/acl_parsing.c b/libxkutil/acl_parsing.c new file mode 100644 --- /dev/null +++ b/libxkutil/acl_parsing.c @@ -0,0 +1,639 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include +#include +#include +#include + +#include + +#include "acl_parsing.h" +#include "device_parsing.h" +#include "xmlgen.h" +#include "../src/svpc_types.h" + +void cleanup_rule(struct acl_rule *rule) +{ + if(rule == NULL) + return; + + free(rule->name); + free(rule->protocol_id); + free(rule->action); + free(rule->direction); + free(rule->priority); + + switch(rule->type) { + case MAC_RULE: + free(rule->var.mac.srcmacaddr); + free(rule->var.mac.srcmacmask); + free(rule->var.mac.dstmacaddr); + free(rule->var.mac.dstmacmask); + free(rule->var.mac.protocol_id); + free(rule->var.mac.comment); + break; + case ARP_RULE: + free(rule->var.arp.srcmacaddr); + free(rule->var.arp.srcmacmask); + free(rule->var.arp.dstmacaddr); + free(rule->var.arp.dstmacmask); + free(rule->var.arp.hw_type); + free(rule->var.arp.protocol_type); + free(rule->var.arp.opcode); + free(rule->var.arp.arpsrcmacaddr); + free(rule->var.arp.arpdstmacaddr); + free(rule->var.arp.arpsrcipaddr); + free(rule->var.arp.arpdstipaddr); + free(rule->var.arp.comment); + break; + case IP_RULE: + free(rule->var.ip.srcmacaddr); + free(rule->var.ip.srcmacmask); + free(rule->var.ip.dstmacaddr); + free(rule->var.ip.dstmacmask); + free(rule->var.ip.srcipaddr); + free(rule->var.ip.srcipmask); + free(rule->var.ip.dstipaddr); + free(rule->var.ip.dstipmask); + free(rule->var.ip.srcportstart); + free(rule->var.ip.srcportend); + free(rule->var.ip.dstportstart); + free(rule->var.ip.dstportend); + free(rule->var.ip.comment); + break; + case TCP_RULE: + free(rule->var.tcp.srcmacaddr); + free(rule->var.tcp.srcipaddr); + free(rule->var.tcp.srcipmask); + free(rule->var.tcp.dstipaddr); + free(rule->var.tcp.srcipfrom); + free(rule->var.tcp.srcipto); + free(rule->var.tcp.dstipfrom); + free(rule->var.tcp.dstipto); + free(rule->var.tcp.srcportstart); + free(rule->var.tcp.srcportend); + free(rule->var.tcp.dstportstart); + free(rule->var.tcp.dstportend); + free(rule->var.tcp.comment); + free(rule->var.tcp.state); + break; + case IGMP_RULE: + free(rule->var.igmp.srcmacaddr); + free(rule->var.igmp.srcmacmask); + free(rule->var.igmp.dstmacaddr); + free(rule->var.igmp.dstmacmask); + free(rule->var.igmp.srcipaddr); + free(rule->var.igmp.srcipmask); + free(rule->var.igmp.dstipaddr); + free(rule->var.igmp.dstipmask); + free(rule->var.igmp.srcipfrom); + free(rule->var.igmp.srcipto); + free(rule->var.igmp.dstipfrom); + free(rule->var.igmp.dstipto); + free(rule->var.igmp.type); + free(rule->var.igmp.code); + free(rule->var.igmp.comment); + free(rule->var.igmp.state); + break; + case ICMP_RULE: + free(rule->var.icmp.srcmacaddr); + free(rule->var.icmp.srcmacmask); + free(rule->var.icmp.dstmacaddr); + free(rule->var.icmp.dstmacmask); + free(rule->var.icmp.srcipaddr); + free(rule->var.icmp.srcipmask); + free(rule->var.icmp.dstipaddr); + free(rule->var.icmp.dstipmask); + free(rule->var.icmp.srcipfrom); + free(rule->var.icmp.srcipto); + free(rule->var.icmp.dstipfrom); + free(rule->var.icmp.dstipto); + free(rule->var.icmp.type); + free(rule->var.icmp.code); + free(rule->var.icmp.comment); + free(rule->var.icmp.state); + break; + case UNKNOWN_RULE: + default: + break; + }; + + rule->type = UNKNOWN_RULE; +} + +void cleanup_filter(struct acl_filter *filter) +{ + int i; + + if(filter == NULL) + return; + + free(filter->uuid); + free(filter->name); + free(filter->chain); + + for (i = 0; i < filter->rule_ct; i++) { + cleanup_rule(filter->rules[i]); + free(filter->rules[i]); + } + + free(filter->rules); + filter->rule_ct = 0; + + for (i = 0; i < filter->ref_ct; i++) + free(filter->refs[i]); + + free(filter->refs); + filter->ref_ct = 0; +} + +void cleanup_filters(struct acl_filter **filters, int count) +{ + int i; + struct acl_filter *_filters = *filters; + + if((filters == NULL) || (*filters == NULL) || (count == 0)) + return; + + for (i = 0; i < count; i++) + cleanup_filter(&_filters[i]); + + free(_filters); + *filters = NULL; +} + + +static int parse_acl_mac_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL mac rule %s", rnode->name); + + rule->type = MAC_RULE; + rule->var.mac.protocol_id = get_attr_value(rnode, "protocolid"); + rule->var.mac.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.mac.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.mac.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.mac.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.mac.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_arp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL arp rule %s", rnode->name); + + rule->type = ARP_RULE; + rule->var.arp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.arp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.arp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.arp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.arp.hw_type = get_attr_value(rnode, "hwtype"); + rule->var.arp.protocol_type = get_attr_value(rnode, "protocoltype"); + rule->var.arp.opcode = get_attr_value(rnode, "opcode"); + rule->var.arp.arpsrcmacaddr = get_attr_value(rnode, "arpsrcmacaddr"); + rule->var.arp.arpdstmacaddr = get_attr_value(rnode, "arpdstmacaddr"); + rule->var.arp.arpsrcipaddr = get_attr_value(rnode, "arpsrcipaddr"); + rule->var.arp.arpdstipaddr = get_attr_value(rnode, "arpdstipaddr"); + rule->var.arp.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_ip_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACP ip rule %s", rnode->name); + + rule->type = IP_RULE; + rule->var.ip.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.ip.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.ip.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.ip.dstmacmask = get_attr_value(rnode, "dstmacmaks"); + rule->var.ip.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.ip.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.ip.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.ip.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.ip.protocol = get_attr_value(rnode, "protocol"); + rule->var.ip.srcportstart = get_attr_value(rnode, "srcportstart"); + rule->var.ip.srcportend = get_attr_value(rnode, "srcportend"); + rule->var.ip.dstportstart = get_attr_value(rnode, "dstportstart"); + rule->var.ip.dstportend = get_attr_value(rnode, "dstportend"); + rule->var.ip.comment = get_attr_value(rnode, "comment"); + + return 1; +} + +static int parse_acl_tcp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL tcp rule %s", rnode->name); + + rule->type = TCP_RULE; + rule->var.tcp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.tcp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.tcp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.tcp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.tcp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.tcp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.tcp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.tcp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.tcp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.tcp.srcportstart = get_attr_value(rnode, "srcportstart"); + rule->var.tcp.srcportend = get_attr_value(rnode, "srcportend"); + rule->var.tcp.dstportstart = get_attr_value(rnode, "dstportstart"); + rule->var.tcp.dstportend = get_attr_value(rnode, "dstportend"); + rule->var.tcp.comment = get_attr_value(rnode, "comment"); + rule->var.tcp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_icmp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL icmp rule %s", rnode->name); + + rule->type = ICMP_RULE; + rule->var.icmp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.icmp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.icmp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.icmp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.icmp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.icmp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.icmp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.icmp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.icmp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.icmp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.icmp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.icmp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.icmp.comment = get_attr_value(rnode, "comment"); + rule->var.icmp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_igmp_rule(xmlNode *rnode, struct acl_rule *rule) +{ + CU_DEBUG("ACL igmp rule %s", rnode->name); + + rule->type = IGMP_RULE; + rule->var.igmp.srcmacaddr = get_attr_value(rnode, "srcmacaddr"); + rule->var.igmp.srcmacmask = get_attr_value(rnode, "srcmacmask"); + rule->var.igmp.dstmacaddr = get_attr_value(rnode, "dstmacaddr"); + rule->var.igmp.dstmacmask = get_attr_value(rnode, "dstmacmask"); + rule->var.igmp.srcipaddr = get_attr_value(rnode, "srcipaddr"); + rule->var.igmp.srcipmask = get_attr_value(rnode, "srcipmask"); + rule->var.igmp.dstipaddr = get_attr_value(rnode, "dstipaddr"); + rule->var.igmp.dstipmask = get_attr_value(rnode, "dstipmask"); + rule->var.igmp.srcipfrom = get_attr_value(rnode, "srcipfrom"); + rule->var.igmp.srcipto = get_attr_value(rnode, "srcipto"); + rule->var.igmp.dstipfrom = get_attr_value(rnode, "dstipfrom"); + rule->var.igmp.dstipto = get_attr_value(rnode, "dstipto"); + rule->var.igmp.type = get_attr_value(rnode, "type"); + rule->var.igmp.code = get_attr_value(rnode, "code"); + rule->var.igmp.comment = get_attr_value(rnode, "comment"); + rule->var.igmp.state = get_attr_value(rnode, "state"); + + return 1; +} + +static int parse_acl_rule(xmlNode *rnode, struct acl_rule *rule) +{ + xmlNode *child = NULL; + + memset(rule, 0, sizeof(*rule)); + + rule->action = get_attr_value(rnode, "action"); + if (rule->action == NULL) + goto err; + + rule->direction = get_attr_value(rnode, "direction"); + if (rule->direction == NULL) + goto err; + + rule->priority = get_attr_value(rnode, "priority"); + rule->statematch = get_attr_value(rnode, "statematch"); + + for (child = rnode->children; child != NULL; child = child->next) { + if (XSTREQ(child->name, "mac")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_mac_rule(child, rule); + } else if (XSTREQ(child->name, "arp") || + XSTREQ(child->name, "rarp")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_arp_rule(child, rule); + } else if (XSTREQ(child->name, "ip") || + XSTREQ(child->name, "ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_ip_rule(child, rule); + } else if (XSTREQ(child->name, "tcp") || + XSTREQ(child->name, "tcp-ipv6") || + XSTREQ(child->name, "udp") || + XSTREQ(child->name, "udp-ipv6") || + XSTREQ(child->name, "sctp") || + XSTREQ(child->name, "sctp-ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_tcp_rule(child, rule); + } else if (XSTREQ(child->name, "icmp") || + XSTREQ(child->name, "icmpv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_icmp_rule(child, rule); + } else if (XSTREQ(child->name, "igmp") || + XSTREQ(child->name, "igmp-ipv6") || + XSTREQ(child->name, "esp") || + XSTREQ(child->name, "esp-ipv6") || + XSTREQ(child->name, "ah") || + XSTREQ(child->name, "ah-ipv6") || + XSTREQ(child->name, "udplite") || + XSTREQ(child->name, "udplite-ipv6") || + XSTREQ(child->name, "all") || + XSTREQ(child->name, "all-ipv6")) { + rule->protocol_id = strdup((char *)child->name); + parse_acl_igmp_rule(child, rule); + } + } + + return 1; + + err: + cleanup_rule(rule); + + return 0; +} + +static int parse_acl_filter(xmlNode *fnode, struct acl_filter *filter) +{ + struct acl_rule *rule = NULL; + char *filter_ref = NULL; + xmlNode *child = NULL; + + filter->name = get_attr_value(fnode, "name"); + if (filter->name == NULL) + goto err; + + filter->chain = get_attr_value(fnode, "chain"); + + for (child = fnode->children; child != NULL; child = child->next) { + if (XSTREQ(child->name, "uuid")) { + STRPROP(filter, uuid, child); + } else if (XSTREQ(child->name, "rule")) { + rule = malloc(sizeof(*rule)); + if (rule == NULL) + goto err; + + if (parse_acl_rule(child, rule) == 0) + goto err; + + append_filter_rule(filter, rule); + } + else if (XSTREQ(child->name, "filterref")) { + filter_ref = get_attr_value(child, "filter"); + if (filter_ref == NULL) + goto err; + + append_filter_ref(filter, filter_ref); + } + } + + return 1; + + err: + cleanup_filter(filter); + + return 0; +} + +/* Dummy function to suppress error message from libxml2 */ +static void swallow_err_msg(void *ctx, const char *msg, ...) +{ + /* do nothing, just swallow the message. */ +} + +int get_filter_from_xml(const char *xml, struct acl_filter **filter) +{ + xmlDoc *xmldoc = NULL; + + if (xml == NULL || filter == NULL) + return 0; + + xmlSetGenericErrorFunc(NULL, swallow_err_msg); + + xmldoc = xmlParseMemory(xml, strlen(xml) + 1); + if (xmldoc == NULL) + goto err; + + *filter = malloc(sizeof(**filter)); + + memset(*filter, 0, sizeof(**filter)); + parse_acl_filter(xmldoc->children, *filter); + + err: + xmlSetGenericErrorFunc(NULL, NULL); + xmlFreeDoc(xmldoc); + + return 1; +} + +int get_filter_by_name( + virConnectPtr conn, + const char *name, + struct acl_filter **filter) +{ + virNWFilterPtr vfilter = NULL; + char *xml = NULL; + + if (name == NULL || filter == NULL) + return 0; + + vfilter = virNWFilterLookupByName(conn, name); + + xml = virNWFilterGetXMLDesc(vfilter, 0); + + virNWFilterFree(vfilter); + + if (xml == NULL) + return 0; + + get_filter_from_xml(xml, filter); + + return 1; +} + +int get_filter_by_uuid( + virConnectPtr conn, + const char *uuid, + struct acl_filter **filter) +{ + virNWFilterPtr vfilter = NULL; + char *xml = NULL; + + if (uuid == NULL || filter == NULL) + return 0; + + vfilter = virNWFilterLookupByUUIDString(conn, uuid); + + xml = virNWFilterGetXMLDesc(vfilter, 0); + + virNWFilterFree(vfilter); + + if (xml == NULL) + return 0; + + get_filter_from_xml(xml, filter); + + return 1; +} + +int get_filters( + virConnectPtr conn, + struct acl_filter **list) +{ + int count = 0; + char **names = NULL; + struct acl_filter *filters = NULL; + int i = 0; + + count = virConnectNumOfNWFilters(conn); + + names = calloc(count, sizeof(char *)); + if (names == NULL) + goto err; + + virConnectListNWFilters(conn, names, count); + + filters = malloc(count * sizeof(struct acl_filter)); + if (filters == NULL) + goto err; + + for(i = 0; i < count; i++) + { + struct acl_filter *filter = NULL; + + get_filter_by_name(conn, names[i], &filter); + + memcpy(&filters[i], filter, sizeof(*filter)); + } + + *list = filters; + + err: + free(names); + + return i; +} + + +int append_filter_rule(struct acl_filter *filter, struct acl_rule *rule) +{ + struct acl_rule **old_rules = NULL; + + if ((filter == NULL) || (rule == NULL)) + return 0; + + rule->name = make_rule_id(filter->name, filter->rule_ct); + if (rule->name == NULL) + return 0; + + old_rules = filter->rules; + + filter->rules = + malloc((filter->rule_ct + 1) * sizeof(struct acl_rule *)); + + memcpy(filter->rules, + old_rules, + filter->rule_ct * sizeof(struct acl_rule *)); + + filter->rules[filter->rule_ct] = rule; + filter->rule_ct++; + + free(old_rules); + + return 1; +} + +int append_filter_ref(struct acl_filter *filter, char *name) +{ + int i; + char **old_refs = NULL; + + if ((filter == NULL) || (name == NULL)) + return 0; + + for (i = 0; i < filter->ref_ct; i++) + if (STREQC(filter->refs[i], name)) + return 0; /* already exists */ + + old_refs = filter->refs; + + filter->refs = malloc((filter->ref_ct + 1) * sizeof(char *)); + memcpy(filter->refs, old_refs, filter->ref_ct * sizeof(char *)); + + filter->refs[filter->ref_ct] = name; + filter->ref_ct++; + + free(old_refs); + + return 1; +} + +char *make_rule_id(const char *filter, int index) +{ + int ret; + char *rule_id = NULL; + + if (filter == NULL) + return NULL; + + ret = asprintf(&rule_id, "%s:%u", filter, index); + if (ret == -1) { + free(rule_id); + rule_id = NULL; + } + + + return rule_id; +} + +int parse_rule_id(const char *rule_id, char **filter, int *index) +{ + int ret; + + if ((filter == NULL) || (index == NULL)) + return 0; + ret = sscanf(rule_id, "%as[^:]:%u", filter, index); + if (ret != 2) { + free(*filter); + *filter = NULL; + + return 0; + } + + return 1; +} + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/libxkutil/acl_parsing.h b/libxkutil/acl_parsing.h new file mode 100644 --- /dev/null +++ b/libxkutil/acl_parsing.h @@ -0,0 +1,212 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __ACL_PARSING_H +#define __ACL_PARSING_H + +#include +#include +#include +#include + +struct acl_mac_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *protocol_id; + char *comment; +}; + +struct acl_arp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *hw_type; + char *protocol_type; + char *opcode; + char *arpsrcmacaddr; + char *arpdstmacaddr; + char *arpsrcipaddr; + char *arpdstipaddr; + char *comment; +}; + +struct acl_ip_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *protocol; + + char *srcportstart; + char *srcportend; + char *dstportstart; + char *dstportend; + + char *comment; +}; + +struct acl_tcp_rule { + char *srcmacaddr; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *srcportstart; + char *srcportend; + char *dstportstart; + char *dstportend; + + char *comment; + char *state; +}; + +struct acl_igmp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *type; + char *code; + char *comment; + char *state; +}; + +struct acl_icmp_rule { + char *srcmacaddr; + char *srcmacmask; + char *dstmacaddr; + char *dstmacmask; + + char *srcipaddr; + char *srcipmask; + char *dstipaddr; + char *dstipmask; + + char *srcipfrom; + char *srcipto; + char *dstipfrom; + char *dstipto; + + char *type; + char *code; + char *comment; + char *state; +}; + +struct acl_rule { + char *name; + char *protocol_id; + char *action; + char *direction; + char *priority; + char *statematch; + + enum { + UNKNOWN_RULE, + MAC_RULE, + ARP_RULE, + IP_RULE, + TCP_RULE, + ICMP_RULE, + IGMP_RULE + } type; + + union { + struct acl_mac_rule mac; + struct acl_arp_rule arp; + struct acl_ip_rule ip; + struct acl_tcp_rule tcp; + struct acl_icmp_rule icmp; + struct acl_igmp_rule igmp; + } var; +}; + +struct acl_filter { + char *uuid; + char *name; + char *chain; + + struct acl_rule **rules; + int rule_ct; + + char **refs; + int ref_ct; +}; + +void cleanup_rule(struct acl_rule *rule); +void cleanup_filter(struct acl_filter *filter); +void cleanup_filters(struct acl_filter **filters, int count); + +int get_filters(virConnectPtr conn, struct acl_filter **list); + +int get_filter_from_xml(const char *xml, struct acl_filter **filter); +int get_filter_by_uuid(virConnectPtr conn, const char *uuid, + struct acl_filter **filter); +int get_filter_by_name(virConnectPtr conn, const char *name, + struct acl_filter **filter); + +char *make_rule_id(const char *filter, int index); +int parse_rule_id(const char *rule_id, char **filter, int *index); + +/** NOTE: Both append functions take parameters allocated by caller and + * freed by cleanup_filter(s) + */ +int append_filter_rule(struct acl_filter *filter, struct acl_rule *rule); +int append_filter_ref(struct acl_filter *filter, char *name); +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c --- a/libxkutil/device_parsing.c +++ b/libxkutil/device_parsing.c @@ -80,6 +80,7 @@ free(dev->model); free(dev->device); free(dev->net_mode); + free(dev->filter_ref); } static void cleanup_emu_device(struct emu_device *dev) @@ -386,9 +387,12 @@ ndev->model = get_attr_value(child, "type"); if (ndev->model == NULL) goto err; + } else if (XSTREQ(child->name, "filterref")) { + ndev->filter_ref = get_attr_value(child, "filter"); } else if (XSTREQ(child->name, "virtualport")) { parse_vsi_device(child, ndev); } + } if (ndev->source == NULL) @@ -764,6 +768,7 @@ DUP_FIELD(dev, _dev, dev.net.model); DUP_FIELD(dev, _dev, dev.net.device); DUP_FIELD(dev, _dev, dev.net.net_mode); + DUP_FIELD(dev, _dev, dev.net.filter_ref); DUP_FIELD(dev, _dev, dev.net.vsi.vsi_type); DUP_FIELD(dev, _dev, dev.net.vsi.manager_id); DUP_FIELD(dev, _dev, dev.net.vsi.type_id); diff --git a/libxkutil/device_parsing.h b/libxkutil/device_parsing.h --- a/libxkutil/device_parsing.h +++ b/libxkutil/device_parsing.h @@ -64,6 +64,7 @@ char *model; char *device; char *net_mode; + char *filter_ref; struct vsi_device vsi; }; diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c --- a/libxkutil/xmlgen.c +++ b/libxkutil/xmlgen.c @@ -301,6 +301,15 @@ xmlNewProp(tmp, BAD_CAST "type", BAD_CAST net->model); } + if (net->filter_ref != NULL) { + tmp = xmlNewChild(nic, NULL, + BAD_CAST "filterref", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST "filter", + BAD_CAST net->filter_ref); + } + if (STREQ(dev->dev.net.type, "network")) msg = set_net_source(nic, net, "network"); else if (STREQ(dev->dev.net.type, "bridge")) diff --git a/libxkutil/xmlgen.h b/libxkutil/xmlgen.h --- a/libxkutil/xmlgen.h +++ b/libxkutil/xmlgen.h @@ -23,6 +23,7 @@ #include "device_parsing.h" #include "pool_parsing.h" +#include "acl_parsing.h" #include "cmpidt.h" @@ -38,4 +39,6 @@ char *res_to_xml(struct virt_pool_res *res); +char *filter_to_xml(struct acl_filter *filter); + #endif diff --git a/schema/AppliedFilterList.mof b/schema/AppliedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/AppliedFilterList.mof @@ -0,0 +1,8 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_AppliedFilterList")] +class KVM_AppliedFilterList : CIM_ConcreteDependency +{ + CIM_NetworkPort ref Antecedent; + CIM_FilterList ref Dependent; +}; diff --git a/schema/AppliedFilterList.registration b/schema/AppliedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/AppliedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_AppliedFilterList root/virt Virt_AppliedFilterList Virt_AppliedFilterList association diff --git a/schema/EntriesInFilterList.mof b/schema/EntriesInFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/EntriesInFilterList.mof @@ -0,0 +1,6 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_EntriesInFilterList")] +class KVM_EntriesInFilterList : CIM_EntriesInFilterList +{ +}; diff --git a/schema/EntriesInFilterList.registration b/schema/EntriesInFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/EntriesInFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_EntriesInFilterList root/virt Virt_EntriesInFilterList Virt_EntriesInFilterList association diff --git a/schema/FilterEntry.mof b/schema/FilterEntry.mof new file mode 100644 --- /dev/null +++ b/schema/FilterEntry.mof @@ -0,0 +1,60 @@ +// Copyright IBM Corp. 2011 +[Provider("cmpi::Virt_FilterEntry")] +class KVM_Hdr8021Filter : CIM_Hdr8021Filter +{ + [Description("This defines whether the Filter is used for input, " + "output, or both input and output filtering. All values are " + "used with respect to the interface for which the Filter " + "applies. \"Not Applicable\" (0) is used when there is no " + "direction applicable to the Filter. \"Input\" (1) is " + "used when the Filter applies to packets that are inbound " + "on the related interface. \"Output\" (2) is used when the " + "Filter applies to packets that are outbound on the " + "related interface. \"Both\" (3) is used to indicate that " + "the direction is immaterial, e.g., to filter on a source " + "subnet regardless of whether the flow is inbound or " + "outbound."), + ValueMap { "0", "1", "2", "3", "4" }, + Values { "Not Applicable", "Input, Output", "Both", "Mirrored" }] + uint16 Direction; + + [Description("The priority of the rule controls the order in which " + "the rule will be, instantiated relative to other rules. " + "Rules with lower value will be instantiated and therefore " + "evaluated before rules with higher value. Valid values are " + "in the range of 0 to 1000. If this attribute is not " + "provided, the value 500 will automatically be assigned."), + MinValue(0), + MaxValue(1000)] + uint16 Priority = 500; +}; + +[Provider("cmpi::Virt_FilterEntry")] +class KVM_IPHeadersFilter : CIM_IPHeadersFilter +{ + [Description("This defines whether the Filter is used for input, " + "output, or both input and output filtering. All values are " + "used with respect to the interface for which the Filter " + "applies. \"Not Applicable\" (0) is used when there is no " + "direction applicable to the Filter. \"Input\" (1) is " + "used when the Filter applies to packets that are inbound " + "on the related interface. \"Output\" (2) is used when the " + "Filter applies to packets that are outbound on the " + "related interface. \"Both\" (3) is used to indicate that " + "the direction is immaterial, e.g., to filter on a source " + "subnet regardless of whether the flow is inbound or " + "outbound."), + ValueMap { "0", "1", "2", "3", "4" }, + Values { "Not Applicable", "Input, Output", "Both", "Mirrored" }] + uint16 Direction; + + [Description("The priority of the rule controls the order in which " + "the rule will be, instantiated relative to other rules. " + "Rules with lower value will be instantiated and therefore " + "evaluated before rules with higher value. Valid values are " + "in the range of 0 to 1000. If this attribute is not " + "provided, the value 500 will automatically be assigned."), + MinValue(0), + MaxValue(1000)] + uint16 Priority = 500; +}; diff --git a/schema/FilterEntry.registration b/schema/FilterEntry.registration new file mode 100644 --- /dev/null +++ b/schema/FilterEntry.registration @@ -0,0 +1,4 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_Hdr8021Filter root/virt Virt_FilterEntry Virt_FilterEntry instance +KVM_IPHeadersFilter root/virt Virt_FilterEntry Virt_FilterEntry instance diff --git a/schema/FilterList.mof b/schema/FilterList.mof new file mode 100644 --- /dev/null +++ b/schema/FilterList.mof @@ -0,0 +1,4 @@ +// Copyright IBM Corp. 2011 +class KVM_FilterList : CIM_FilterList +{ +}; diff --git a/schema/FilterList.registration b/schema/FilterList.registration new file mode 100755 --- /dev/null +++ b/schema/FilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_FilterList root/virt Virt_FilterList Virt_FilterList instance diff --git a/schema/HostedFilterList.mof b/schema/HostedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/HostedFilterList.mof @@ -0,0 +1,6 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_HostedFilterList")] +class KVM_HostedFilterList : CIM_HostedFilterList +{ +}; diff --git a/schema/HostedFilterList.registration b/schema/HostedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/HostedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_HostedFilterList root/virt Virt_HostedFilterList Virt_HostedFilterList association diff --git a/schema/NestedFilterList.mof b/schema/NestedFilterList.mof new file mode 100644 --- /dev/null +++ b/schema/NestedFilterList.mof @@ -0,0 +1,8 @@ +// Copyright IBM Corp. 2011 +[Association, + Provider("cmpi::Virt_NestedFilterList")] +class KVM_NestedFilterList : CIM_ConcreteDependency +{ + CIM_FilterList ref Antecedent; + CIM_FilterList ref Dependent; +}; diff --git a/schema/NestedFilterList.registration b/schema/NestedFilterList.registration new file mode 100644 --- /dev/null +++ b/schema/NestedFilterList.registration @@ -0,0 +1,3 @@ +# Copyright IBM Corp. 2011 +# Classname Namespace ProviderName ProviderModule ProviderTypes +KVM_NestedFilterList root/virt Virt_NestedFilterList Virt_NestedFilterList association diff --git a/src/Makefile.am b/src/Makefile.am --- a/src/Makefile.am +++ b/src/Makefile.am @@ -23,7 +23,9 @@ Virt_VSMigrationSettingData.h \ Virt_ConsoleRedirectionService.h \ Virt_ConsoleRedirectionServiceCapabilities.h \ - Virt_KVMRedirectionSAP.h + Virt_KVMRedirectionSAP.h \ + Virt_FilterList.h \ + Virt_FilterEntry.h XKUADD = $(top_builddir)/libxkutil/libxkutil.la @@ -77,7 +79,13 @@ libVirt_ServiceAffectsElement.la \ libVirt_HostedAccessPoint.la \ libVirt_ServiceAccessBySAP.la \ - libVirt_SAPAvailableForElement.la + libVirt_SAPAvailableForElement.la \ + libVirt_FilterList.la \ + libVirt_FilterEntry.la \ + libVirt_EntriesInFilterList.la \ + libVirt_NestedFilterList.la \ + libVirt_HostedFilterList.la \ + libVirt_AppliedFilterList.la libVirt_ComputerSystem_la_SOURCES = Virt_ComputerSystem.c libVirt_ComputerSystem_la_DEPENDENCIES = libVirt_VirtualSystemSnapshotService.la @@ -243,3 +251,26 @@ libVirt_SAPAvailableForElement_la_SOURCES = Virt_SAPAvailableForElement.c libVirt_SAPAvailableForElement_la_LIBADD = -lVirt_ComputerSystem -lVirt_KVMRedirectionSAP +libVirt_FilterEntry_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_FilterEntry_la_SOURCES = Virt_FilterEntry.c +libVirt_FilterEntry_la_LIBADD = -lVirt_HostSystem + +libVirt_FilterList_la_DEPENDENCIES = libVirt_HostSystem.la +libVirt_FilterList_la_SOURCES = Virt_FilterList.c +libVirt_FilterList_la_LIBADD = -lVirt_HostSystem + +libVirt_EntriesInFilterList_la_DEPENDENCIES = libVirt_FilterEntry.la libVirt_FilterList.la +libVirt_EntriesInFilterList_la_SOURCES = Virt_EntriesInFilterList.c +libVirt_EntriesInFilterList_la_LIBADD = -lVirt_FilterEntry -lVirt_FilterList + +libVirt_NestedFilterList_la_DEPENDENCIES = libVirt_FilterList.la +libVirt_NestedFilterList_la_SOURCES = Virt_NestedFilterList.c +libVirt_NestedFilterList_la_LIBADD = -lVirt_FilterList + +libVirt_HostedFilterList_la_DEPENDENCIES = libVirt_HostSystem.la libVirt_FilterList.la +libVirt_HostedFilterList_la_SOURCES = Virt_HostedFilterList.c +libVirt_HostedFilterList_la_LIBADD = -lVirt_HostSystem -lVirt_FilterList + +libVirt_AppliedFilterList_la_DEPENDENCIES = libVirt_Device.la libVirt_FilterList.la +libVirt_AppliedFilterList_la_SOURCES = Virt_AppliedFilterList.c +libVirt_AppliedFilterList_la_LIBADD = -lVirt_Device -lVirt_FilterList diff --git a/src/Virt_AppliedFilterList.c b/src/Virt_AppliedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_AppliedFilterList.c @@ -0,0 +1,634 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include +#include + +#include "device_parsing.h" +#include "acl_parsing.h" +#include "misc_util.h" +#include "cs_util.h" + +#include "Virt_Device.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference property of an instance + * + * @param inst The instance + * @param prop The property name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_prop(const CMPIInstance *instance, + const char *prop, + CMPIObjectPath **reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetProperty(instance, prop, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + if ((value.type != CMPI_ref) || CMIsNullObject(value.value.ref)) + return CMPI_RC_ERR_TYPE_MISMATCH; + + *reference = value.value.ref; + + return CMPI_RC_OK; +} + +/* TODO: Port to libcmpiutil/args_util.c */ +/** + * Get a reference component of an object path + * + * @param _reference The reference + * @param key The key name + * @param reference A pointer to a CMPIObjectPath* that will be set + * if successful + * @returns + * - CMPI_RC_OK on success + * - CMPI_RC_ERR_NO_SUCH_PROPERTY if prop is not present + * - CMPI_RC_ERR_TYPE_MISMATCH if prop is not a reference + * - CMPI_RC_OK otherwise + */ +static CMPIrc cu_get_ref_path(const CMPIObjectPath *reference, + const char *key, + CMPIObjectPath **_reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIData value; + + /* REQUIRE_PROPERY_DEFINED(instance, prop, value, &s); */ + value = CMGetKey(reference, key, &s); + if ((s.rc != CMPI_RC_OK) || CMIsNullValue(value)) + return CMPI_RC_ERR_NO_SUCH_PROPERTY; + + /* how to parse and object path? */ + + return CMPI_RC_OK; +} + +/* TODO: Port to libxkutil/device_parsing.c */ +static int update_device(virDomainPtr dom, + struct virt_device *dev) +{ + char *xml = NULL; + int flags = VIR_DOMAIN_DEVICE_MODIFY_CURRENT | + VIR_DOMAIN_DEVICE_MODIFY_CONFIG; + int ret = 0; + + /** device_to_xml() is not exported, so this function needs + * to be moved + */ + + /* xml = device_to_xml(dev); */ + + if (xml == NULL) { + CU_DEBUG("Failed to get XML for device '%s'", dev->id); + goto out; + } + + if (virDomainUpdateDeviceFlags(dom, xml, flags) != 0) { + CU_DEBUG("Failed to dynamically update device:"); + CU_DEBUG("%s", xml); + goto out; + } + + ret = 1; + out: + free(xml); + + return ret; +} + +/* TODO: Port to libxkutil/device_parsing.c */ +static int get_device_by_devid(virDomainPtr dom, + const char *devid, + int type, + struct virt_device **dev) +{ + int i, ret = 0; + struct virt_device *devices = NULL; + int count = get_devices(dom, &devices, type); + + for (i = 0; i < count; i++) { + if (STREQC(devid, devices[i].id)) { + CU_DEBUG("Found '%s'", devices[i].id); + + *dev = virt_device_dup(&devices[i]); + if (*dev != NULL) + ret = 1; + + break; + } + } + + cleanup_virt_devices(&devices, count); + + return ret; +} + +/** + * given a filter, get the network interface + */ +static CMPIStatus list_to_net( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + struct acl_filter *filter = NULL; + virDomainPtr *doms = NULL; + virConnectPtr conn = NULL; + int i, j, dcount, ncount; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* validate filter */ + get_filter_by_name(conn, name, &filter); + if (filter == NULL) + goto out; + + cleanup_filter(filter); + + /* get domains */ + dcount = get_domain_list(conn, &doms); + if (dcount < 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to get domain list"); + goto out; + } + + for (i = 0; i < dcount; i++) { + /* get domain's network devices */ + struct virt_device *devices = NULL; + ncount = get_devices(doms[i], &devices, CIM_RES_TYPE_NET); + + CU_DEBUG("Found %u network devices", ncount); + + for (j = 0; j < ncount; j++) { + struct net_device *ndev = &(devices[j].dev.net); + + CU_DEBUG("filterref = %s", ndev->filter_ref); + + if ((ndev->filter_ref != NULL) && + STREQC(name, ndev->filter_ref)) { + CU_DEBUG("Getting network device instance"); + + CMPIInstance *instance = NULL; + char *device_id = + get_fq_devid( + (char *)virDomainGetName(doms[i]), + devices[j].id); + + CU_DEBUG("Processing %s", device_id); + + s = get_device_by_name(_BROKER, + reference, + device_id, + CIM_RES_TYPE_NET, + &instance); + + if (instance != NULL) { + CU_DEBUG("adding instance to list"); + inst_list_add(list, instance); + } + } + } + + cleanup_virt_devices(&devices, ncount); + virDomainFree(doms[i]); + } + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a network interface, find the filter lists + */ +static CMPIStatus net_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + const char *device_name = NULL; + char *domain_name = NULL; + char *net_name = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + int i; + struct acl_filter *filter = NULL; + + CU_DEBUG("Reference %s", REF2STR(reference)); + + /* validate device + * TODO: This may be redundant since it's necessary to get + * the device structure in order to determine the filter_ref + */ + if (!STREQC(CLASSNAME(reference), "KVM_NetworkPort")) + goto out; + + s = get_device_by_ref(_BROKER, reference, &instance); + if ((s.rc != CMPI_RC_OK) || (instance == NULL)) + goto out; + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + CU_DEBUG("Failed to get DeviceID"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* connect to domain */ + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + /* get domain's network devices */ + struct virt_device *devices = NULL; + int count = get_devices(dom, &devices, CIM_RES_TYPE_NET); + + CU_DEBUG("Found %u net devices on dom '%s'", count, domain_name); + + for (i = 0; i < count; i++) { + struct net_device *ndev = &(devices[i].dev.net); + + CU_DEBUG("Checking net device '%s' for filterref", + devices[i].id); + + if (STREQC(device_name, devices[i].id)) { + CMPIInstance *instance = NULL; + + CU_DEBUG("Processing %s", ndev->filter_ref); + + get_filter_by_name(conn, ndev->filter_ref, &filter); + if (filter == NULL) + continue; + + s = instance_from_filter(_BROKER, + info->context, + reference, + filter, + &instance); + + if (instance != NULL) + inst_list_add(list, instance); + + } + + } + + cleanup_virt_devices(&devices, count); + out: + + free(domain_name); + free((char *)device_name); + free(net_name); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_FilterList", + NULL +}; + +static char *dependent[] = { + "KVM_NetworkPort", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_AppliedFilterList", + NULL +}; + +static struct std_assoc _list_to_net = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_net, + .make_ref = make_ref +}; + +static struct std_assoc _net_to_list = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = net_to_list, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_net, + &_net_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_AppliedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +DEFAULT_GI(); +DEFAULT_EIN(); +DEFAULT_EI(); + +static CMPIStatus CreateInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const CMPIInstance *instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *filter_name = NULL; + struct acl_filter *filter = NULL; + CMPIObjectPath *dependent = NULL; + char *domain_name = NULL; + const char *device_name = NULL; + char *net_name = NULL; + struct virt_device *device = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + + if (cu_get_ref_prop(instance, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &filter_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_prop(instance, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.DeviceID property"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + get_device_by_devid(dom, net_name, CIM_RES_TYPE_NET, &device); + if (device == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + free(device->dev.net.filter_ref); + device->dev.net.filter_ref = strdup(filter_name); + + if (update_device(dom, device) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update device"); + goto out; + } + + out: + free((char *)filter_name); + free(domain_name); + free((char *)device_name); + free(net_name); + + cleanup_filter(filter); + cleanup_virt_device(device); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +static CMPIStatus DeleteInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIObjectPath *antecedent = NULL; + const char *filter_name = NULL; + struct acl_filter *filter = NULL; + CMPIObjectPath *dependent = NULL; + char *domain_name = NULL; + const char *device_name = NULL; + char *net_name = NULL; + struct virt_device *device = NULL; + virConnectPtr conn = NULL; + virDomainPtr dom = NULL; + + if (cu_get_ref_path(reference, "Antecedent", + &antecedent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent property"); + goto out; + } + + if (cu_get_str_path(reference, "Name", &filter_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Antecedent.Name property"); + goto out; + } + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Antecedent.Name object does not exist"); + goto out; + } + + if (cu_get_ref_path(reference, "Dependent", + &dependent) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent property"); + goto out; + } + + if (cu_get_str_path(reference, "DeviceID", + &device_name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Unable to get Dependent.DeviceID property"); + goto out; + } + + if (parse_fq_devid(device_name, &domain_name, &net_name) == 0) { + CU_DEBUG("Failed to parse devid"); + goto out; + } + + dom = virDomainLookupByName(conn, domain_name); + if (dom == NULL) { + CU_DEBUG("Failed to connect to Domain '%s'", domain_name); + goto out; + } + + get_device_by_devid(dom, net_name, CIM_RES_TYPE_NET, &device); + if (device == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Dependent.Name object does not exist"); + goto out; + } + + free(device->dev.net.filter_ref); + device->dev.net.filter_ref = NULL; + + if (update_device(dom, device) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_FAILED, + "Failed to update device"); + goto out; + } + + out: + free((char *)filter_name); + free(domain_name); + free((char *)device_name); + free(net_name); + + cleanup_filter(filter); + cleanup_virt_device(device); + + virDomainFree(dom); + virConnectClose(conn); + + return s; +} + +DEFAULT_MI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_AppliedFilterEntry, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_EntriesInFilterList.c b/src/Virt_EntriesInFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_EntriesInFilterList.c @@ -0,0 +1,219 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "Virt_FilterList.h" +#include "Virt_FilterEntry.h" + +static const CMPIBroker *_BROKER; + +/** + * given a filter, find all *direct* children + */ +static CMPIStatus list_to_rule( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + struct acl_filter *filter = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + CU_DEBUG("Filter '%s' does not exist", name); + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + CU_DEBUG("Processing %s", filter->rules[i]->name); + + s = instance_from_rule(_BROKER, + info->context, + reference, + filter->rules[i], + &instance); + + if (instance != NULL) { + inst_list_add(list, instance); + instance = NULL; + } + } + + cleanup_filter(filter); + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a rule, fine the parent filter + */ +static CMPIStatus rule_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *filters = NULL; + CMPIInstance *instance = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int count = 0; + int i, j = 0; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &filters); + if (filters == NULL) + goto out; + + /* return the filter that contains the rule */ + for (i = 0; i < count; i++) { + for (j = 0; j < filters[i].rule_ct; j++) { + if (STREQC(name, filters[i].rules[j]->name)) { + CU_DEBUG("Processing %s,",filters[i].name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + &filters[i], + &instance); + + if (instance != NULL) { + inst_list_add(list, instance); + instance = NULL; + } + + } + } + } + + out: + cleanup_filters(&filters, count); + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *group_component[] = { + "KVM_FilterList", + NULL +}; + +static char *part_component[] = { + "KVM_Hdr8021Filter", + "KVM_IPHeadersFilter", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_EntriesInFilterList", + NULL +}; + +static struct std_assoc _list_to_rule = { + .source_class = (char **)&group_component, + .source_prop = "GroupComponent", + + .target_class = (char **)&part_component, + .target_prop = "PartComponent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_rule, + .make_ref = make_ref +}; + +static struct std_assoc _rule_to_list = { + .source_class = (char **)&part_component, + .source_prop = "PartComponent", + + .target_class = (char **)&group_component, + .target_prop = "GroupComponent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = rule_to_list, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_rule, + &_rule_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_EntriesInFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterEntry.c b/src/Virt_FilterEntry.c new file mode 100644 --- /dev/null +++ b/src/Virt_FilterEntry.c @@ -0,0 +1,678 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "xmlgen.h" + +#include "Virt_FilterEntry.h" +#include "Virt_HostSystem.h" + +const static CMPIBroker *_BROKER; + +static bool is_mac_rule(int type) +{ + if (type == MAC_RULE || type == ARP_RULE) + return 1; + + return 0; +} + +static bool is_ip_rule(int type) +{ + if (type == IP_RULE || type == TCP_RULE || type == ICMP_RULE || + type == IGMP_RULE) + return 1; + + return 0; +} + +static int octets_from_mac(const char * s, unsigned int *buffer, + unsigned int size) +{ + unsigned int _buffer[6]; + unsigned int i, n = 0; + + if ((s == 0) || (s[0] == '\0') || (buffer == NULL) || (size < 6)) + return 0; + + if (s[0] == '$') { + for (i = 0; (s[i] != '\0') && (i < size); i++) + buffer[i] = s[i]; + + n = i; + } + else { + n = sscanf(s, "%x:%x:%x:%x:%x:%x", + &_buffer[0], &_buffer[1], &_buffer[2], + &_buffer[3], &_buffer[4], &_buffer[5]); + + for (i = 0; (i < n) && (i < size); i++) + buffer[i] = _buffer[i]; + } + + return n; +} + +static int octets_from_ip(const char * s, unsigned int *buffer, + unsigned int size) +{ + struct in6_addr addr; + unsigned int family = 0; + unsigned int i, n = 0; + + if ((s == 0) || (s[0] == '\0') || (buffer == NULL) || (size < 4)) + return 0; + + if (s[0] == '$') { + for (i = 0; (s[i] != '\0') && (i < size); i++) + buffer[i] = s[i]; + + n = i; + } + else { + family = strstr(s, ":") ? AF_INET6 : AF_INET; + n = family == AF_INET6 ? 16 : 4; + + if (size < n) + return 0; + + if (inet_pton(family, s, &addr)) { + n = n <= size ? n : size; + for (i = 0; i < n; i++) + buffer[i] = addr.s6_addr[i]; + } + } + + return n; +} + +static CMPIArray *octets_to_cmpi(const CMPIBroker *broker, unsigned int *bytes, int size) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIArray *array = NULL; + int i; + + if (bytes == 0 || size == 0) + return array; + + array = CMNewArray(broker, size, CMPI_uint8, &s); + + for (i = 0; i < size; i++) { + s = CMSetArrayElementAt(array, i, + (CMPIValue*)&bytes[i], CMPI_uint8); + } + + return array; +} + +static int convert_direction(const char *s) +{ + enum {NOT_APPLICABLE, INPUT, OUTPUT, BOTH} direction = NOT_APPLICABLE; + + if (s != NULL) { + if (STREQC(s, "in")) + direction = INPUT; + else if (STREQC(s, "out")) + direction = OUTPUT; + else if (STREQC(s, "inout")) + direction = BOTH; + } + + return direction; +} + +static int convert_priority(const char *s) +{ + int priority = 0; + + if (s != NULL) { + priority = atoi(s); + } + + return priority; +} + +static CMPIInstance *convert_mac_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction, priority = 0; + unsigned int bytes[48]; + unsigned int size = 0; + CMPIArray *array = NULL; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "Hdr8021Filter", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get 8021 filter instance"); + + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)rule->name, CMPI_chars); + + direction = convert_direction(rule->direction); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + priority = convert_priority(rule->priority); + CMSetProperty(inst, "Priority", (CMPIValue *)&priority, CMPI_uint16); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_mac(rule->var.mac.srcmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMACAddr8021", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_mac(rule->var.mac.srcmacmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMACMask8021", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_mac(rule->var.mac.dstmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMACAddr8021", (CMPIValue *) + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_mac(rule->var.mac.dstmacmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMACMask8021", (CMPIValue *) + (CMPIValue *)&array, CMPI_uint8A); + + out: + return inst; +} + +static CMPIInstance *convert_ip_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction, priority = 0; + unsigned int bytes[48]; + unsigned int size = 0; + unsigned int n = 0; + CMPIArray *array = NULL; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "IPHeadersFilter", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get ip headers filter instance"); + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)rule->name, CMPI_chars); + + direction = convert_direction(rule->direction); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + priority = convert_priority(rule->priority); + CMSetProperty(inst, "Priority", (CMPIValue *)&priority, CMPI_uint16); + + if (strstr(rule->protocol_id, "v6")) + n = 6; + else + n = 4; + + CMSetProperty(inst, "HdrIPVersion",(CMPIValue *)&n, CMPI_uint8); + + if (rule->var.tcp.srcipfrom && rule->var.tcp.srcipto) { + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.srcipfrom, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddress", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.srcipto, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddressEndOfRange", + (CMPIValue *)&array, CMPI_uint8A); + } else { + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.srcmacaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcAddress", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.srcipmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrSrcMask", + (CMPIValue *)&array, CMPI_uint8A); + } + + if (rule->var.tcp.dstipfrom && rule->var.tcp.dstipto) { + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.dstipfrom, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddress", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.dstipto, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddressEndOfRange", + (CMPIValue *)&array, CMPI_uint8A); + } else { + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.dstipaddr, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestAddress", + (CMPIValue *)&array, CMPI_uint8A); + + memset(bytes, 0, sizeof(bytes)); + size = octets_from_ip(rule->var.tcp.dstipmask, + bytes, sizeof(bytes)); + + array = octets_to_cmpi(broker, bytes, size); + if (array != NULL) + CMSetProperty(inst, "HdrDestMask", + (CMPIValue *)&array, CMPI_uint8A); + } + + if ((rule->type == IP_RULE) || (rule->type == TCP_RULE)) { + if (rule->var.tcp.srcportstart) { + n = atoi(rule->var.tcp.srcportstart); + CMSetProperty(inst, "HdrSrcPortStart", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.srcportend) { + n = atoi(rule->var.tcp.srcportend); + CMSetProperty(inst, "HdrSrcPortEnd", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.dstportstart) { + n = atoi(rule->var.tcp.dstportstart); + CMSetProperty(inst, "HdrDestPortStart", + (CMPIValue *)&n, CMPI_uint16); + } + + if (rule->var.tcp.dstportend) { + n = atoi(rule->var.tcp.dstportend); + CMSetProperty(inst, "HdrDestPortEnd", + (CMPIValue *)&n, CMPI_uint16); + } + } + + out: + return inst; +} + +static CMPIInstance *convert_rule_to_instance( + struct acl_rule *rule, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *instance = NULL; + + if (rule == NULL) + return NULL; + + if(is_mac_rule(rule->type)) { + instance = convert_mac_rule_to_instance(rule, + broker, + context, + reference, + s); + } + else if(is_ip_rule(rule->type)) { + instance = convert_ip_rule_to_instance(rule, + broker, + context, + reference, + s); + } + + return instance; +} + +CMPIStatus enum_filter_rules( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + struct acl_filter *filters = NULL; + int i, j, count = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + enum {NONE, MAC, IP} class_type = NONE; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (STREQC(CLASSNAME(reference), "KVM_Hdr8021Filter")) + class_type = MAC; + else if (STREQC(CLASSNAME(reference), "KVM_IPHeadersFilter")) + class_type = IP; + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &filters); + + for (i = 0; i < count; i++) { + for (j = 0; j < filters[i].rule_ct; j++) { + CMPIInstance *instance = NULL; + + if (((class_type == NONE) || + (class_type == MAC)) && + is_mac_rule(filters[i].rules[j]->type)) { + instance = convert_mac_rule_to_instance( + filters[i].rules[j], + broker, + context, + reference, + &s); + } + else if (((class_type == NONE) || + (class_type == IP)) && + is_ip_rule(filters[i].rules[j]->type)) { + instance = convert_ip_rule_to_instance( + filters[i].rules[j], + broker, + context, + reference, + &s); + } + else + CU_DEBUG("Unrecognized rule type %u", + filters[i].rules[j]->type); + + if (instance != NULL) + inst_list_add(list, instance); + } + + } + + out: + cleanup_filters(&filters, count); + virConnectClose(conn); + + return s; +} + +CMPIStatus get_rule_by_ref( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *filter = NULL; + struct acl_rule *rule = NULL; + const char *name = NULL; + char *filter_name = NULL; + int rule_index; + virConnectPtr conn = NULL; + int i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + if (parse_rule_id(name, &filter_name, &rule_index) == 0) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not parse filter name"); + goto out; + } + + CU_DEBUG("Filter name = %s, rule index = %u", filter_name, rule_index); + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, filter_name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve filter"); + goto out; + } + + for (i = 0; i < filter->rule_ct; i++) { + if (rule_index == i) { + rule = filter->rules[i]; + break; + } + } + + if (rule == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Could not retrieve rule"); + goto out; + } + + *instance = convert_rule_to_instance(rule, + broker, + context, + reference, + &s); + out: + free(filter_name); + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +CMPIStatus instance_from_rule( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_rule *rule, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + *instance = convert_rule_to_instance(rule, + broker, + context, + reference, + &s); + + return s; + +} + +static CMPIStatus GetInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + s = get_rule_by_ref(_BROKER, context, reference, &instance); + + if (instance != NULL) + CMReturnInstance(results, instance); + + return s; +} + +static CMPIStatus EnumInstanceNames( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_rules(_BROKER, context, reference, &list); + + cu_return_instance_names(results, &list); + + inst_list_free(&list); + + return s; +} + +static CMPIStatus EnumInstances( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_rules(_BROKER, context, reference, &list); + + cu_return_instances(results, &list); + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_FilterEntry, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterEntry.h b/src/Virt_FilterEntry.h new file mode 100644 --- /dev/null +++ b/src/Virt_FilterEntry.h @@ -0,0 +1,85 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __VIRT_FILTERENTRY_H +#define __VIRT_FILTERENTRY_H + +/** + * Return a list of filter instances + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param list A pointer to an array of CMPIInstance objects + * (called inits before and frees after) + */ +CMPIStatus enum_filter_rules( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list); + +/** + * Return a single filter instance by reference + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param list A pointer to a CMPIInstance * + */ +CMPIStatus get_rule_by_ref( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance); + +/** + * Get an instance representing a filter rule + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying the parent filter + * @param rule A pointer to a filter rule + * @param instance A pointer to a CMPIInstance * + */ +CMPIStatus instance_from_rule( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_rule *rule, + CMPIInstance **instance); + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterList.c b/src/Virt_FilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_FilterList.c @@ -0,0 +1,252 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "xmlgen.h" + +#include "Virt_FilterList.h" +#include "Virt_HostSystem.h" + +const static CMPIBroker *_BROKER; + +static CMPIInstance *convert_filter_to_instance( + struct acl_filter *filter, + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIStatus *s) +{ + CMPIInstance *inst = NULL; + const char *sys_name = NULL; + const char *sys_ccname = NULL; + int direction = 0; + + inst = get_typed_instance(broker, + CLASSNAME(reference), + "FilterList", + NAMESPACE(reference)); + if (inst == NULL) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get filter list instance"); + goto out; + } + + *s = get_host_system_properties(&sys_name, + &sys_ccname, + reference, + broker, + context); + + if (s->rc != CMPI_RC_OK) { + cu_statusf(broker, s, + CMPI_RC_ERR_FAILED, + "Unable to get host attributes"); + goto out; + } + + CMSetProperty(inst, "SystemName", sys_name, CMPI_chars); + CMSetProperty(inst, "SystemCreationClassName", sys_ccname, CMPI_chars); + CMSetProperty(inst, "Name", (CMPIValue *)filter->name, CMPI_chars); + CMSetProperty(inst, "InstanceID", (CMPIValue *)filter->uuid, + CMPI_chars); + CMSetProperty(inst, "Direction", (CMPIValue *)&direction, CMPI_uint16); + + out: + return inst; +} + +CMPIStatus enum_filter_lists(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list) +{ + virConnectPtr conn = NULL; + struct acl_filter *filters = NULL; + int i, count = 0; + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + conn = connect_by_classname(broker, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + count = get_filters(conn, &filters); + + CU_DEBUG("found %d filters", count); + + for (i = 0; i < count; i++) { + instance = convert_filter_to_instance(&filters[i], + broker, + context, + reference, + &s); + + if (instance != NULL) + inst_list_add(list, instance); + } + + out: + cleanup_filters(&filters, count); + virConnectClose(conn); + + return s; +} + +CMPIStatus get_filter_by_ref(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + CMPIInstance **instance) +{ + virConnectPtr conn = NULL; + struct acl_filter *filter = NULL; + + CMPIStatus s = {CMPI_RC_OK, NULL}; + const char *name = NULL; + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(broker, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &filter); + if (filter == NULL) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "No such instance (Name)"); + goto out; + } + + s = instance_from_filter(broker, context, reference, filter, instance); + + out: + cleanup_filter(filter); + virConnectClose(conn); + + return s; +} + +CMPIStatus instance_from_filter(const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_filter *filter, + CMPIInstance **instance) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + + *instance = convert_filter_to_instance(filter, broker, context, + reference, &s); + + return s; +} + +static CMPIStatus GetInstance( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + s = get_filter_by_ref(_BROKER, context, reference, &instance); + + if (instance != NULL) + CMReturnInstance(results, instance); + + return s; +} + +static CMPIStatus EnumInstanceNames( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_lists(_BROKER, context, reference, &list); + + cu_return_instance_names(results, &list); + + inst_list_free(&list); + + return s; +} + +static CMPIStatus EnumInstances( + CMPIInstanceMI *self, + const CMPIContext *context, + const CMPIResult *results, + const CMPIObjectPath *reference, + const char **properties) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct inst_list list; + + inst_list_init(&list); + + s = enum_filter_lists(_BROKER, context, reference, &list); + + cu_return_instances(results, &list); + + inst_list_free(&list); + + return s; +} + +DEFAULT_CI(); +DEFAULT_MI(); +DEFAULT_DI(); +DEFAULT_EQ(); +DEFAULT_INST_CLEANUP(); + +STD_InstanceMIStub(, + Virt_FilterList, + _BROKER, + libvirt_cim_init()); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_FilterList.h b/src/Virt_FilterList.h new file mode 100644 --- /dev/null +++ b/src/Virt_FilterList.h @@ -0,0 +1,87 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#ifndef __VIRT_FILTERLIST_H +#define __VIRT_FILTERLIST_H + +#include "acl_parsing.h" + +/** + * Return a list of filter lists + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param list A pointer to an array of CMPIInstance objects + * (caller inits before and frees after) + */ +CMPIStatus enum_filter_lists( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct inst_list *list); + +/** + * Return a filter instance by reference + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param instance A pointer to a CMPIInstance * to place the new instance + */ +CMPIStatus get_filter_by_ref( + const CMPIBroker *broker, + const CMPIContext *contest, + const CMPIObjectPath *reference, + CMPIInstance **instance); + +/** + * Return a list of filter lists + * + * @param broker A pointer to the CIM broker + * @param context A pointer to an operation context + * @param reference Defines the libvirt connection to use (via class name + * prefix), but can also be used to scope the results by + * specifying a specific filter + * @param filter A pointer to a acl_filter + * @param instance A pointer to a CMPIInstance * to place the new instance + */ +CMPIStatus instance_from_filter( + const CMPIBroker *broker, + const CMPIContext *context, + const CMPIObjectPath *reference, + struct acl_filter *filter, + CMPIInstance **instance); + +#endif + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_HostedFilterList.c b/src/Virt_HostedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_HostedFilterList.c @@ -0,0 +1,144 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include + +#include "misc_util.h" +#include "Virt_HostSystem.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +static CMPIStatus host_to_list( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + /* validate host reference */ + s = get_host(_BROKER, info->context, reference, &instance, false); + if (s.rc != CMPI_RC_OK) + goto out; + + s = cu_validate_ref(_BROKER, reference, instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s = enum_filter_lists(_BROKER, info->context, reference, list); + + out: + return s; +} + +static CMPIStatus list_to_host( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + CMPIInstance *instance = NULL; + + /* validate filter reference */ + s = get_filter_by_ref(_BROKER, info->context, reference, &instance); + if (s.rc != CMPI_RC_OK) + goto out; + + s = get_host(_BROKER, info->context, reference, &instance, false); + if (s.rc != CMPI_RC_OK) + goto out; + + if (instance != NULL) + inst_list_add(list, instance); + + out: + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_HostSystem", + NULL +}; + +static char *dependent[] = { + "KVM_FilterList", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_HostedFilterList", + NULL +}; + +static struct std_assoc _host_to_list = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = host_to_list, + .make_ref = make_ref +}; + +static struct std_assoc _list_to_host = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = list_to_host, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_host_to_list, + &_list_to_host, + NULL +}; + +STDA_AssocMIStub(, + Virt_HostedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ diff --git a/src/Virt_NestedFilterList.c b/src/Virt_NestedFilterList.c new file mode 100644 --- /dev/null +++ b/src/Virt_NestedFilterList.c @@ -0,0 +1,235 @@ +/* + * Copyright IBM Corp. 2011 + * + * Authors: + * Chip Vincent + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ +#include +#include +#include + +#include +#include +#include + +/* FIXME: This seems to be needed to compile STREQC, which suggests + * libcmpiutil.h needs to add the include since the marco is defined there. + */ +#include +#include + +#include "acl_parsing.h" +#include "misc_util.h" +#include "Virt_FilterList.h" + +static const CMPIBroker *_BROKER; + +/** + * given a filter, find all *direct* filter_refs + */ +static CMPIStatus parent_to_child( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *parent_filter = NULL; + struct acl_filter *child_filter = NULL; + CMPIInstance *instance = NULL; + const char * name = NULL; + virConnectPtr conn = NULL; + int i; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + get_filter_by_name(conn, name, &parent_filter); + if (parent_filter == NULL) + goto out; + + for (i = 0; i < parent_filter->ref_ct; i++) { + get_filter_by_name(conn, parent_filter->refs[i], + &child_filter); + if (child_filter == NULL) + continue; + + CU_DEBUG("Processing %s,", child_filter->name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + child_filter, + &instance); + + if (instance != NULL) { + CU_DEBUG("Adding instance to inst_list"); + inst_list_add(list, instance); + } + + cleanup_filter(child_filter); + + child_filter = NULL; + instance = NULL; + } + + cleanup_filter(parent_filter); + + out: + virConnectClose(conn); + + return s; +} + +/** + * given a filter, find all the other filters that reference it + */ +static CMPIStatus child_to_parent( + const CMPIObjectPath *reference, + struct std_assoc_info *info, + struct inst_list *list) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + struct acl_filter *_list = NULL; + CMPIInstance *instance = NULL; + const char *name = NULL; + virConnectPtr conn = NULL; + int count, i, j; + + CU_DEBUG("Reference = %s", REF2STR(reference)); + + if (cu_get_str_path(reference, "Name", &name) != CMPI_RC_OK) { + cu_statusf(_BROKER, &s, + CMPI_RC_ERR_NOT_FOUND, + "Unable to get Name from reference"); + goto out; + } + + conn = connect_by_classname(_BROKER, CLASSNAME(reference), &s); + if (conn == NULL) + goto out; + + /* TODO: Ensure the referenced filter exists */ + + count = get_filters(conn, &_list); + if (_list == NULL) + goto out; + + /* return any filter that has name in refs */ + for (i = 0; i < count; i++) { + for (j = 0; j < _list[i].ref_ct; j++) { + if (STREQC(name, _list[i].refs[j])) { + CU_DEBUG("Processing %s,", _list[i].name); + + s = instance_from_filter(_BROKER, + info->context, + reference, + &_list[i], + &instance); + + if (instance != NULL) + inst_list_add(list, instance); + + instance = NULL; + } + + } + + cleanup_filter(&_list[i]); + } + + free(_list); + + out: + virConnectClose(conn); + + return s; +} + +LIBVIRT_CIM_DEFAULT_MAKEREF() + +static char *antecedent[] = { + "KVM_FilterList", + NULL +}; + +static char *dependent[] = { + "KVM_FilterList", + NULL +}; + +static char *assoc_class_name[] = { + "KVM_NestedFilterList", + NULL +}; + +static struct std_assoc _list_to_filter_ref = { + .source_class = (char **)&antecedent, + .source_prop = "Antecedent", + + .target_class = (char **)&dependent, + .target_prop = "Dependent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = parent_to_child, + .make_ref = make_ref +}; + +static struct std_assoc _filter_ref_to_list = { + .source_class = (char **)&dependent, + .source_prop = "Dependent", + + .target_class = (char **)&antecedent, + .target_prop = "Antecedent", + + .assoc_class = (char **)&assoc_class_name, + + .handler = child_to_parent, + .make_ref = make_ref +}; + +static struct std_assoc *handlers[] = { + &_list_to_filter_ref, + &_filter_ref_to_list, + NULL +}; + +STDA_AssocMIStub(, + Virt_NestedFilterList, + _BROKER, + libvirt_cim_init(), + handlers); + +/* + * Local Variables: + * mode: C + * c-set-style: "K&R" + * tab-width: 8 + * c-basic-offset: 8 + * indent-tabs-mode: nil + * End: + */ From eblima at linux.vnet.ibm.com Fri May 27 15:28:23 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 27 May 2011 12:28:23 -0300 Subject: [Libvirt-cim] CIMTest run performance Message-ID: <4DDFC317.2070502@linux.vnet.ibm.com> Hello all, I had been trying to set up cimtest to work on my machine for a couple of days without success. So yesterday I started to dig the code and found that every command is sent via ssh, even if the test is supposed to run locally. The reason of cimtest not working was exactly that did not have the ssh keys set up properly. By fixing that configuration, I was able to make the test work as expected. :) But I was still intrigued with the fact that every command is sent via ssh, thus taking cimtest a very very long time to complete. So I hacked a simple patch to try to workaround this issue: ===== diff -r d6951b8799a8 lib/VirtLib/utils.py --- a/lib/VirtLib/utils.py Wed May 18 13:49:05 2011 -0400 +++ b/lib/VirtLib/utils.py Fri May 27 07:42:23 2011 -0700 @@ -33,7 +33,8 @@ def run_remote(ip, cmd): - cmd = 'ssh %s -i %s root@%s "%s"' % (SSH_PARMS, SSH_KEY, ip, cmd) + if ip not in ["localhost", "127.0.0.1"]: + cmd = 'ssh %s -i %s root@%s "%s"' % (SSH_PARMS, SSH_KEY, ip, cmd) return commands.getstatusoutput(cmd) def copy_remote(ip, local, remote='/tmp'): ===== As you can see, it is a quick check if 'ip' is neither localhost nor 127.0.0.1, which only in that case the command is sent via ssh. Note that this patch triggers some other issues, which I hope to be able to fix soon. But there is already a *huge increase* in the performance. I have used the most simpler and probably not the most correct measure: $ time && cimtest && time With the following results: Without patch: Fri May 27 06:46:28 PDT 2011 Fri May 27 07:16:17 PDT 2011 With patch: Fri May 27 07:29:06 PDT 2011 Fri May 27 07:34:50 PDT 2011 From 30 minutes down to 6! _BUT_, I can't really tell if it is actually intended that everything runs with ssh. Taking a look on the test results, it is noticeable that cimtest behaves in a different way, as follows. Without path: FAIL : 18 XFAIL : 5 SKIP : 6 PASS : 158 ----------------- Total : 187 ================================================= FAIL Test Summary: ComputerSystem - 04_defineStartVS.py: FAIL ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: FAIL ElementSettingData - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL KVMRedirectionSAP - 02_ipv6_support.py: FAIL Profile - 02_profile_to_elec.py: FAIL Profile - 04_verify_libvirt_cim_slp_profiles.py: FAIL SystemDevice - 01_forward.py: FAIL VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL VirtualSystemManagementService - 19_definenetwork_ers.py: FAIL VirtualSystemManagementService - 20_verify_vnc_password.py: FAIL VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL VirtualSystemSettingDataComponent - 01_forward.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL SwitchService - 01_enum.py: XFAIL VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: XFAIL VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP LogicalDisk - 02_nodevs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VSSD - 02_bootldr.py: SKIP With patch: FAIL : 15 XFAIL : 5 SKIP : 10 PASS : 157 ----------------- Total : 187 ================================================= FAIL Test Summary: ComputerSystem - 04_defineStartVS.py: FAIL ComputerSystem - 41_cs_to_settingdefinestate.py: FAIL ElementSettingData - 01_forward.py: FAIL HostSystem - 02_hostsystem_to_rasd.py: FAIL HostSystem - 04_hs_to_EAPF.py: FAIL KVMRedirectionSAP - 02_ipv6_support.py: FAIL Profile - 02_profile_to_elec.py: FAIL Profile - 04_verify_libvirt_cim_slp_profiles.py: FAIL SystemDevice - 01_forward.py: FAIL VirtualSystemManagementService - 06_addresource.py: FAIL VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL VirtualSystemManagementService - 20_verify_vnc_password.py: FAIL VirtualSystemSettingDataComponent - 01_forward.py: FAIL VirtualSystemSettingDataComponent - 02_reverse.py: FAIL VSSD - 04_vssd_to_rasd.py: FAIL ================================================= XFAIL Test Summary: ComputerSystem - 32_start_reboot.py: XFAIL SwitchService - 01_enum.py: XFAIL VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL VirtualSystemManagementService - 28_definesystem_with_vsi_profile.py: XFAIL VirtualSystemManagementService - 30_dynamic_disk_mod.py: XFAIL ================================================= SKIP Test Summary: ComputerSystem - 02_nosystems.py: SKIP ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP LogicalDisk - 02_nodevs.py: SKIP VirtualSystemMigrationService - 01_migratable_host.py: SKIP VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP VirtualSystemMigrationService - 05_migratable_host_errs.py: SKIP VirtualSystemMigrationService - 06_remote_live_migration.py: SKIP VirtualSystemMigrationService - 07_remote_offline_migration.py: SKIP VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: SKIP VSSD - 02_bootldr.py: SKIP I would really appreciate comments from the experts on this issue. IMHO, it is something really worthy and if there are any tests that are required to run remotely, I could work on a proper fix to try to achieve the same results. Best regards, Etrunko -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Fri May 27 18:49:24 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 27 May 2011 15:49:24 -0300 Subject: [Libvirt-cim] [PATCH] Cimtest: Handle keyboard interrupt Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306522145 10800 # Node ID c7ff1c6e7cb60b37ce6d2ce4fbf58535b3b3fc9e # Parent 01aa645a1e1269eb31d1fdd9de8d7e9120f5fa74 Cimtest: Handle keyboard interrupt During my tests I have noticed that if the user interrupts the program execution, by pressing Ctrl+C, the next time cimtest runs, it will fail due to leftovers of previous execution, especially, a disk pool called cimtest-diskpool and a network called cimtest-netpool. With this patch, if a KeyboardInterrupt exception occurs, the cleanup_env() function will be called before the program exit. Signed-off-by: Eduardo Lima (Etrunko) diff --git a/suites/libvirt-cim/main.py b/suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py +++ b/suites/libvirt-cim/main.py @@ -176,8 +176,7 @@ testsuite.debug("%s %sh | %smin | %ssec | %smsec" % (prefix, h, m, s, msec)) -def main(): - (options, args) = parser.parse_args() +def main(options, args): to_addr = None from_addr = None relay = None @@ -302,7 +301,21 @@ (from_addr, to_addr, relay) send_report(to_addr, from_addr, relay, msg_body, heading) + return 0 +# main() + if __name__ == '__main__': - sys.exit(main()) + try: + options, args = parser.parse_args() + ret = main(options, args) + except (KeyboardInterrupt, SystemExit): + ret = -1 + print "\nKeyboardInterrupt. Cleaning up..." + status = cleanup_env(options.ip, options.virt) + if status != PASS: + print "Unable to clean up. Please check your environment." + else: + print "Clean up successful" + sys.exit(ret) From eblima at linux.vnet.ibm.com Fri May 27 19:01:30 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 27 May 2011 16:01:30 -0300 Subject: [Libvirt-cim] [PATCH] #2 Cimtest: Handle keyboard interrupt Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306522145 10800 # Node ID c8670eeacbb02db390825e4dda776a2a4cf67ff8 # Parent 01aa645a1e1269eb31d1fdd9de8d7e9120f5fa74 Cimtest: Handle keyboard interrupt During my tests I have noticed that if the user interrupts the program execution, by pressing Ctrl+C, the next time cimtest runs, it will fail due to leftovers of previous execution, especially, a disk pool called cimtest-diskpool and a network called cimtest-netpool. With this patch, if a KeyboardInterrupt exception occurs, the cleanup_env() function will be called before the program exit. Changes from #1: * Avoid NameError (ret) if another exception other than KeyboardInterrupt occurs Signed-off-by: Eduardo Lima (Etrunko) diff --git a/suites/libvirt-cim/main.py b/suites/libvirt-cim/main.py --- a/suites/libvirt-cim/main.py +++ b/suites/libvirt-cim/main.py @@ -176,8 +176,7 @@ testsuite.debug("%s %sh | %smin | %ssec | %smsec" % (prefix, h, m, s, msec)) -def main(): - (options, args) = parser.parse_args() +def main(options, args): to_addr = None from_addr = None relay = None @@ -302,7 +301,21 @@ (from_addr, to_addr, relay) send_report(to_addr, from_addr, relay, msg_body, heading) + return 0 +# main() + if __name__ == '__main__': - sys.exit(main()) + ret = -1 + try: + options, args = parser.parse_args() + ret = main(options, args) + except (KeyboardInterrupt, SystemExit): + print "\nKeyboardInterrupt. Cleaning up..." + status = cleanup_env(options.ip, options.virt) + if status != PASS: + print "Unable to clean up. Please check your environment." + else: + print "Clean up successful" + sys.exit(ret) From eblima at linux.vnet.ibm.com Fri May 27 19:04:31 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Fri, 27 May 2011 16:04:31 -0300 Subject: [Libvirt-cim] [PATCH] Cimtest: Handle keyboard interrupt In-Reply-To: References: Message-ID: <4DDFF5BF.5050308@linux.vnet.ibm.com> On 05/27/2011 03:49 PM, Eduardo Lima (Etrunko) wrote: > # HG changeset patch > # User Eduardo Lima (Etrunko) > # Date 1306522145 10800 > # Node ID c7ff1c6e7cb60b37ce6d2ce4fbf58535b3b3fc9e > # Parent 01aa645a1e1269eb31d1fdd9de8d7e9120f5fa74 > Cimtest: Handle keyboard interrupt > > During my tests I have noticed that if the user interrupts the program > execution, by pressing Ctrl+C, the next time cimtest runs, it will fail > due to leftovers of previous execution, especially, a disk pool called > cimtest-diskpool and a network called cimtest-netpool. > > With this patch, if a KeyboardInterrupt exception occurs, the > cleanup_env() function will be called before the program exit. > > Signed-off-by: Eduardo Lima (Etrunko) > > diff --git a/suites/libvirt-cim/main.py b/suites/libvirt-cim/main.py > --- a/suites/libvirt-cim/main.py > +++ b/suites/libvirt-cim/main.py > @@ -176,8 +176,7 @@ > testsuite.debug("%s %sh | %smin | %ssec | %smsec" % > (prefix, h, m, s, msec)) > > -def main(): > - (options, args) = parser.parse_args() > +def main(options, args): > to_addr = None > from_addr = None > relay = None > @@ -302,7 +301,21 @@ > (from_addr, to_addr, relay) > send_report(to_addr, from_addr, relay, msg_body, heading) > > + return 0 > +# main() > + > if __name__ == '__main__': > - sys.exit(main()) > + try: > + options, args = parser.parse_args() > + ret = main(options, args) > + except (KeyboardInterrupt, SystemExit): > + ret = -1 > + print "\nKeyboardInterrupt. Cleaning up..." > + status = cleanup_env(options.ip, options.virt) > + if status != PASS: > + print "Unable to clean up. Please check your environment." > + else: > + print "Clean up successful" > > + sys.exit(ret) -1. If other exception than KeyboardInterrupt, SystemExit occurs, we will have a NameError exception: Traceback (most recent call last): File "main.py", line 316, in sys.exit(ret) NameError: name 'ret' is not defined A new patch fixing this is on the way. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com From eblima at linux.vnet.ibm.com Mon May 30 16:57:03 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 30 May 2011 13:57:03 -0300 Subject: [Libvirt-cim] [PATCH] Cimtest: Use python xml to parse virsh net-dumpxml output Message-ID: <51bd999e881e96c8c2af.1306774623@etrunko-t410.br.ibm.com> # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306533151 10800 # Node ID 51bd999e881e96c8c2af698a7968d00b7009aaf2 # Parent 589512c8ddff8224f16fbaa4348cc17df4d0536a Cimtest: Use python xml to parse virsh net-dumpxml output Signed-off-by: Eduardo Lima (Etrunko) diff --git a/suites/libvirt-cim/lib/XenKvmLib/vxml.py b/suites/libvirt-cim/lib/XenKvmLib/vxml.py --- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py +++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py @@ -38,6 +38,12 @@ import pywbem from xml.dom import minidom, Node from xml import xpath + +try: + from xml.etree import cElementTree as ElementTree +except: + from xml.etree import ElementTree + from VirtLib import utils, live from XenKvmLib.xm_virt_util import get_bridge_from_network_xml, bootloader, \ net_list @@ -210,6 +216,17 @@ else: vbr = bridgename return vbr + # get_valid_bridge_name + + def _parse_net_dumpxml(_xml): + try: + root = ElementTree.fromstring(_xml) + ip_element = root.find("ip") + return ip_element.get("address") + except: + logger.error("Encounter error dump netxml") + return None + # _parse_net_dumpxml self.vbr = get_valid_bridge_name(server) if self.vbr is None: @@ -223,7 +240,7 @@ self.server = server if is_new_net is False: - cmd = "virsh net-dumpxml %s 2>/dev/null" % self.net_name + cmd = "virsh -c %s net-dumpxml %s 2>/dev/null" % (self.vuri, self.net_name) s, net_xml = utils.run_remote(server, cmd) if s != 0: logger.error("Encounter error dump netxml") @@ -245,10 +262,13 @@ n_list = net_list(server, virt) for _net_name in n_list: - cmd = "virsh net-dumpxml %s 2>/dev/null | \ - awk '/ip address/ {print}' | \ - cut -d ' ' -f 4 | sed 's/address=//'" % _net_name - s, in_use_addr = utils.run_remote(server, cmd) + cmd = "virsh -c %s net-dumpxml %s 2>/dev/null" % (self.vuri, _net_name) + s, xml = utils.run_remote(server, cmd) + + in_use_addr = _parse_net_dumpxml(xml) + if in_use_addr is None: + logger.error("Unable to find IP address") + return None sub_net_in_use = in_use_addr sub_net_in_use = sub_net_in_use.rsplit('.', 1)[0].strip("'") + "." @@ -310,7 +330,7 @@ self.server = server if is_new_pool is False: - cmd = "virsh pool-dumpxml %s 2>/dev/null" % self.pool_name + cmd = "virsh -c %s pool-dumpxml %s 2>/dev/null" % (self.vuri, self.pool_name) s, disk_xml = utils.run_remote(server, cmd) if s != 0: logger.error("Encounter error dump netxml") From eblima at linux.vnet.ibm.com Mon May 30 17:35:03 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Mon, 30 May 2011 14:35:03 -0300 Subject: [Libvirt-cim] CIMTest run performance In-Reply-To: <4DDFC317.2070502@linux.vnet.ibm.com> References: <4DDFC317.2070502@linux.vnet.ibm.com> Message-ID: <4DE3D547.4010805@linux.vnet.ibm.com> On 05/27/2011 12:28 PM, Eduardo Lima (Etrunko) wrote: > Hello all, > > I had been trying to set up cimtest to work on my machine for a couple > of days without success. So yesterday I started to dig the code and > found that every command is sent via ssh, even if the test is supposed > to run locally. > > The reason of cimtest not working was exactly that did not have the ssh > keys set up properly. By fixing that configuration, I was able to make > the test work as expected. :) > > But I was still intrigued with the fact that every command is sent via > ssh, thus taking cimtest a very very long time to complete. So I hacked > a simple patch to try to workaround this issue: [snip] > As you can see, it is a quick check if 'ip' is neither localhost nor > 127.0.0.1, which only in that case the command is sent via ssh. > > Note that this patch triggers some other issues, which I hope to be able > to fix soon. But there is already a *huge increase* in the performance. > I have used the most simpler and probably not the most correct measure: So I have went somewhat deeper in my investigations and found most of the issues triggered by that patch. An updated version can be found attached to this message. > > _BUT_, I can't really tell if it is actually intended that everything > runs with ssh. Taking a look on the test results, it is noticeable that > cimtest behaves in a different way, as follows. > Now the behavior of cimtest with the patch applied is much more similar to the version without the patch. 158 tests are labeled PASS, and only 3 that were FAIL without patch are now SKIP. Unfortunately I don't have access to the test machine at the moment, so I am not able to provide the detailed report, which I will do as soon as possible. > > I would really appreciate comments from the experts on this issue. IMHO, > it is something really worthy and if there are any tests that are > required to run remotely, I could work on a proper fix to try to achieve > the same results. > Still waiting for some light regarding this issue. Best Regards, -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: dont_execute_local_via_ssh.patch Type: text/x-diff Size: 3243 bytes Desc: not available URL: From eblima at linux.vnet.ibm.com Tue May 31 18:34:35 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 31 May 2011 15:34:35 -0300 Subject: [Libvirt-cim] CIMTest run performance In-Reply-To: <4DE3D547.4010805@linux.vnet.ibm.com> References: <4DDFC317.2070502@linux.vnet.ibm.com> <4DE3D547.4010805@linux.vnet.ibm.com> Message-ID: <4DE534BB.3090605@linux.vnet.ibm.com> On 05/30/2011 02:35 PM, Eduardo Lima (Etrunko) wrote: > > Now the behavior of cimtest with the patch applied is much more similar > to the version without the patch. 158 tests are labeled PASS, and only 3 > that were FAIL without patch are now SKIP. Unfortunately I don't have > access to the test machine at the moment, so I am not able to provide > the detailed report, which I will do as soon as possible. > I have found similar cases of commands running locally with unexpected behavior, so I went on and applied the same modifications applied for commands which involved awk to basically all other commands I could find. Some tests are still being skipped when running locally, but those tests fail when run via ssh. A special case is test VirtualSystemManagementService - 27_definesystem_macvtap_dev.py which fails only without the patch. Attached, you can find the latest version of the patch and reports of the test suite run both with and without the patch applied. -- Eduardo de Barros Lima Software Engineer, Open Virtualization Linux Technology Center - IBM/Brazil eblima at br.ibm.com -------------- next part -------------- A non-text attachment was scrubbed... Name: dont_use_ssh_locally.patch Type: text/x-diff Size: 12080 bytes Desc: not available URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: run_report.txt.without_patch URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: run_report.txt.with_patch URL: From eblima at linux.vnet.ibm.com Tue May 31 20:41:07 2011 From: eblima at linux.vnet.ibm.com (Eduardo Lima (Etrunko)) Date: Tue, 31 May 2011 17:41:07 -0300 Subject: [Libvirt-cim] [PATCH] Update RPM spec file to match Fedora Message-ID: # HG changeset patch # User Eduardo Lima (Etrunko) # Date 1306874177 10800 # Node ID da242202e48891c6003c21817ecf67844b91b1a6 # Parent f934d53d40ef2521b6b8242c06a58db84f85f71f Update RPM spec file to match Fedora Signed-off-by: Eduardo Lima (Etrunko) diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in --- a/libvirt-cim.spec.in +++ b/libvirt-cim.spec.in @@ -10,11 +10,13 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/CIM/ Requires: libxml2 >= 2.6.0 -Requires: libvirt >= 0.6.3 +Requires: libvirt >= 0.6.4 Requires: unzip +Requires: tog-pegasus +BuildRequires: libcmpiutil >= 0.5.4 BuildRequires: tog-pegasus-devel -BuildRequires: libvirt-devel >= 0.5.4 -BuildRequires: e2fsprogs-devel +BuildRequires: libvirt-devel >= 0.6.4 +BuildRequires: libuuid-devel BuildRequires: libxml2-devel BuildRequires: libcmpiutil-devel BuildConflicts: sblim-cmpi-devel @@ -27,11 +29,11 @@ %prep %setup -q -chmod -x src/* libxkutil/* schema/* README doc/* base_schema/README* -chmod +X src/* libxkutil/* schema/* %build %configure --disable-werror +sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool +sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool make %{?_smp_mflags} %install @@ -43,6 +45,9 @@ rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.la rm -f $RPM_BUILD_ROOT%{_libdir}/cmpi/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/libxkutil.so +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +echo %{_libdir}/cmpi > $RPM_BUILD_ROOT/etc/ld.so.conf.d/libvirt-cim.conf +mkdir -p $RPM_BUILD_ROOT at INFO_STORE@ %clean rm -fr $RPM_BUILD_ROOT @@ -60,17 +65,19 @@ %define CIMV2_REG %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,ElementConformsToProfile,HostedAccessPoint}.registration %define CIMV2_MOF %{_datadir}/%{name}/{HostedResourcePool,ElementCapabilities,HostedService,HostedDependency,RegisteredProfile,ComputerSystem,ElementConformsToProfile,HostedAccessPoint}.mof +# _If_ there is already a version of this installed, we must deregister +# the classes we plan to install in post, otherwise we may corrupt +# the pegasus repository. This is convention in other provider packages %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %post /sbin/ldconfig -mkdir -p @INFO_STORE@ %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} -/etc/init.d/tog-pegasus restart +/etc/init.d/tog-pegasus condrestart %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n @CIM_VIRT_NS@ \ @@ -93,25 +100,34 @@ -n @CIM_VIRT_NS@ \ -r %{REGISTRATION} -m %{SCHEMA} >/dev/null 2>&1 || true %{_datadir}/%{name}/provider-register.sh -d -t pegasus \ - -n root/PG_InterOp \ - -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true + -n root/interop \ + -r %{INTEROP_REG} -m %{INTEROP_MOF} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -d -t pegasus \ + -n root/PG_InterOp \ + -r %{PGINTEROP_REG} -m %{PGINTEROP_MOF} >/dev/null 2>&1 || true +%{_datadir}/%{name}/provider-register.sh -d -t pegasus \ + -n root/cimv2 \ + -r %{CIMV2_REG} -m %{CIMV2_MOF} >/dev/null 2>&1 || true %postun -p /sbin/ldconfig -%files +%files %defattr(-, root, root) +%{_sysconfdir}/libvirt/cim %doc README COPYING doc/CodingStyle doc/SubmittingPatches %doc base_schema/README.DMTF %doc doc/*.html %{_libdir}/lib*.so* %{_libdir}/cmpi/lib*.so* +%{_datadir}/libvirt-cim %{_datadir}/libvirt-cim/*.sh %{_datadir}/libvirt-cim/*.mof %{_datadir}/libvirt-cim/cimv*-interop_mof %{_datadir}/libvirt-cim/cimv*-cimv2_mof %{_datadir}/libvirt-cim/*.registration %{_datadir}/libvirt-cim/cim_schema_*-MOFs.zip +%{_sysconfdir}/ld.so.conf.d/libvirt-cim.conf %changelog * Wed Oct 28 2009 Richard Maciel - 0.1-1 From cvincent at linux.vnet.ibm.com Tue May 31 22:02:13 2011 From: cvincent at linux.vnet.ibm.com (Chip Vincent) Date: Tue, 31 May 2011 15:02:13 -0700 Subject: [Libvirt-cim] CIMTest run performance In-Reply-To: <4DE3D547.4010805@linux.vnet.ibm.com> References: <4DDFC317.2070502@linux.vnet.ibm.com> <4DE3D547.4010805@linux.vnet.ibm.com> Message-ID: <4DE56565.4090007@linux.vnet.ibm.com> Functionally, I can't think of a single reason why the tests are always run remotely. I always run wbemcli and virsh commands locally, not through ssh, so I can't imagine why cimtest should be different. It is curious that the tests behave different with the patch. I would only expect the migration tests to behave different if, for example, the test checks the VM made it to the destination system. Rather than make this auto-detect, why not make it manually configurable in the near term so we can do more testing? On 05/30/2011 10:35 AM, Eduardo Lima (Etrunko) wrote: > On 05/27/2011 12:28 PM, Eduardo Lima (Etrunko) wrote: >> Hello all, >> >> I had been trying to set up cimtest to work on my machine for a couple >> of days without success. So yesterday I started to dig the code and >> found that every command is sent via ssh, even if the test is supposed >> to run locally. >> >> The reason of cimtest not working was exactly that did not have the ssh >> keys set up properly. By fixing that configuration, I was able to make >> the test work as expected. :) >> >> But I was still intrigued with the fact that every command is sent via >> ssh, thus taking cimtest a very very long time to complete. So I hacked >> a simple patch to try to workaround this issue: > > [snip] > >> As you can see, it is a quick check if 'ip' is neither localhost nor >> 127.0.0.1, which only in that case the command is sent via ssh. >> >> Note that this patch triggers some other issues, which I hope to be able >> to fix soon. But there is already a *huge increase* in the performance. >> I have used the most simpler and probably not the most correct measure: > > So I have went somewhat deeper in my investigations and found most of > the issues triggered by that patch. An updated version can be found > attached to this message. > >> >> _BUT_, I can't really tell if it is actually intended that everything >> runs with ssh. Taking a look on the test results, it is noticeable that >> cimtest behaves in a different way, as follows. >> > > Now the behavior of cimtest with the patch applied is much more similar > to the version without the patch. 158 tests are labeled PASS, and only 3 > that were FAIL without patch are now SKIP. Unfortunately I don't have > access to the test machine at the moment, so I am not able to provide > the detailed report, which I will do as soon as possible. > >> >> I would really appreciate comments from the experts on this issue. IMHO, >> it is something really worthy and if there are any tests that are >> required to run remotely, I could work on a proper fix to try to achieve >> the same results. >> > > Still waiting for some light regarding this issue. > > Best Regards, > > > > _______________________________________________ > Libvirt-cim mailing list > Libvirt-cim at redhat.com > https://www.redhat.com/mailman/listinfo/libvirt-cim -- Chip Vincent Open Virtualization IBM Linux Technology Center cvincent at linux.vnet.ibm.com