rpms/libvirt-cim/F-9 poolconf.patch, NONE, 1.1 procfix.patch, NONE, 1.1 vcpufix.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 libvirt-cim.spec, 1.12, 1.13 sources, 1.8, 1.9
Dan Smith (danms)
fedora-extras-commits at redhat.com
Thu May 29 19:56:06 UTC 2008
Author: danms
Update of /cvs/pkgs/rpms/libvirt-cim/F-9
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv1903
Modified Files:
.cvsignore libvirt-cim.spec sources
Added Files:
poolconf.patch procfix.patch vcpufix.patch
Log Message:
Update to 0.4-1
poolconf.patch:
--- NEW FILE poolconf.patch ---
Add a default pool configuration file to be installed when libvirt version
is older than 0.4.0
Signed-off-by: Dan Smith <danms at us.ibm.com>
diff -r f00dd77c664c Makefile.am
--- a/Makefile.am Tue May 20 11:24:39 2008 -0400
+++ b/Makefile.am Tue May 27 07:57:40 2008 -0700
@@ -101,7 +101,8 @@
EXTRA_DIST = schema $(pkgdata_DATA) $(pkgdata_SCRIPTS) \
libvirt-cim.spec.in libvirt-cim.spec \
doc/CodingStyle doc/SubmittingPatches \
- .changeset .revision
+ .changeset .revision \
+ examples/diskpool.conf
preinstall:
sh -x base_schema/install_base_schema.sh `pwd`/base_schema
@@ -111,6 +112,7 @@
postinstall:
sh provider-register.sh -v -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS)
sh provider-register.sh -v -t @CIMSERVER@ -n root/interop -r $(INTEROP_REGS) -m $(INTEROP_MOFS)
+ virsh -v | grep -q '^0.3' && cp examples/diskpool.conf $(DISK_POOL_CONFIG) || true
preuninstall:
sh provider-register.sh -v -d -t @CIMSERVER@ -n @CIM_VIRT_NS@ -r $(REGS) -m $(MOFS)
diff -r f00dd77c664c acinclude.m4
--- a/acinclude.m4 Tue May 20 11:24:39 2008 -0400
+++ b/acinclude.m4 Tue May 27 07:57:40 2008 -0700
@@ -312,6 +312,8 @@
AC_DEFUN([DEFINE_DISK_CONFIG],
[
AC_DEFINE_UNQUOTED([DISK_POOL_CONFIG], "$1", [Disk pool config filepath.])
+ DISK_POOL_CONFIG=$1
+ AC_SUBST(DISK_POOL_CONFIG)
]
)
diff -r f00dd77c664c examples/diskpool.conf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/examples/diskpool.conf Tue May 27 07:57:40 2008 -0700
@@ -0,0 +1,1 @@
+Default /
procfix.patch:
--- NEW FILE procfix.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1212005642 25200
# Node ID b7a96b395791bdfa8a9f0c5c42544fe5400571d8
# Parent 19692a8250f94d00cb27ca96158acf0727587110
Set processor device type and id in parse_vcpu_device().
Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
diff -r 19692a8250f9 -r b7a96b395791 libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Wed May 28 08:41:19 2008 -0700
+++ b/libxkutil/device_parsing.c Wed May 28 13:14:02 2008 -0700
@@ -351,6 +351,9 @@
goto err;
list->dev.vcpu.quantity = count;
+
+ list->type = CIM_RES_TYPE_PROC;
+ list->id = strdup("proc");
*vdevs = list;
vcpufix.patch:
--- NEW FILE vcpufix.patch ---
Make VCPU RASD Add/Remove fail and Modify behave correctly
With the recent VCPU changes, this needs to be in place for VSMS to function
properly.
Signed-off-by: Dan Smith <danms at us.ibm.com>
Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
diff -r 05a5ba2fda5d libxkutil/device_parsing.c
--- a/libxkutil/device_parsing.c Wed May 28 14:04:50 2008 -0700
+++ b/libxkutil/device_parsing.c Thu May 29 09:33:14 2008 -0700
@@ -1002,29 +1002,26 @@
return 1;
}
-static int change_vcpus(virDomainPtr dom, int delta)
+static int change_vcpus(virDomainPtr dom, struct virt_device *dev)
{
int ret;
- virDomainInfo info;
- ret = virDomainGetInfo(dom, &info);
- if (ret == -1) {
- CU_DEBUG("Failed to get domain info for %s",
- virDomainGetName(dom));
+ if (dev->dev.vcpu.quantity <= 0) {
+ CU_DEBUG("Unable to set VCPU count to %i",
+ dev->dev.vcpu.quantity);
return 0;
}
- ret = virDomainSetVcpus(dom, info.nrVirtCpu + delta);
+ ret = virDomainSetVcpus(dom, dev->dev.vcpu.quantity);
if (ret == -1) {
CU_DEBUG("Failed to set domain vcpus to %i",
- info.nrVirtCpu + delta);
+ dev->dev.vcpu.quantity);
return 0;
}
- CU_DEBUG("Changed %s vcpus from %i to %i",
+ CU_DEBUG("Changed %s vcpus to %i",
virDomainGetName(dom),
- info.nrVirtCpu,
- info.nrVirtCpu + delta);
+ dev->dev.vcpu.quantity);
return 1;
}
@@ -1034,8 +1031,6 @@
if ((dev->type == CIM_RES_TYPE_NET) ||
(dev->type == CIM_RES_TYPE_DISK))
return _change_device(dom, dev, true);
- else if (dev->type == CIM_RES_TYPE_PROC)
- return change_vcpus(dom, 1);
CU_DEBUG("Unhandled device type %i", dev->type);
@@ -1047,8 +1042,6 @@
if ((dev->type == CIM_RES_TYPE_NET) ||
(dev->type == CIM_RES_TYPE_DISK))
return _change_device(dom, dev, false);
- else if (dev->type == CIM_RES_TYPE_PROC)
- return change_vcpus(dom, -1);
CU_DEBUG("Unhandled device type %i", dev->type);
@@ -1059,6 +1052,8 @@
{
if (dev->type == CIM_RES_TYPE_MEM)
return change_memory(dom, dev);
+ else if (dev->type == CIM_RES_TYPE_PROC)
+ return change_vcpus(dom, dev);
CU_DEBUG("Unhandled device type %i", dev->type);
diff -r 05a5ba2fda5d libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Wed May 28 14:04:50 2008 -0700
+++ b/libxkutil/xmlgen.c Thu May 29 09:33:14 2008 -0700
@@ -254,21 +254,17 @@
static bool vcpu_to_xml(char **xml, struct virt_device *dev)
{
- int count;
int ret;
+ char *_xml;
- if (*xml == NULL) {
- ret = asprintf(xml, "<vcpu>1</vcpu>");
- return ret != -1;
- }
+ ret = asprintf(&_xml, "<vcpu>%" PRIu64 "</vcpu>\n",
+ dev->dev.vcpu.quantity);
+ if (ret == -1)
+ return false;
+ else
+ astrcat(xml, _xml);
- if (sscanf(*xml, "<vcpu>%i</vcpu>\n", &count) != 1)
- return false;
-
- free(*xml);
- ret = asprintf(xml, "<vcpu>%i</vcpu>\n", count + 1);
-
- return ret != -1;
+ return true;
}
static bool mem_to_xml(char **xml, struct virt_device *dev)
diff -r 05a5ba2fda5d src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Wed May 28 14:04:50 2008 -0700
+++ b/src/Virt_VirtualSystemManagementService.c Thu May 29 09:33:14 2008 -0700
@@ -447,6 +447,14 @@
return NULL;
}
+static const char *proc_rasd_to_vdev(CMPIInstance *inst,
+ struct virt_device *dev)
+{
+ cu_get_u64_prop(inst, "VirtualQuantity", &dev->dev.vcpu.quantity);
+
+ return NULL;
+}
+
static const char *_sysvirt_rasd_to_vdev(CMPIInstance *inst,
struct virt_device *dev,
uint16_t type)
@@ -458,7 +466,7 @@
} else if (type == CIM_RES_TYPE_MEM) {
return mem_rasd_to_vdev(inst, dev);
} else if (type == CIM_RES_TYPE_PROC) {
- return NULL; /* FIXME: replace when processor is done */
+ return proc_rasd_to_vdev(inst, dev);
}
return "Resource type not supported on this platform";
Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-9/.cvsignore,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- .cvsignore 14 Mar 2008 19:08:05 -0000 1.6
+++ .cvsignore 29 May 2008 19:55:27 -0000 1.7
@@ -1,3 +1,4 @@
libvirt-cim-0.3.tar.gz
kvm_method.patch
registeredprofile.patch
+libvirt-cim-0.4.tar.gz
Index: libvirt-cim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-9/libvirt-cim.spec,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- libvirt-cim.spec 14 Mar 2008 19:37:23 -0000 1.12
+++ libvirt-cim.spec 29 May 2008 19:55:27 -0000 1.13
@@ -2,15 +2,15 @@
Summary: A CIM provider for libvirt
Name: libvirt-cim
-Version: 0.3
-Release: 4%{?dist}
+Version: 0.4
+Release: 1%{?dist}
License: LGPLv2+
Group: Development/Libraries
Source: libvirt-cim-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
URL: http://libvirt.org/CIM/
Requires: unzip
-BuildRequires: libcmpiutil >= 0.3
+BuildRequires: libcmpiutil >= 0.4
BuildRequires: tog-pegasus-devel
BuildRequires: libvirt-devel >= 0.3.2
BuildRequires: e2fsprogs-devel
@@ -18,8 +18,10 @@
BuildRequires: libcmpiutil-devel
BuildConflicts: sblim-cmpi-devel
Patch0: parse.patch
-Patch1: kvm_method.patch
-Patch2: registeredprofile.patch
+Patch1: poolconf.patch
+Patch2: poolmember.patch
+Patch3: procfix.patch
+Patch4: vcpufix.patch
%description
Libvirt-cim is a CMPI CIM provider that implements the DMTF SVPC
@@ -33,7 +35,9 @@
chmod +X src/* libxkutil/* schema/*
%patch0 -p1
%patch1 -p1
-%patch2 -p0
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
%build
%configure --disable-werror
@@ -110,6 +114,10 @@
/etc/ld.so.conf.d/libvirt-cim.conf
%changelog
+* Wed May 21 2008 Dan Smith <danms at us.ibm.com> - 0.4-1
+- Updated to latest upstream source
+- Added default disk pool configuration patch
+
* Fri Mar 14 2008 Dan Smith <danms at us.ibm.com> - 0.3-4
- Fixed loader config for 64-bit systems
- Added missing root/interop schema install
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-9/sources,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sources 14 Mar 2008 19:37:23 -0000 1.8
+++ sources 29 May 2008 19:55:27 -0000 1.9
@@ -1,3 +1,4 @@
528908c9daf98c077f90b7df6fdf1c0a libvirt-cim-0.3.tar.gz
36bbef64cba0015daf6eb34d054a2751 kvm_method.patch
4dc7a3c5b5ed780eb57524f945fc5f5a registeredprofile.patch
+25801f1a5c7ef4b36fde88b965f65007 libvirt-cim-0.4.tar.gz
More information about the fedora-extras-commits
mailing list