[PATCHv2 0/8] Additional patches for 0.6.2

This series replaces my last set. It is a followup after rebase and rework to: https://www.redhat.com/archives/libvirt-cim/2013-March/msg00029.html Changes in v2: * Rework libxkutil/cs_util_instance.c to mirror functions as requested * Rework src/Virt_DevicePool.c to mirror functions as requested * Just merged the Makefile.am changes into one * Previous patch 4/10 to CSI is removed due to code change already posted Still to be reviewed is Makefile.am. John Ferlan (8): Makefile.am: Remove the $(top_srcdir) from subst command libvirt-cim.spec: Use systemctl for tog-pegasus restart Remove empty newline at bottom xmlgen: Only support script on bridge for xen domains libxkutil: Use virConnectListAllDomains() to fetch domains libxkutil: Adjust get_dominfo() logic DevicePool: Use the virConnectListAll interfaces register: Adjust the chatter output Makefile.am | 18 +-- libvirt-cim.spec.in | 12 +- libxkutil/cs_util_instance.c | 24 ++++ libxkutil/device_parsing.c | 7 +- libxkutil/xmlgen.c | 25 +++-- provider-register.sh | 9 +- schema/SwitchService.registration | 1 - src/Virt_DevicePool.c | 230 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 296 insertions(+), 30 deletions(-) -- 1.8.1.4

During the postinstall and preuninstall phases various variables are modified to build up the list of mofs to be installed. The generated output had ".//usr/local/share/libvirt-cim/*" which caused issues finding files. This is a followup to commit '22022870' which changed the paths using to schema for each of the variables. --- Makefile.am | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Makefile.am b/Makefile.am index 0fdd8bb..63ed3c7 100644 --- a/Makefile.am +++ b/Makefile.am @@ -189,7 +189,7 @@ install-data-local: $(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_MOFS) $(install_sh_DATA) -t "$(DESTDIR)$(pkgdatadir)" $(INTEROP_REGS) if [[ @CIMSERVER@ != pegasus ]]; then \ - sed -i '/^# --/,/^# --!/d' $(subst ./schema,$(DESTDIR)$(pkgdatadir), $(PGINTEROP_REGS)); \ + sed -i '/^# --/,/^# --!/d' $(subst $(top_srcdir)/schema,$(DESTDIR)$(pkgdatadir), $(PGINTEROP_REGS)); \ fi uninstall-local: @@ -206,21 +206,21 @@ preinstall: # Un/Register the providers and class definitions from/to the current CIMOM. # @CIMSERVER@ is set by the configure script postinstall: - sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst schema,$(pkgdatadir), $(REGS)) -m $(subst schema,$(pkgdatadir), $(MOFS)) - sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(INTEROP_MOFS)) - sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst schema,$(pkgdatadir), $(CIMV2_MOFS)) + sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS)) + sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS)) + sh provider-register.sh -v -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS)) if [[ @CIMSERVER@ = pegasus ]]; then \ - sh provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \ + sh provider-register.sh -v -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \ fi virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true mkdir -p $(INFO_STORE) preuninstall: - sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst schema,$(pkgdatadir), $(REGS)) -m $(subst schema,$(pkgdatadir), $(MOFS)) - sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(INTEROP_MOFS)) - sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst schema,$(pkgdatadir), $(CIMV2_MOFS)) + sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(MOFS)) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/interop -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(INTEROP_MOFS)) + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/cimv2 -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(CIMV2_MOFS)) if [[ @CIMSERVER@ = pegasus ]]; then \ - sh provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \ + sh provider-register.sh -v -d -t @CIMSERVER@ -n root/PG_InterOp -r $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_REGS)) -m $(subst $(top_srcdir)/schema,$(pkgdatadir), $(PGINTEROP_MOFS)); \ fi rpm: clean -- 1.8.1.4

