rpms/libvirt-cim/F-10 emu_1_sdc.patch, NONE, 1.1 host_enum_sys.patch, NONE, 1.1 libvirt-cim.spec, 1.22, 1.23 sources, 1.13, 1.14
Kaitlin Rupert
kaitlin at fedoraproject.org
Wed Jan 28 16:27:40 UTC 2009
Author: kaitlin
Update of /cvs/pkgs/rpms/libvirt-cim/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23867
Modified Files:
libvirt-cim.spec sources
Added Files:
emu_1_sdc.patch host_enum_sys.patch
Log Message:
Add new tarball (for base_schema/Makefile changes), also add patches and updated spec.
emu_1_sdc.patch:
--- NEW FILE emu_1_sdc.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1232129948 28800
# Node ID c87e67c92f7ceaf556e8be90547de324026f315b
# Parent 13150c7e28270567aad061e9ad521b0e8dd44ef6
Add support for EmulatedType 1 to SDC.
Also fix a bug with the if statement in set_disk_props() and a spacing bug.
Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
diff -r 13150c7e2827 -r c87e67c92f7c src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Thu Jan 22 11:29:29 2009 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Fri Jan 16 10:19:08 2009 -0800
@@ -611,13 +611,13 @@
const CMPIObjectPath *ref,
const char *id,
uint64_t disk_size,
+ uint16_t emu_type,
struct inst_list *list)
{
const char *addr;
const char *dev;
CMPIInstance *inst;
CMPIStatus s = {CMPI_RC_OK, NULL};
- uint16_t emu_type = 0;
if (type == DOMAIN_LXC) {
addr = "/tmp";
@@ -646,7 +646,7 @@
dev = "xvda";
CMSetProperty(inst, "Caption",
(CMPIValue *)"PV disk", CMPI_chars);
- } else if (type, DOMAIN_XENFV) {
+ } else if (type == DOMAIN_XENFV) {
CMSetProperty(inst, "Caption",
(CMPIValue *)"FV disk", CMPI_chars);
}
@@ -671,6 +671,7 @@
char *pfx;
const char *id;
uint64_t disk_size;
+ uint16_t emu_type = 0;
CMPIStatus s = {CMPI_RC_OK, NULL};
switch(template_type) {
@@ -702,16 +703,54 @@
pfx = class_prefix_name(CLASSNAME(ref));
if (STREQ(pfx, "Xen")) {
- s = set_disk_props(DOMAIN_XENPV, ref, id, disk_size, list);
-
+ int xen_type[2] = {DOMAIN_XENFV, DOMAIN_XENPV};
+ int i = 0;
+
+ for (; i < 2; i++) {
+ emu_type = 0;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ emu_type = 1;
+ s = set_disk_props(xen_type[i],
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+ }
+ } else if (STREQ(pfx, "KVM")) {
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
if (s.rc != CMPI_RC_OK)
- goto out;
+ goto out;
- s = set_disk_props(DOMAIN_XENFV, ref, id, disk_size, list);
- } else if (STREQ(pfx, "KVM")) {
- s = set_disk_props(DOMAIN_KVM, ref, id, disk_size, list);
+ emu_type = 1;
+ s = set_disk_props(DOMAIN_KVM,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else if (STREQ(pfx, "LXC")) {
- s = set_disk_props(DOMAIN_LXC, ref, id, disk_size, list);
+ s = set_disk_props(DOMAIN_LXC,
+ ref,
+ id,
+ disk_size,
+ emu_type,
+ list);
} else {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
host_enum_sys.patch:
--- NEW FILE host_enum_sys.patch ---
# HG changeset patch
# User Kaitlin Rupert <karupert at us.ibm.com>
# Date 1232562000 28800
# Node ID 189cc68a2f5a3251be1204bdaddfd90bb8740789
# Parent eb2df7761596b0fdb38c02aa741c00592e8ddf08
Replace CBGetInstance() with CBEnumInstances() in Virt_HostSystem
This is a work around to deal with the way the SBLIM provider determines the
FQDN of a host system. The value the SBLIM provider returns can depend on
how the /etc/hosts file is formatted, as well as other factors (running
dnsdomainname caused the provider to print two different values on my system).
Signed-off-by: Kaitlin Rupert <karupert at us.ibm.com>
diff -r eb2df7761596 -r 189cc68a2f5a src/Virt_HostSystem.c
--- a/src/Virt_HostSystem.c Fri Jan 23 11:48:46 2009 -0800
+++ b/src/Virt_HostSystem.c Wed Jan 21 10:20:00 2009 -0800
@@ -144,16 +144,10 @@
CMPIInstance **inst)
{
CMPIObjectPath *path;
+ CMPIEnumeration *en = NULL;
+ CMPIData data;
CMPIStatus s;
const char *cn = "Linux_ComputerSystem";
- char name[256];
-
- if (get_fqdn(name, sizeof(name)) != 0) {
- cu_statusf(broker, &s,
- CMPI_RC_ERR_FAILED,
- "Unable to get hostname: %m");
- return s;
- }
path = CMNewObjectPath(broker, "root/cimv2", cn, &s);
if ((path == NULL) || (s.rc != CMPI_RC_OK)) {
@@ -163,11 +157,33 @@
return s;
}
- CMAddKey(path, "CreationClassName", cn, CMPI_chars);
- CMAddKey(path, "Name", name, CMPI_chars);
+ /* FIXME: This approach may return the wrong instance if more than
+ one SBLIM Linux_ComputerSystem instance exists on the system.
+ This isn't likely to happen in most cases, but a better approach
+ should be used here.
+ */
+ en = CBEnumInstances(broker, context, path, NULL, &s);
+ if (en == NULL) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Upcall EnumInstances of %s class failed",
+ cn);
+ goto out;
+ }
- *inst = CBGetInstance(broker, context, path, NULL, &s);
+ if (CMHasNext(en, &s)) {
+ data = CMGetNext(en, &s);
+ if (CMIsNullObject(data.value.inst)) {
+ cu_statusf(broker, &s,
+ CMPI_RC_ERR_FAILED,
+ "Failed to retrieve enumeration entry");
+ goto out;
+ }
+ *inst = data.value.inst;
+ }
+
+ out:
if (s.rc != CMPI_RC_OK) {
CU_DEBUG("SBLIM: %i %s", s.rc, CMGetCharPtr(s.msg));
} else {
Index: libvirt-cim.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-10/libvirt-cim.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- libvirt-cim.spec 15 Jan 2009 21:48:43 -0000 1.22
+++ libvirt-cim.spec 28 Jan 2009 16:27:09 -0000 1.23
@@ -3,13 +3,14 @@
Summary: A CIM provider for libvirt
Name: libvirt-cim
Version: 0.5.3
-Release: 1%{?dist}
+Release: 2%{?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
+Requires: tog-pegasus
BuildRequires: libcmpiutil >= 0.4
BuildRequires: tog-pegasus-devel
BuildRequires: libvirt-devel >= 0.3.2
@@ -17,6 +18,8 @@
BuildRequires: libxml2-devel
BuildRequires: libcmpiutil-devel
BuildConflicts: sblim-cmpi-devel
+Patch0: emu_1_sdc.patch
+Patch1: host_enum_sys.patch
%description
Libvirt-cim is a CMPI CIM provider that implements the DMTF SVPC
@@ -28,6 +31,8 @@
%setup -q
chmod -f -x src/* libxkutil/* schema/* README doc/* #base_schema/README*
chmod +X src/* libxkutil/* schema/*
+%patch0 -p1
+%patch1 -p1
%build
%configure --disable-werror
@@ -57,7 +62,10 @@
%define SCHEMA %{_datadir}/%{name}/*.mof
%define INTEROP_REG %{_datadir}/%{name}/{RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.registration
-%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,ElementConformsToProfile,ReferencedProfile}.mof
+%define INTEROP_MOF %{_datadir}/%{name}/{ComputerSystem,HostSystem,RegisteredProfile,DiskPool,MemoryPool,NetPool,ProcessorPool,VSMigrationService,ElementConformsToProfile,ReferencedProfile}.mof
+
+%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
@@ -82,6 +90,9 @@
%{_datadir}/%{name}/provider-register.sh -t pegasus \
-n root/interop \
-r %{INTEROP_REG} -m %{INTEROP_MOF} -v >/dev/null 2>&1 || true
+%{_datadir}/%{name}/provider-register.sh -t pegasus \
+ -n root/cimv2\
+ -r %{CIMV2_REG} -m %{CIMV2_MOF} -v >/dev/null 2>&1 || true
%preun
%{_datadir}/%{name}/provider-register.sh -d -t pegasus \
@@ -103,12 +114,19 @@
%{_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/fix_schema.patch
%{_datadir}/libvirt-cim/cimv*-MOFs.zip
/etc/ld.so.conf.d/libvirt-cim.conf
%changelog
+* Tue Jan 27 2009 Kaitlin Rupert <kaitlin at us.ibm.com> - 0.5.3-2
+- Added Requires tag to ensure tog-pegasus dependency
+- Fixed root/cimv2 ns registration in spec
+- Added emu_1_sdc.patch to expose template DiskRASDs with EmulatedType = 1
+- Added host_enum_sys.patch to use CBEnumInst() to check for SBLIM inst
+
* Thu Jan 15 2009 Kaitlin Rupert <kaitlin at us.ibm.com> - 0.5.3-1
- Updated to latest upstream source
Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libvirt-cim/F-10/sources,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- sources 15 Jan 2009 21:48:43 -0000 1.13
+++ sources 28 Jan 2009 16:27:09 -0000 1.14
@@ -1,2 +1,2 @@
f0d8962114b77e380c35af0f21a86f3f libvirt-cim-0.5.2.tar.gz
-a60d1516af3105cf4bb60ee1f7ccc4ad libvirt-cim-0.5.3.tar.gz
+69ad4eb18622482e6cd99c4c20ed01b0 libvirt-cim-0.5.3.tar.gz
More information about the scm-commits
mailing list