Hello community,
here is the log from the commit of package libvirt-cim
checked in at Fri Nov 7 15:20:31 CET 2008.
--------
--- libvirt-cim/libvirt-cim.changes 2008-10-20 22:50:05.000000000 +0200
+++ /mounts/work_src_done/STABLE/libvirt-cim/libvirt-cim.changes 2008-11-07 03:28:24.000000000 +0100
@@ -1,0 +2,23 @@
+Thu Nov 6 19:25:03 MST 2008 - jfehlig@novell.com
+
+- Preserve domain configuration on redefine operations. Related
+ to bnc#431758 and bnc#437388
+
+-------------------------------------------------------------------
+Wed Nov 5 15:37:37 MST 2008 - jfehlig@novell.com
+
+- Do not register ConsoleRedirectionService providers bnc#441029
+
+-------------------------------------------------------------------
+Wed Nov 5 15:16:57 MST 2008 - jfehlig@novell.com
+
+- Remove netpool-suse.patch bnc#441633
+
+-------------------------------------------------------------------
+Tue Oct 28 11:44:51 MDT 2008 - jfehlig@novell.com
+
+- bnc#431758
+ + Added upstream patches to fix vcpu count on running domains
+ + 'ethernet' is a valid net device type - eth-device.patch
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
Old:
----
netpool-suse.patch
New:
----
disk-flags.patch
disk-rasd-emu-type.patch
disk-type.patch
eth-device.patch
graphics-device.patch
keymap.patch
proc-rasd.patch
rm-console-prov.patch
vcpu-count.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libvirt-cim.spec ++++++
--- /var/tmp/diff_new_pack.x11784/_old 2008-11-07 15:20:16.000000000 +0100
+++ /var/tmp/diff_new_pack.x11784/_new 2008-11-07 15:20:16.000000000 +0100
@@ -26,17 +26,25 @@
Group: System/Management
AutoReqProv: yes
Version: 0.5.2
-Release: 2
+Release: 3
Summary: CMPI-based CIM provider implementing DMTF SVPC model
Source: %{name}-%{version}.tar.bz2
Source1: libvirt-cim-rpmlintrc
Patch0: rm-dup-217-schema.patch
Patch1: provider-reg.patch
-Patch2: netpool-suse.patch
-Patch3: versions.patch
-Patch4: lxc-procrasd.patch
-Patch5: lxc-sched-param.patch
-Patch6: lxc-sched-procrasd.patch
+Patch2: versions.patch
+Patch3: lxc-procrasd.patch
+Patch4: lxc-sched-param.patch
+Patch5: lxc-sched-procrasd.patch
+Patch6: vcpu-count.patch
+Patch7: proc-rasd.patch
+Patch8: eth-device.patch
+Patch9: graphics-device.patch
+Patch10: disk-flags.patch
+Patch11: rm-console-prov.patch
+Patch12: keymap.patch
+Patch13: disk-rasd-emu-type.patch
+Patch14: disk-type.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Requires: cim-server
Requires: libxml2 >= 2.6.0
@@ -72,6 +80,14 @@
%patch4 -p1
%patch5 -p1
%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13 -p1
+%patch14 -p1
chmod -x src/* libxkutil/* schema/* README doc/* base_schema/README*
chmod +X src/* libxkutil/* schema/*
@@ -135,6 +151,17 @@
%dir %attr(0700, root, root) %{_sysconfdir}/libvirt/cim
%changelog
+* Thu Nov 06 2008 jfehlig@novell.com
+- Preserve domain configuration on redefine operations. Related
+ to bnc#431758 and bnc#437388
+* Wed Nov 05 2008 jfehlig@novell.com
+- Do not register ConsoleRedirectionService providers bnc#441029
+* Wed Nov 05 2008 jfehlig@novell.com
+- Remove netpool-suse.patch bnc#441633
+* Tue Oct 28 2008 jfehlig@novell.com
+- bnc#431758
+ + Added upstream patches to fix vcpu count on running domains
+ + 'ethernet' is a valid net device type - eth-device.patch
* Mon Oct 20 2008 jfehlig@novell.com
- Added upstream patches for additional LXC support - bnc#433881
- Removed bogus xen-devel BuildRequires
++++++ disk-flags.patch ++++++
# HG changeset patch
# User Dan Smith
# Date 1225901751 28800
# Node ID ece7c71cd2aab612dec19cc6247194cdf8b5b049
# Parent 20af5ae5b01c308d2cfab62899b2dbcb8d186567
Avoid clobbering disk flags on redefine
This patch makes sure we track the shareable and readonly flags that can
be present in a disk device.
Signed-off-by: Dan Smith
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.c
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.c
@@ -24,6 +24,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -234,6 +235,10 @@ static int parse_block_device(xmlNode *d
ddev->virtual_dev = get_attr_value(child, "dev");
if (ddev->virtual_dev == NULL)
goto err;
+ } else if (XSTREQ(child->name, "readonly")) {
+ ddev->readonly = true;
+ } else if (XSTREQ(child->name, "shareable")) {
+ ddev->shareable = true;
}
}
if ((ddev->source == NULL) || (ddev->virtual_dev == NULL))
@@ -618,6 +623,8 @@ struct virt_device *virt_device_dup(stru
DUP_FIELD(dev, _dev, dev.disk.driver);
DUP_FIELD(dev, _dev, dev.disk.source);
DUP_FIELD(dev, _dev, dev.disk.virtual_dev);
+ dev->dev.disk.readonly = dev->dev.disk.readonly;
+ dev->dev.disk.shareable = dev->dev.disk.shareable;
} else if (dev->type == CIM_RES_TYPE_MEM) {
dev->dev.mem.size = _dev->dev.mem.size;
dev->dev.mem.maxsize = _dev->dev.mem.maxsize;
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.h
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.h
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.h
@@ -25,6 +25,7 @@
#define __DEVICE_PARSING_H
#include
+#include
#include
#include "../src/svpc_types.h"
@@ -36,6 +37,8 @@ struct disk_device {
char *source;
char *virtual_dev;
enum {DISK_UNKNOWN, DISK_PHY, DISK_FILE, DISK_FS} disk_type;
+ bool readonly;
+ bool shareable;
};
struct net_device {
Index: libvirt-cim-0.5.2/libxkutil/xmlgen.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/xmlgen.c
+++ libvirt-cim-0.5.2/libxkutil/xmlgen.c
@@ -113,7 +113,7 @@ static int astrcat(char **dest, char *so
return 1;
}
-static char *disk_block_xml(const char *path, const char *vdev)
+static char *disk_block_xml(struct disk_device *dev)
{
char *xml;
int ret;
@@ -122,16 +122,20 @@ static char *disk_block_xml(const char *
"<disk type='block' device='disk'>\n"
" <source dev='%s'/>\n"
" <target dev='%s'/>\n"
+ "%s"
+ "%s"
"</disk>\n",
- path,
- vdev);
+ dev->source,
+ dev->virtual_dev,
+ dev->readonly ? "<readonly/>\n" : "",
+ dev->shareable ? "<shareable/>\n" : "");
if (ret == -1)
xml = NULL;
return xml;
}
-static char *disk_file_xml(const char *path, const char *vdev)
+static char *disk_file_xml(struct disk_device *dev)
{
char *xml;
int ret;
@@ -140,16 +144,20 @@ static char *disk_file_xml(const char *p
"<disk type='file' device='disk'>\n"
" <source file='%s'/>\n"
" <target dev='%s'/>\n"
+ "%s"
+ "%s"
"</disk>\n",
- path,
- vdev);
+ dev->source,
+ dev->virtual_dev,
+ dev->readonly ? "<readonly/>" : "",
+ dev->shareable ? "<shareable/>" : "");
if (ret == -1)
xml = NULL;
return xml;
}
-static char *disk_fs_xml(const char *path, const char *vdev)
+static char *disk_fs_xml(struct disk_device *dev)
{
char *xml;
int ret;
@@ -159,8 +167,8 @@ static char *disk_fs_xml(const char *pat
" <source dir='%s'/>\n"
" <target dir='%s'/>\n"
"</filesystem>\n",
- path,
- vdev);
+ dev->source,
+ dev->virtual_dev);
if (ret == -1)
xml = NULL;
@@ -173,13 +181,13 @@ static bool disk_to_xml(char **xml, stru
struct disk_device *disk = &dev->dev.disk;
if (disk->disk_type == DISK_PHY)
- _xml = disk_block_xml(disk->source, disk->virtual_dev);
+ _xml = disk_block_xml(disk);
else if (disk->disk_type == DISK_FILE)
/* If it's not a block device, we assume a file,
which should be a reasonable fail-safe */
- _xml = disk_file_xml(disk->source, disk->virtual_dev);
+ _xml = disk_file_xml(disk);
else if (disk->disk_type == DISK_FS)
- _xml = disk_fs_xml(disk->source, disk->virtual_dev);
+ _xml = disk_fs_xml(disk);
else
return false;
++++++ disk-rasd-emu-type.patch ++++++
# HG changeset patch
# User Dan Smith
# Date 1226005676 28800
# Node ID 049f0bb012190e680257d00463138391405a5c60
# Parent 9385e61cd401162bef9c44bc11f64ca349a41abf
Add an EmulatedType field to DiskRASD to select CDROM or Disk
This seems like a pretty reasonable way to do this, but comments are welcome.
I had initially planned to have a specific RASD type to represent a CDROM,
but I don't think that makes much sense, and is significantly more complex.
Adding this gives us a way to set and query the CDROM-ness of a disk, and
with the following patch, avoids dropping this qualifier from existing
configurations.
Signed-off-by: Dan Smith
Index: libvirt-cim-0.5.2/schema/ResourceAllocationSettingData.mof
===================================================================
--- libvirt-cim-0.5.2.orig/schema/ResourceAllocationSettingData.mof
+++ libvirt-cim-0.5.2/schema/ResourceAllocationSettingData.mof
@@ -21,6 +21,10 @@ class Xen_DiskResourceAllocationSettingD
[Description ("Device as seen by the guest")]
string VirtualDevice;
+ [Description ("Device emulation type"),
+ ValueMap {"0", "1"},
+ Values {"Disk", "CDROM"}]
+ uint16 EmulatedType;
};
[Description ("KVM virtual disk configuration"),
@@ -32,6 +36,10 @@ class KVM_DiskResourceAllocationSettingD
[Description ("Device as seen by the guest")]
string VirtualDevice;
+ [Description ("Device emulation type"),
+ ValueMap {"0", "1"},
+ Values {"Disk", "CDROM"}]
+ uint16 EmulatedType;
};
[Description ("LXC virtual disk configuration"),
Index: libvirt-cim-0.5.2/src/Virt_RASD.c
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_RASD.c
+++ libvirt-cim-0.5.2/src/Virt_RASD.c
@@ -224,6 +224,7 @@ static CMPIStatus set_disk_rasd_params(c
CMPIInstance *inst)
{
uint64_t cap = 0;
+ uint16_t type;
CMPIStatus s = {CMPI_RC_OK, NULL};
get_vol_size(broker, ref, dev->dev.disk.source, &cap);
@@ -244,6 +245,20 @@ static CMPIStatus set_disk_rasd_params(c
(CMPIValue *)dev->dev.disk.source,
CMPI_chars);
+ /* There's not much we can do here if we don't recognize the type,
+ * so it seems that assuming 'disk' is a reasonable default
+ */
+ if ((dev->dev.disk.device != NULL) &&
+ STREQ(dev->dev.disk.device, "cdrom"))
+ type = VIRT_DISK_TYPE_CDROM;
+ else
+ type = VIRT_DISK_TYPE_DISK;
+
+ CMSetProperty(inst,
+ "EmulatedType",
+ (CMPIValue *)&type,
+ CMPI_uint16);
+
return s;
}
Index: libvirt-cim-0.5.2/src/Virt_RASD.h
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_RASD.h
+++ libvirt-cim-0.5.2/src/Virt_RASD.h
@@ -23,6 +23,9 @@
#include "device_parsing.h"
+#define VIRT_DISK_TYPE_DISK 0
+#define VIRT_DISK_TYPE_CDROM 1
+
char *rasd_to_xml(CMPIInstance *rasd);
/**
Index: libvirt-cim-0.5.2/src/Virt_VirtualSystemManagementService.c
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_VirtualSystemManagementService.c
+++ libvirt-cim-0.5.2/src/Virt_VirtualSystemManagementService.c
@@ -402,6 +402,7 @@ static const char *disk_rasd_to_vdev(CMP
struct virt_device *dev)
{
const char *val = NULL;
+ uint16_t type;
if (cu_get_str_prop(inst, "VirtualDevice", &val) != CMPI_RC_OK)
return "Missing `VirtualDevice' property";
@@ -416,6 +417,16 @@ static const char *disk_rasd_to_vdev(CMP
dev->dev.disk.source = strdup(val);
dev->dev.disk.disk_type = disk_type_from_file(val);
+ if (cu_get_u16_prop(inst, "EmulatedType", &type) != CMPI_RC_OK)
+ type = VIRT_DISK_TYPE_DISK;
+
+ if (type == VIRT_DISK_TYPE_DISK)
+ dev->dev.disk.device = strdup("disk");
+ else if (type == VIRT_DISK_TYPE_CDROM)
+ dev->dev.disk.device = strdup("cdrom");
+ else
+ return "Invalid value for EmulatedType";
+
free(dev->id);
dev->id = strdup(dev->dev.disk.virtual_dev);
++++++ disk-type.patch ++++++
# HG changeset patch
# User Dan Smith
# Date 1226005678 28800
# Node ID 9d100a5442150eedf372598f5033db100f47eddd
# Parent 049f0bb012190e680257d00463138391405a5c60
Don't drop disk type on redefine
Right now, we track the status of disk/cdrom of a disk device, but don't
use it in the XML define. This patch uses the value instead of a static
device='disk'.
Signed-off-by: Dan Smith
Index: libvirt-cim-0.5.2/libxkutil/xmlgen.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/xmlgen.c
+++ libvirt-cim-0.5.2/libxkutil/xmlgen.c
@@ -119,12 +119,13 @@ static char *disk_block_xml(struct disk_
int ret;
ret = asprintf(&xml,
- "<disk type='block' device='disk'>\n"
+ "<disk type='block' device='%s'>\n"
" <source dev='%s'/>\n"
" <target dev='%s'/>\n"
"%s"
"%s"
"</disk>\n",
+ dev->device,
dev->source,
dev->virtual_dev,
dev->readonly ? "<readonly/>\n" : "",
@@ -141,12 +142,13 @@ static char *disk_file_xml(struct disk_d
int ret;
ret = asprintf(&xml,
- "<disk type='file' device='disk'>\n"
+ "<disk type='file' device='%s'>\n"
" <source file='%s'/>\n"
" <target dev='%s'/>\n"
"%s"
"%s"
"</disk>\n",
+ dev->device,
dev->source,
dev->virtual_dev,
dev->readonly ? "<readonly/>" : "",
++++++ eth-device.patch ++++++
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.c
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.c
@@ -312,6 +312,8 @@ static int parse_net_device(xmlNode *ino
ndev->source);
} else if (STREQC(ndev->type, "user")){
CU_DEBUG("Leaving source blank for user net type");
+ } else if (STREQC(ndev->type, "ethernet")){
+ CU_DEBUG("Leaving source blank for ethernet net type");
} else {
/* This likely indicates an unsupported
* network configuration
Index: libvirt-cim-0.5.2/libxkutil/xmlgen.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/xmlgen.c
+++ libvirt-cim-0.5.2/libxkutil/xmlgen.c
@@ -272,7 +272,8 @@ static bool net_to_xml(char **xml, struc
return network_net_to_xml(xml, dev);
else if (STREQ(dev->dev.net.type, "bridge"))
return bridge_net_to_xml(xml, dev);
- else if (STREQ(dev->dev.net.type, "user"))
+ else if (STREQ(dev->dev.net.type, "user") ||
+ STREQ(dev->dev.net.type, "ethernet"))
return user_net_to_xml(xml, dev);
else
return false;
++++++ graphics-device.patch ++++++
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.c
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.c
@@ -75,6 +75,7 @@ static void cleanup_graphics_device(stru
{
free(dev->type);
free(dev->port);
+ free(dev->host);
}
void cleanup_virt_device(struct virt_device *dev)
@@ -440,10 +441,14 @@ static int parse_graphics_device(xmlNode
gdev->type = get_attr_value(node, "type");
gdev->port = get_attr_value(node, "port");
+ gdev->host = get_attr_value(node, "listen");
if ((gdev->type == NULL) || (gdev->port == NULL))
goto err;
+ if (gdev->host == NULL)
+ gdev->host = strdup("127.0.0.1");
+
vdev->type = CIM_RES_TYPE_GRAPHICS;
*vdevs = vdev;
@@ -623,6 +628,7 @@ struct virt_device *virt_device_dup(stru
} else if (dev->type == CIM_RES_TYPE_GRAPHICS) {
DUP_FIELD(dev, _dev, dev.graphics.type);
DUP_FIELD(dev, _dev, dev.graphics.port);
+ DUP_FIELD(dev, _dev, dev.graphics.host);
}
return dev;
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.h
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.h
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.h
@@ -62,6 +62,7 @@ struct emu_device {
struct graphics_device {
char *type;
char *port;
+ char *host;
};
struct virt_device {
++++++ keymap.patch ++++++
# HG changeset patch
# User Dan Smith
# Date 1225900807 28800
# Node ID 20af5ae5b01c308d2cfab62899b2dbcb8d186567
# Parent 29c875cab8b808655c04d2f971c0d6c9a9f03dbd
Store and preserve keymap attribute for graphics device
This prevents us from discarding the keymap setting when we redefine a domain.
Signed-off-by: Dan Smith
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.c
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.c
@@ -77,6 +77,7 @@ static void cleanup_graphics_device(stru
free(dev->type);
free(dev->port);
free(dev->host);
+ free(dev->keymap);
}
void cleanup_virt_device(struct virt_device *dev)
@@ -447,6 +448,7 @@ static int parse_graphics_device(xmlNode
gdev->type = get_attr_value(node, "type");
gdev->port = get_attr_value(node, "port");
gdev->host = get_attr_value(node, "listen");
+ gdev->keymap = get_attr_value(node, "keymap");
if ((gdev->type == NULL) || (gdev->port == NULL))
goto err;
@@ -636,6 +638,7 @@ struct virt_device *virt_device_dup(stru
DUP_FIELD(dev, _dev, dev.graphics.type);
DUP_FIELD(dev, _dev, dev.graphics.port);
DUP_FIELD(dev, _dev, dev.graphics.host);
+ DUP_FIELD(dev, _dev, dev.graphics.keymap);
}
return dev;
Index: libvirt-cim-0.5.2/libxkutil/device_parsing.h
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/device_parsing.h
+++ libvirt-cim-0.5.2/libxkutil/device_parsing.h
@@ -66,6 +66,7 @@ struct graphics_device {
char *type;
char *port;
char *host;
+ char *keymap;
};
struct virt_device {
Index: libvirt-cim-0.5.2/libxkutil/xmlgen.c
===================================================================
--- libvirt-cim-0.5.2.orig/libxkutil/xmlgen.c
+++ libvirt-cim-0.5.2/libxkutil/xmlgen.c
@@ -351,9 +351,12 @@ static bool graphics_to_xml(char **xml,
struct graphics_device *graphics = &dev->dev.graphics;
ret = asprintf(&_xml,
- "<graphics type='%s' port='%s'/>\n",
+ "\n",
graphics->type,
- graphics->port);
+ graphics->port,
+ graphics->host != NULL ? graphics->host : "127.0.0.1",
+ graphics->keymap != NULL ? graphics->keymap : "en-us");
if (ret == -1)
return false;
else
++++++ proc-rasd.patch ++++++
Index: libvirt-cim-0.5.2/src/Virt_RASD.c
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_RASD.c
+++ libvirt-cim-0.5.2/src/Virt_RASD.c
@@ -96,6 +96,7 @@ char *rasd_to_xml(CMPIInstance *rasd)
static CMPIStatus set_proc_rasd_params(const CMPIBroker *broker,
const CMPIObjectPath *ref,
+ struct virt_device *dev,
const char *domain,
CMPIInstance *inst)
{
@@ -105,6 +106,7 @@ static CMPIStatus set_proc_rasd_params(c
struct infostore_ctx *info;
uint32_t weight;
uint64_t limit;
+ uint64_t count;
conn = connect_by_classname(broker, CLASSNAME(ref), &s);
if (conn == NULL)
@@ -118,6 +120,17 @@ static CMPIStatus set_proc_rasd_params(c
goto out;
}
+ if (domain_online(dom))
+ count = domain_vcpu_count(dom);
+ else
+ count = dev->dev.vcpu.quantity;
+
+ if (count > 0)
+ CMSetProperty(inst,
+ "VirtualQuantity",
+ (CMPIValue *)&count,
+ CMPI_uint64);
+
info = infostore_open(dom);
if (info == NULL) {
cu_statusf(broker, &s,
@@ -306,14 +319,7 @@ static CMPIInstance *rasd_from_vdev(cons
CMSetProperty(inst, "Limit",
(CMPIValue *)&dev->dev.mem.maxsize, CMPI_uint64);
} else if (dev->type == CIM_RES_TYPE_PROC) {
- if (dev->dev.vcpu.quantity > 0) {
- CMSetProperty(inst,
- "VirtualQuantity",
- (CMPIValue *)&dev->dev.vcpu.quantity,
- CMPI_uint64);
- }
-
- set_proc_rasd_params(broker, ref, host, inst);
+ set_proc_rasd_params(broker, ref, dev, host, inst);
}
/* FIXME: Put the HostResource in place */
++++++ rm-console-prov.patch ++++++
Index: libvirt-cim-0.5.2/Makefile.am
===================================================================
--- libvirt-cim-0.5.2.orig/Makefile.am
+++ libvirt-cim-0.5.2/Makefile.am
@@ -42,10 +42,7 @@ MOFS = \
schema/VSMigrationSettingData.mof \
schema/VirtualSystemSnapshotService.mof \
schema/VirtualSystemSnapshotServiceCapabilities.mof \
- schema/ConcreteComponent.mof \
- schema/ConsoleRedirectionService.mof \
- schema/ConsoleRedirectionServiceCapabilities.mof \
- schema/ServiceAffectsElement.mof
+ schema/ConcreteComponent.mof
INTEROP_MOFS = \
schema/ComputerSystem.mof \
@@ -98,10 +95,7 @@ REGS = \
schema/VSMigrationSettingData.registration \
schema/VirtualSystemSnapshotService.registration \
schema/VirtualSystemSnapshotServiceCapabilities.registration \
- schema/ConcreteComponent.registration \
- schema/ConsoleRedirectionService.registration \
- schema/ConsoleRedirectionServiceCapabilities.registration \
- schema/ServiceAffectsElement.registration
+ schema/ConcreteComponent.registration
INTEROP_REGS = \
schema/RegisteredProfile.registration \
Index: libvirt-cim-0.5.2/src/Virt_HostedService.c
===================================================================
--- libvirt-cim-0.5.2.orig/src/Virt_HostedService.c
+++ libvirt-cim-0.5.2/src/Virt_HostedService.c
@@ -53,8 +53,6 @@ static CMPIStatus validate_service_ref(c
s = get_rpcs(ref, &inst, _BROKER, context, true);
} else if (STREQC(classname, "VirtualSystemMigrationService")) {
s = get_migration_service(ref, &inst, _BROKER, context, true);
- } else if (STREQC(classname, "ConsoleRedirectionService")) {
- s = get_console_rs(ref, &inst, _BROKER, context, true);
}
free(classname);
@@ -115,12 +113,6 @@ static CMPIStatus host_to_service(const
if (!CMIsNullObject(inst))
inst_list_add(list, inst);
- s = get_console_rs(ref, &inst, _BROKER, info->context, false);
- if (s.rc != CMPI_RC_OK)
- return s;
- if (!CMIsNullObject(inst))
- inst_list_add(list, inst);
-
return s;
}
++++++ vcpu-count.patch ++++++
diff -r e043f46f299e -r 819ae6c97a07 libxkutil/misc_util.c
--- a/libxkutil/misc_util.c Wed Oct 22 08:28:37 2008 -0700
+++ b/libxkutil/misc_util.c Tue Oct 28 08:22:04 2008 -0700
@@ -541,6 +541,45 @@
return result;
}
+int domain_vcpu_count(virDomainPtr dom)
+{
+ virVcpuInfoPtr info = NULL;
+ int max;
+ int count;
+ int actual = 0;
+ int i;
+ virConnectPtr conn = NULL;
+
+ conn = virDomainGetConnect(dom);
+ if (conn == NULL) {
+ CU_DEBUG("Failed to get connection from domain");
+ return -1;
+ }
+
+ max = virConnectGetMaxVcpus(conn, virConnectGetType(conn));
+ if (max <= 0) {
+ CU_DEBUG("Failed to get max vcpu count");
+ return -1;
+ }
+
+ info = calloc(max, sizeof(*info));
+ if (info == NULL) {
+ CU_DEBUG("Failed to allocate %i vcpuinfo structures", max);
+ return -1;
+ }
+
+ count = virDomainGetVcpus(dom, info, max, NULL, 0);
+
+ for (i = 0; i < count; i++) {
+ if (info[i].cpu != -1)
+ actual++;
+ }
+
+ free(info);
+
+ return actual;
+}
+
/*
* Local Variables:
* mode: C
diff -r e043f46f299e -r 819ae6c97a07 libxkutil/misc_util.h
--- a/libxkutil/misc_util.h Wed Oct 22 08:28:37 2008 -0700
+++ b/libxkutil/misc_util.h Tue Oct 28 08:22:04 2008 -0700
@@ -124,6 +124,8 @@
bool check_refs_pfx_match(const CMPIObjectPath *refa,
const CMPIObjectPath *refb);
+int domain_vcpu_count(virDomainPtr dom);
+
#define LIBVIRT_CIM_DEFAULT_MAKEREF() \
static CMPIInstance* make_ref(const CMPIObjectPath *source_ref, \
const CMPIInstance *target_inst, \
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org