For Fedora 17 and RHEL7 use systemd, so change the pegasus startup to use that and make a dependency upon it. --- libvirt-cim.spec.in | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libvirt-cim.spec.in b/libvirt-cim.spec.in index 3def978..0679d7f 100644 --- a/libvirt-cim.spec.in +++ b/libvirt-cim.spec.in @@ -6,7 +6,7 @@ Version: @PACKAGE_VERSION@ Release: 1%{?dist}%{?extra_release} License: LGPLv2+ Group: Development/Libraries -Source: libvirt-cim-%{version}.tar.gz +Source: ftp://libvirt.org/libvirt-cim/libvirt-cim-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root URL: http://libvirt.org/CIM/ Requires: libxml2 >= 2.6.0 @@ -27,6 +27,9 @@ BuildRequires: libconfig-devel BuildRequires: libxml2-devel BuildRequires: libcmpiutil-devel +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 +BuildRequires: systemd-units +%endif BuildConflicts: sblim-cmpi-devel %description @@ -85,7 +88,12 @@ rm -fr $RPM_BUILD_ROOT %{_datadir}/%{name}/install_base_schema.sh %{_datadir}/%{name} -/etc/init.d/tog-pegasus condrestart +# Fedora 17 / RHEL-7 are first where we use systemd. +%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7 + systemctl restart tog-pegasus +%else + /etc/init.d/tog-pegasus condrestart +%endif %{_datadir}/%{name}/provider-register.sh -t pegasus \ -n @CIM_VIRT_NS@ \ -- 1.8.1.4

--- schema/SwitchService.registration | 1 - 1 file changed, 1 deletion(-) diff --git a/schema/SwitchService.registration b/schema/SwitchService.registration index b8e4f23..82a5c04 100644 --- a/schema/SwitchService.registration +++ b/schema/SwitchService.registration @@ -3,4 +3,3 @@ Xen_SwitchService root/virt Virt_SwitchService Virt_SwitchService instance KVM_SwitchService root/virt Virt_SwitchService Virt_SwitchService instance LXC_SwitchService root/virt Virt_SwitchService Virt_SwitchService instance - -- 1.8.1.4

A change was made in 0.9.10 to disallow a script on a bridge device for qemu guests, see 'libvirt' commit id '1734cdb99'. --- libxkutil/xmlgen.c | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/libxkutil/xmlgen.c b/libxkutil/xmlgen.c index 2dcd0d2..099fdd2 100644 --- a/libxkutil/xmlgen.c +++ b/libxkutil/xmlgen.c @@ -270,16 +270,21 @@ static const char *set_net_source(xmlNodePtr nic, } -static const char *bridge_net_to_xml(xmlNodePtr nic, struct net_device *dev) +static const char *bridge_net_to_xml(xmlNodePtr nic, struct net_device *dev, + int domtype) { const char *script = "vif-bridge"; xmlNodePtr tmp; const char *msg = NULL; - tmp = xmlNewChild(nic, NULL, BAD_CAST "script", NULL); - if (tmp == NULL) - return XML_ERROR; - xmlNewProp(tmp, BAD_CAST "path", BAD_CAST script); + /* Scripts only supported on Xen guests see 'libvirt' + * commit id 1734cdb99 (since 0.9.10) */ + if (domtype == DOMAIN_XENPV || domtype == DOMAIN_XENFV) { + tmp = xmlNewChild(nic, NULL, BAD_CAST "script", NULL); + if (tmp == NULL) + return XML_ERROR; + xmlNewProp(tmp, BAD_CAST "path", BAD_CAST script); + } msg = set_net_source(nic, dev, "bridge"); @@ -375,13 +380,13 @@ static const char *net_xml(xmlNodePtr root, struct domain *dominfo) } #endif - if (STREQ(dev->dev.net.type, "network")) + if (STREQ(dev->dev.net.type, "network")) { msg = set_net_source(nic, net, "network"); - else if (STREQ(dev->dev.net.type, "bridge")) - msg = bridge_net_to_xml(nic, net); - else if (STREQ(dev->dev.net.type, "user")) + } else if (STREQ(dev->dev.net.type, "bridge")) { + msg = bridge_net_to_xml(nic, net, dominfo->type); + } else if (STREQ(dev->dev.net.type, "user")) { continue; - else if (STREQ(dev->dev.net.type, "direct")) { + } else if (STREQ(dev->dev.net.type, "direct")) { msg = set_net_source(nic, net, "direct"); if (net->vsi.vsi_type != NULL) { struct vsi_device *vsi = &dev->dev.net.vsi; -- 1.8.1.4

This is an optimization over using the multistep approach to get a count, get some memory, and get the list of domains (active and defined). Followed other examples to ensure only building the code if the libvirt version is correct. The API was added in 0.9.13. --- libxkutil/cs_util_instance.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/libxkutil/cs_util_instance.c b/libxkutil/cs_util_instance.c index a383147..e95052a 100644 --- a/libxkutil/cs_util_instance.c +++ b/libxkutil/cs_util_instance.c @@ -33,6 +33,29 @@ #include "cs_util.h" #include <libcmpiutil/libcmpiutil.h> +#if LIBVIR_VERSION_NUMBER >= 9013 +int get_domain_list(virConnectPtr conn, virDomainPtr **_list) +{ + virDomainPtr *nameList = NULL; + int n_names; + int flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE | + VIR_CONNECT_LIST_DOMAINS_INACTIVE; + + n_names = virConnectListAllDomains(conn, + &nameList, + flags); + if (n_names > 0) { + *_list = nameList; + } else if (n_names == 0) { + /* Since there are no elements, no domain ptrs to free + * but still must free the nameList returned + */ + free(nameList); + } + + return n_names; +} +#else int get_domain_list(virConnectPtr conn, virDomainPtr **_list) { char **names = NULL; @@ -113,6 +136,7 @@ int get_domain_list(virConnectPtr conn, virDomainPtr **_list) return idx; } +#endif /* LIBVIR_VERSION_NUMBER >= 0913 */ void set_instance_class_name(CMPIInstance *instance, char *name) { -- 1.8.1.4

Need to really handle the error on the get_dominfo_from_xml() call Need to be sure to free(xml) before returning --- libxkutil/device_parsing.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libxkutil/device_parsing.c b/libxkutil/device_parsing.c index 845a953..264d4cc 100644 --- a/libxkutil/device_parsing.c +++ b/libxkutil/device_parsing.c @@ -1246,7 +1246,7 @@ int get_dominfo_from_xml(const char *xml, struct domain **dominfo) int get_dominfo(virDomainPtr dom, struct domain **dominfo) { char *xml; - int ret; + int ret = 0; int start; xml = virDomainGetXMLDesc(dom, VIR_DOMAIN_XML_INACTIVE | VIR_DOMAIN_XML_SECURE); @@ -1256,18 +1256,17 @@ int get_dominfo(virDomainPtr dom, struct domain **dominfo) return 0; } - ret = get_dominfo_from_xml(xml, dominfo); - if (ret != 1) { + if (get_dominfo_from_xml(xml, dominfo) == 0) { CU_DEBUG("Failed to translate xml into struct domain"); goto out; } if (virDomainGetAutostart(dom, &start) != 0) { CU_DEBUG("Failed to get dom autostart with libvirt API."); - ret = 0; goto out; } (*dominfo)->autostrt = start; + ret = 1; out: free(xml); -- 1.8.1.4

Rather than the somewhat unreliable get a count and get a list of active names, use the newer virConnectListAll* interfaces in order to retrieve both a count and list in one call. --- src/Virt_DevicePool.c | 230 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 230 insertions(+) diff --git a/src/Virt_DevicePool.c b/src/Virt_DevicePool.c index 185e3cc..bfca972 100644 --- a/src/Virt_DevicePool.c +++ b/src/Virt_DevicePool.c @@ -142,6 +142,76 @@ int get_disk_pool(virStoragePoolPtr poolptr, struct virt_pool **pool) return ret; } +#if LIBVIR_VERSION_NUMBER >= 100002 +static int get_diskpool_config(virConnectPtr conn, + struct tmp_disk_pool **_pools, + int *_count) +{ + int i, realcount = 0, count = 0; + virStoragePoolPtr *nameList = NULL; + int flags = VIR_CONNECT_LIST_STORAGE_POOLS_ACTIVE; + struct tmp_disk_pool *pools = NULL; + int ret = 0; + bool bret; + + realcount = virConnectListAllStoragePools(conn, + &nameList, + flags); + if (realcount < 0) { + CU_DEBUG("Failed to get storage pools, return %d.", realcount); + ret = realcount; + goto out; + } + if (realcount == 0) { + CU_DEBUG("Zero pools got, but prelist is %d.", count); + goto set_parent; + } + + pools = calloc(realcount, sizeof(*pools)); + if (pools == NULL) { + CU_DEBUG("Failed to alloc space for %i pool structs", + realcount); + ret = -2; + goto free_names; + } + + for (i = 0; i < realcount; i++) { + pools[i].tag = strdup(virStoragePoolGetName(nameList[i])); + if (pools[i].tag == NULL) { + CU_DEBUG("Failed in strdup for storage pool name."); + ret = -3; + goto free_pools; + } + pools[i].primordial = false; + } + + set_parent: + bret = get_disk_parent(&pools, &realcount); + if (bret != true) { + CU_DEBUG("Failed in adding parentpool."); + ret = -4; + goto free_pools; + } + + /* succeed */ + *_pools = pools; + *_count = realcount; + goto free_names; + + free_pools: + free_diskpool(pools, realcount); + + free_names: + if (nameList != NULL) { + for (i = 0; i < realcount; i++) + virStoragePoolFree(nameList[i]); + free(nameList); + } + + out: + return ret; +} +#else /* This function returns 0 on sucess, negative on fail. */ static int get_diskpool_config(virConnectPtr conn, struct tmp_disk_pool **_pools, @@ -219,6 +289,7 @@ static int get_diskpool_config(virConnectPtr conn, out: return ret; } +#endif /* LIBVIR_VERSION_NUMBER >= 100002 */ static bool diskpool_set_capacity(virConnectPtr conn, CMPIInstance *inst, @@ -524,6 +595,46 @@ static char *diskpool_member_of(const CMPIBroker *broker, return pool; } + +#if LIBVIR_VERSION_NUMBER >= 100002 +static virNetworkPtr bridge_to_network(virConnectPtr conn, + const char *bridge) +{ + int i, num; + virNetworkPtr *nameList = NULL; + virNetworkPtr network = NULL; + int flags = VIR_CONNECT_LIST_NETWORKS_ACTIVE; + + num = virConnectListAllNetworks(conn, + &nameList, + flags); + if (num < 0) { + CU_DEBUG("Failed to get network pools."); + return NULL; + } + + for (i = 0; i < num; i++) { + const char *_netname; + char *_bridge; + + _netname = virNetworkGetName(nameList[i]); + _bridge = virNetworkGetBridgeName(network); + CU_DEBUG("Network `%s' has bridge `%s'", _netname, _bridge); + if (STREQ(bridge, _bridge)) { + network = nameList[i]; + nameList[i] = NULL; + i = num; /* Loop breaker */ + } + free(_bridge); + } + + for (i = 0; i < num; i++) { + virNetworkFree(nameList[i]); + } + free(nameList); + return network; +} +#else static virNetworkPtr bridge_to_network(virConnectPtr conn, const char *bridge) { @@ -567,6 +678,7 @@ static virNetworkPtr bridge_to_network(virConnectPtr conn, return network; } +#endif /* LIBVIR_VERSION_NUMBER >= 100002 */ static char *_netpool_member_of(virConnectPtr conn, const struct net_device *ndev) @@ -743,6 +855,39 @@ static bool mempool_set_total(CMPIInstance *inst, virConnectPtr conn) return memory != 0; } +#if LIBVIR_VERSION_NUMBER >= 9013 +static bool mempool_set_consumed(CMPIInstance *inst, virConnectPtr conn) +{ + uint64_t memory = 0; + virDomainPtr *nameList = NULL; + int n_names, i; + int flags = VIR_CONNECT_LIST_DOMAINS_ACTIVE; + + n_names = virConnectListAllDomains(conn, + &nameList, + flags); + if (n_names < 0) { + CU_DEBUG("Failed to get a list of all domains"); + goto out; + } + + for (i = 0; i < n_names; i++) { + virDomainInfo dom_info; + if (virDomainGetInfo(nameList[i], &dom_info) == 0) + memory += dom_info.memory; + virDomainFree(nameList[i]); + } + free(nameList); + + out: + CMSetProperty(inst, "Reserved", + (CMPIValue *)&memory, CMPI_uint64); + CMSetProperty(inst, "CurrentlyConsumedResource", + (CMPIValue *)&memory, CMPI_uint64); + + return memory != 0; +} +#else static bool mempool_set_consumed(CMPIInstance *inst, virConnectPtr conn) { uint64_t memory = 0; @@ -787,6 +932,7 @@ static bool mempool_set_consumed(CMPIInstance *inst, virConnectPtr conn) return memory != 0; } +#endif /* LIBVIR_VERSION_NUMBER >= 9013 */ static bool procpool_set_total(CMPIInstance *inst, virConnectPtr conn) { @@ -1026,6 +1172,89 @@ static CMPIStatus _netpool_for_network(struct inst_list *list, return s; } +#if LIBVIR_VERSION_NUMBER >= 100002 +static CMPIStatus netpool_instance(virConnectPtr conn, + struct inst_list *list, + const char *ns, + const char *id, + const CMPIBroker *broker) +{ + CMPIStatus s = {CMPI_RC_OK, NULL}; + char **netnames = NULL; + int i; + int nets = 0; + virNetworkPtr *nameList = NULL; + int flags = VIR_CONNECT_LIST_NETWORKS_ACTIVE; + + if (id != NULL) { + return _netpool_for_network(list, + ns, + conn, + id, + pfx_from_conn(conn), + broker); + } + + nets = virConnectListAllNetworks(conn, + &nameList, + flags); + if (nets < 0) { + virt_set_status(broker, &s, + CMPI_RC_ERR_FAILED, + conn, + "Unable to list networks"); + + goto out; + } + + /* +1 for our primordial entry */ + netnames = calloc(nets+1, sizeof(*netnames)); + if (netnames == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Failed to allocate memory for %i net names", nets); + goto out; + } + + for (i = 0; i < nets; i++) { + netnames[i] = strdup(virNetworkGetName(nameList[i])); + if (netnames[i] == NULL) { + cu_statusf(broker, &s, + CMPI_RC_ERR_FAILED, + "Failed to strdup memory for %i net names", + nets); + goto out; + } + } + + /* Remember we allocated extra slot already */ + netnames[nets] = strdup("0"); + + for (i = 0; i < nets + 1; i++) { + _netpool_for_network(list, + ns, + conn, + netnames[i], + pfx_from_conn(conn), + broker); + } + + out: + if (nameList != NULL) { + for (i = 0; i < nets; i++) + virNetworkFree(nameList[i]); + free(nameList); + } + if (netnames != NULL) { + /* +1 to account for primordial */ + for (i = 0; i < nets + 1; i++) + free(netnames[i]); + free(netnames); + } + + return s; +} +#else static CMPIStatus netpool_instance(virConnectPtr conn, struct inst_list *list, const char *ns, @@ -1095,6 +1324,7 @@ static CMPIStatus netpool_instance(virConnectPtr conn, return s; } +#endif /* LIBVIR_VERSION_NUMBER >= 100002 */ static CMPIInstance *diskpool_from_path(struct tmp_disk_pool *pool, virConnectPtr conn, -- 1.8.1.4

Caused error during make postinstall. Rather than print the $PROVIDERMODULES it attempted to execute the second one in the list. Added extra output just prior to CIMMOF commands to show which namespace is being modified from which directory. There appears to be some sort of issue registering some mofs as the following message is generated numerous times: Warning: the instance already exists. In this implementation, that means it cannot be changed. --- provider-register.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/provider-register.sh b/provider-register.sh index 0616a14..b907df1 100755 --- a/provider-register.sh +++ b/provider-register.sh @@ -90,10 +90,10 @@ pegasus_transform() chatter "cimserver version is " $version if compare_version "$version" "2.11.0" then - chatter "Processing provider modules (w/o ModuleGroupName):" \ - $PROVIDERMODULES + chatter "Processing provider modules (w/o ModuleGroupName):" for pm in $PROVIDERMODULES do + chatter "...processing " $pm cat >> $OUTFILE <<EOFPM instance of PG_ProviderModule { @@ -109,10 +109,10 @@ EOFPM done else - chatter "Processing provider modules (w/ ModuleGroupName):" \ - $PROVIDERMODULES + chatter "Processing provider modules (w/ ModuleGroupName):" for pm in $PROVIDERMODULES do + chatter "...processing " $pm cat >> $OUTFILE <<EOFPM instance of PG_ProviderModule { @@ -272,6 +272,7 @@ pegasus_install() if pegasus_transform $_REGFILENAME $namespace $myregs then chatter Registering providers with $state cimserver '('$version')' + chatter Installing mofs into namespace $namespace from path $mofpath $CIMMOF -uc -I $mofpath -n $namespace $mymofs && $CIMMOF -uc -n root/PG_Interop $_REGFILENAME else -- 1.8.1.4

Hi, John thanks for rebasing. I'll review the patches and add it in the tail of my modified patches, as V6 in one or two days. Then we are sync and that serial would be easy to be pulled. I'll mark any changes in the cover-letter, you can skip those unchanged ones to save time.
This series replaces my last set. It is a followup after rebase and rework to:
https://www.redhat.com/archives/libvirt-cim/2013-March/msg00029.html
Changes in v2: * Rework libxkutil/cs_util_instance.c to mirror functions as requested * Rework src/Virt_DevicePool.c to mirror functions as requested * Just merged the Makefile.am changes into one * Previous patch 4/10 to CSI is removed due to code change already posted
Still to be reviewed is Makefile.am.
John Ferlan (8): Makefile.am: Remove the $(top_srcdir) from subst command libvirt-cim.spec: Use systemctl for tog-pegasus restart Remove empty newline at bottom xmlgen: Only support script on bridge for xen domains libxkutil: Use virConnectListAllDomains() to fetch domains libxkutil: Adjust get_dominfo() logic DevicePool: Use the virConnectListAll interfaces register: Adjust the chatter output
Makefile.am | 18 +-- libvirt-cim.spec.in | 12 +- libxkutil/cs_util_instance.c | 24 ++++ libxkutil/device_parsing.c | 7 +- libxkutil/xmlgen.c | 25 +++-- provider-register.sh | 9 +- schema/SwitchService.registration | 1 - src/Virt_DevicePool.c | 230 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 296 insertions(+), 30 deletions(-)
-- Best Regards Wenchao Xia

Hi, John All patches looks fine. There is s small code style issue: change from: if (a==b) xxxxx; to: if (a==b){ xxxx; } Since libvirt-cim lacks a script to check the code style I used qemu's script to do it, which reported this. I directly changed them in your patch, hope you are OK with it. Another change is made: For those patches using new interface, I added macro to enable them, and by default they are not used, to avoid inconsistent of build env and runtime env, and silent routine change when build env changes, since we have not set the requirement in spec file. Actually I think we should change it in configure in the future.
This series replaces my last set. It is a followup after rebase and rework to:
https://www.redhat.com/archives/libvirt-cim/2013-March/msg00029.html
Changes in v2: * Rework libxkutil/cs_util_instance.c to mirror functions as requested * Rework src/Virt_DevicePool.c to mirror functions as requested * Just merged the Makefile.am changes into one * Previous patch 4/10 to CSI is removed due to code change already posted
Still to be reviewed is Makefile.am.
John Ferlan (8): Makefile.am: Remove the $(top_srcdir) from subst command libvirt-cim.spec: Use systemctl for tog-pegasus restart Remove empty newline at bottom xmlgen: Only support script on bridge for xen domains libxkutil: Use virConnectListAllDomains() to fetch domains libxkutil: Adjust get_dominfo() logic DevicePool: Use the virConnectListAll interfaces register: Adjust the chatter output
Makefile.am | 18 +-- libvirt-cim.spec.in | 12 +- libxkutil/cs_util_instance.c | 24 ++++ libxkutil/device_parsing.c | 7 +- libxkutil/xmlgen.c | 25 +++-- provider-register.sh | 9 +- schema/SwitchService.registration | 1 - src/Virt_DevicePool.c | 230 ++++++++++++++++++++++++++++++++++++++ 8 files changed, 296 insertions(+), 30 deletions(-)
-- Best Regards Wenchao Xia
participants (2)
-
John Ferlan
-
Wenchao Xia