[PATCH] [TEST] Verify that user can specify target dev for network interfaces
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1264722478 28800
# Node ID 9affcdf0161c46cabf18da29f5c9f209d68d9f7b
# Parent 4bd00149b4a04b6c02efda72e3de45a86c806feb
[TEST] Verify that user can specify target dev for network interfaces
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 4bd00149b4a0 -r 9affcdf0161c suites/libvirt-cim/cimtest/VirtualSystemManagementService/26_definesystem_nic_dev.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/26_definesystem_nic_dev.py Thu Jan 28 15:47:58 2010 -0800
@@ -0,0 +1,141 @@
+#!/usr/bin/python
+#
+# Copyright 2010 IBM Corp.
+#
+# Authors:
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+#
+# 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
+#
+# Purpose:
+# Verify provider's support for specifying the target device for vNICs
+#
+# Steps:
+# 1) Build RASD parameters, making sure to specify target device for network
+# interface
+# 2) Create guest
+# 3) Verify guest is defined properly
+#
+
+import sys
+from CimTest.Globals import logger
+from CimTest.ReturnCodes import FAIL, PASS, SKIP
+from XenKvmLib.classes import get_typed_class, inst_to_mof
+from XenKvmLib.rasd import get_default_rasds
+from XenKvmLib.const import do_main, get_provider_version
+from XenKvmLib.vxml import get_class
+from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.enumclass import EnumInstances
+
+sup_types = ['Xen', 'XenFV', 'KVM']
+test_dom = 'rstest_nic'
+
+target_dev_rev = 1026
+
+def get_rasd_list(ip, virt, target_dev):
+ nrasd_cn = get_typed_class(virt, "NetResourceAllocationSettingData")
+
+ rasds = get_default_rasds(ip, virt)
+
+ rasd_list = {}
+
+ for rasd in rasds:
+ if rasd.classname == nrasd_cn and "Default" in rasd['InstanceID']:
+
+ rasd['VirtualDevice'] = target_dev
+
+ rasd_list[rasd.classname] = inst_to_mof(rasd)
+
+ return rasd_list
+
+def verify_net_rasd(ip, virt, target_dev, guest_name):
+ inst = None
+
+ try:
+ nrasd_cn = get_typed_class(virt, 'NetResourceAllocationSettingData')
+ enum_list = EnumInstances(ip, nrasd_cn)
+
+ if enum_list < 1:
+ raise Exception("No %s instances returned" % nrasd_cn)
+
+ for rasd in enum_list:
+ guest, dev, status = parse_instance_id(rasd.InstanceID)
+ if status != PASS:
+ raise Exception("Unable to parse InstanceID: %s" % \
+ rasd.InstanceID)
+
+ if guest == guest_name:
+ inst = rasd
+ break
+
+ if inst is None:
+ raise Exception("%s instance for %s not found" % (nrasd_cn,
+ guest_name))
+
+ if inst.VirtualDevice != target_dev:
+ raise Exception("Expected VirtualDevice to be %s" % target_dev)
+
+ except Exception, details:
+ logger.error(details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ options = main.options
+
+ status = FAIL
+
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < target_dev_rev:
+ logger.error("Network interface target device support is available" \
+ " in rev >= %s", target_dev_rev)
+ return SKIP
+
+ cxml = get_class(options.virt)(test_dom)
+
+ target_dev = "vtap7"
+
+ guest_defined = False
+
+ try:
+ rasd_list = get_rasd_list(options.ip, options.virt, target_dev)
+ if len(rasd_list) < 1:
+ raise Exception("Unable to get template RASDs for %s" % test_dom)
+
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Unable to define %s" % test_dom)
+
+ guest_defined = True
+
+ status = verify_net_rasd(options.ip, options.virt, target_dev, test_dom)
+ if status != PASS:
+ raise Exception("Failed to net interface for %s" % test_dom)
+
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
+
+ if guest_defined == True:
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
14 years, 7 months
[PATCH 0 of 3] Add support for setting nic target device
by Kaitlin Rupert
Per the libvirt documentation, users can specify a network interface's target
device. If one isn't provided, libvirt will set one automatically. So this is
optional setting. Also per the documentation, a target device name cannot
start with 'vnet' or 'vif'. These values are reserved.
A corresponding test case is also being submitted.
14 years, 7 months
[PATCH] [TEST] #2 Verify creation of a guest with a floppy device
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1264716059 28800
# Node ID 4bd00149b4a04b6c02efda72e3de45a86c806feb
# Parent b863f339b41bab9569c8306b804377a99bd3b199
[TEST] #2 Verify creation of a guest with a floppy device
Updates:
-Fix typo in header comment
-Change rasd.['InstanceID'].find("Default") to
"Default" is in rasd.['InstanceID']
-Consolidate error conditions into one if statement since the debug message
printed is the same
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b863f339b41b -r 4bd00149b4a0 suites/libvirt-cim/cimtest/VirtualSystemManagementService/25_definesystem_floppy.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/25_definesystem_floppy.py Thu Jan 28 14:00:59 2010 -0800
@@ -0,0 +1,149 @@
+#!/usr/bin/python
+#
+# Copyright 2010 IBM Corp.
+#
+# Authors:
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+#
+# 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
+#
+# Purpose:
+# Verify providers support floppy devices
+#
+# Steps:
+# 1) Create a guest with a regular disk device and a floppy device
+# 2) Build RASD parameters, making sure to specify floppy device
+# 3) Verify guest is defined properly
+#
+
+import sys
+from CimTest.Globals import logger
+from CimTest.ReturnCodes import FAIL, PASS, SKIP
+from XenKvmLib.classes import get_typed_class, inst_to_mof
+from XenKvmLib.rasd import get_rasd_templates
+from XenKvmLib.const import do_main, get_provider_version, \
+ KVM_secondary_disk_path, default_pool_name
+from XenKvmLib.vxml import get_class
+from XenKvmLib.vsms import VIRT_DISK_TYPE_FLOPPY
+from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.enumclass import EnumInstances
+
+sup_types = ['Xen', 'XenFV', 'KVM']
+test_dom = 'rstest_floppy'
+
+floppy_rev = 1023
+
+def get_rasd_list(ip, virt, addr):
+ drasd_cn = get_typed_class(virt, "DiskResourceAllocationSettingData")
+ pool_id = "DiskPool/%s" % default_pool_name
+
+ rasds = get_rasd_templates(ip, virt, pool_id)
+ if len(rasds) < 1:
+ logger.info("No RASD templates returned for %s", pool_id)
+ return []
+
+ rasd_list = {}
+
+ for rasd in rasds:
+ if rasd.classname != drasd_cn:
+ continue
+
+ if rasd['EmulatedType'] == VIRT_DISK_TYPE_FLOPPY and \
+ "Default" in rasd['InstanceID']:
+
+ rasd['Address'] = addr
+ rasd_list[rasd.classname] = inst_to_mof(rasd)
+
+ return rasd_list
+
+def verify_floppy_disk(ip, virt, addr, guest_name):
+ inst = None
+
+ try:
+ drasd_cn = get_typed_class(virt, 'DiskResourceAllocationSettingData')
+ enum_list = EnumInstances(ip, drasd_cn)
+
+ if enum_list < 1:
+ raise Exception("No %s instances returned" % drasd_cn)
+
+ for rasd in enum_list:
+ guest, dev, status = parse_instance_id(rasd.InstanceID)
+ if status != PASS:
+ raise Exception("Unable to parse InstanceID: %s" % \
+ rasd.InstanceID)
+
+ if guest == guest_name:
+ inst = rasd
+ break
+
+ if inst is None or inst.Address != addr:
+ raise Exception("%s instance for %s not found" % (drasd_cn,
+ guest_name))
+
+ if inst.EmulatedType != VIRT_DISK_TYPE_FLOPPY:
+ raise Exception("Expected device to be of %d type" % \
+ (VIRT_DISK_TYPE_FLOPPY))
+
+ except Exception, details:
+ logger.error(details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ options = main.options
+
+ status = FAIL
+
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < floppy_rev:
+ logger.error("Floppy support is available in rev >= %s", floppy_rev)
+ return SKIP
+
+ cxml = get_class(options.virt)(test_dom)
+
+ addr = KVM_secondary_disk_path
+
+ guest_defined = False
+
+ try:
+ rasd_list = get_rasd_list(options.ip, options.virt, addr)
+ if len(rasd_list) < 1:
+ raise Exception("Unable to get template RASDs for %s" % test_dom)
+
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Unable to define %s" % test_dom)
+
+ guest_defined = True
+
+ status = verify_floppy_disk(options.ip, options.virt, addr, test_dom)
+ if status != PASS:
+ raise Exception("Failed to verify disk path for %s" % test_dom)
+
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
+
+ if guest_defined == True:
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff -r b863f339b41b -r 4bd00149b4a0 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Dec 11 16:12:01 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Thu Jan 28 14:00:59 2010 -0800
@@ -37,6 +37,10 @@
RASD_TYPE_INPUT = 13
RASD_TYPE_STOREVOL = 32768
+VIRT_DISK_TYPE_DISK = 0
+VIRT_DISK_TYPE_CDROM = 1
+VIRT_DISK_TYPE_FLOPPY = 2
+
VSSD_RECOVERY_NONE = 2
VSSD_RECOVERY_RESTART = 3
VSSD_RECOVERY_PRESERVE = 123
14 years, 7 months
[PATCH] [TEST] Verify creation of a guest with a floppy device
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1264633475 28800
# Node ID f89fab2298c8f47552437b6d75b5ac57b6ba1cf1
# Parent b863f339b41bab9569c8306b804377a99bd3b199
[TEST] Verify creation of a guest with a floppy device
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b863f339b41b -r f89fab2298c8 suites/libvirt-cim/cimtest/VirtualSystemManagementService/25_definesystem_floppy.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/25_definesystem_floppy.py Wed Jan 27 15:04:35 2010 -0800
@@ -0,0 +1,153 @@
+#!/usr/bin/python
+#
+# Copyright 2010 IBM Corp.
+#
+# Authors:
+# Kaitlin Rupert <karupert(a)us.ibm.com>
+#
+# 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
+#
+# Purpose:
+# Verify providers support floppy devices
+#
+# Steps:
+# 1) Create a with a regular disk device and a floppy device
+# 2) Build RASD parameters, making sure to specify floppy device
+# 3) Verify guest is defined properly
+#
+
+import sys
+from CimTest.Globals import logger
+from CimTest.ReturnCodes import FAIL, PASS, SKIP
+from XenKvmLib.classes import get_typed_class, inst_to_mof
+from XenKvmLib.rasd import get_rasd_templates
+from XenKvmLib.const import do_main, get_provider_version, \
+ KVM_secondary_disk_path, default_pool_name
+from XenKvmLib.vxml import get_class
+from XenKvmLib.vsms import VIRT_DISK_TYPE_FLOPPY
+from XenKvmLib.common_util import parse_instance_id
+from XenKvmLib.enumclass import EnumInstances
+
+sup_types = ['Xen', 'XenFV', 'KVM']
+test_dom = 'rstest_floppy'
+
+floppy_rev = 1023
+
+def get_rasd_list(ip, virt, addr):
+ drasd_cn = get_typed_class(virt, "DiskResourceAllocationSettingData")
+ pool_id = "DiskPool/%s" % default_pool_name
+
+ rasds = get_rasd_templates(ip, virt, pool_id)
+ if len(rasds) < 1:
+ logger.info("No RASD templates returned for %s", pool_id)
+ return []
+
+ rasd_list = {}
+
+ for rasd in rasds:
+ if rasd.classname != drasd_cn:
+ continue
+
+ if rasd['EmulatedType'] == VIRT_DISK_TYPE_FLOPPY and \
+ rasd['InstanceID'].find("Default") >= 0:
+
+ rasd['Address'] = addr
+ rasd_list[rasd.classname] = inst_to_mof(rasd)
+
+ return rasd_list
+
+def verify_floppy_disk(ip, virt, addr, guest_name):
+ inst = None
+
+ try:
+ drasd_cn = get_typed_class(virt, 'DiskResourceAllocationSettingData')
+ enum_list = EnumInstances(ip, drasd_cn)
+
+ if enum_list < 1:
+ raise Exception("No %s instances returned" % drasd_cn)
+
+ for rasd in enum_list:
+ guest, dev, status = parse_instance_id(rasd.InstanceID)
+ if status != PASS:
+ raise Exception("Unable to parse InstanceID: %s" % \
+ rasd.InstanceID)
+
+ if guest == guest_name:
+ inst = rasd
+ break
+
+ if inst is None:
+ raise Exception("%s instance for %s not found" % (drasd_cn,
+ guest_name))
+
+ if inst.Address != addr:
+ raise Exception("%s instance for %s not found" % (drasd_cn,
+ guest_name))
+
+ if inst.EmulatedType != VIRT_DISK_TYPE_FLOPPY:
+ raise Exception("Expected device to be of %d type" % \
+ (VIRT_DISK_TYPE_FLOPPY))
+
+ except Exception, details:
+ logger.error(details)
+ return FAIL
+
+ return PASS
+
+@do_main(sup_types)
+def main():
+ options = main.options
+
+ status = FAIL
+
+ curr_cim_rev, changeset = get_provider_version(options.virt, options.ip)
+ if curr_cim_rev < floppy_rev:
+ logger.error("Floppy support is available in rev >= %s", floppy_rev)
+ return SKIP
+
+ cxml = get_class(options.virt)(test_dom)
+
+ addr = KVM_secondary_disk_path
+
+ guest_defined = False
+
+ try:
+ rasd_list = get_rasd_list(options.ip, options.virt, addr)
+ if len(rasd_list) < 1:
+ raise Exception("Unable to get template RASDs for %s" % test_dom)
+
+ cxml.set_res_settings(rasd_list)
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Unable to define %s" % test_dom)
+
+ guest_defined = True
+
+ status = verify_floppy_disk(options.ip, options.virt, addr, test_dom)
+ if status != PASS:
+ raise Exception("Failed to verify disk path for %s" % test_dom)
+
+ except Exception, details:
+ logger.error(details)
+ status = FAIL
+
+ if guest_defined == True:
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff -r b863f339b41b -r f89fab2298c8 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Fri Dec 11 16:12:01 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Wed Jan 27 15:04:35 2010 -0800
@@ -37,6 +37,10 @@
RASD_TYPE_INPUT = 13
RASD_TYPE_STOREVOL = 32768
+VIRT_DISK_TYPE_DISK = 0
+VIRT_DISK_TYPE_CDROM = 1
+VIRT_DISK_TYPE_FLOPPY = 2
+
VSSD_RECOVERY_NONE = 2
VSSD_RECOVERY_RESTART = 3
VSSD_RECOVERY_PRESERVE = 123
14 years, 7 months
[PATCH] [TEST] #2 For Xen enabled systems, a storage volume template is generated for
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1260576721 28800
# Node ID 4c5704672c1f5a196a6547f285dba87e66617a68
# Parent 01b88f487b415f6daa4529a3c1cf673d55cfc558
[TEST] #2 For Xen enabled systems, a storage volume template is generated for ..
Both para virt guests and full virt guests.
Updates:
-Reworked this test, as the verify_sto_vol_rasd() had a misleading name. This
function doesn't check SDC for storage volume templates, it checks to see
if there are template disk RASDs that correspond to the newly created
storage volume. Changed the name of this function to
verify_template_rasd_exists()
On Xen systems, disk templates are generated for both PV and FV guests.
This occurs regardless of whether the system support both PV and FV.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 01b88f487b41 -r 4c5704672c1f suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py
--- a/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Fri Dec 11 16:12:01 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ResourcePoolConfigurationService/10_create_storagevolume.py Fri Dec 11 16:12:01 2009 -0800
@@ -33,7 +33,7 @@
from CimTest.ReturnCodes import FAIL, PASS, SKIP
from XenKvmLib.const import do_main, platform_sup, default_pool_name, \
get_provider_version, _image_dir
-from XenKvmLib.vsms import RASD_TYPE_STOREVOL
+from XenKvmLib.vsms import RASD_TYPE_STOREVOL, RASD_TYPE_DISK
from XenKvmLib.rasd import libvirt_rasd_storagepool_changes
from XenKvmLib import rpcs_service
from XenKvmLib.assoc import Associators
@@ -46,7 +46,7 @@
pool_attr = { 'Path' : _image_dir }
vol_name = "cimtest-vol.img"
-def get_stovol_rasd_from_sdc(virt, server, dp_inst_id):
+def get_template_rasd_from_sdc(virt, server, dp_inst_id):
rasd = None
ac_cn = get_typed_class(virt, "AllocationCapabilities")
an_cn = get_typed_class(virt, "SettingsDefineCapabilities")
@@ -62,7 +62,7 @@
return PASS, rasd
def get_stovol_settings(server, virt, dp_id, pool_name):
- status, dp_rasds = get_stovol_rasd_from_sdc(virt, server, dp_id)
+ status, dp_rasds = get_template_rasd_from_sdc(virt, server, dp_id)
if status != PASS:
logger.error("Failed to get the StorageVol RASD's")
return None
@@ -111,19 +111,29 @@
return found
-def verify_sto_vol_rasd(virt, server, dp_inst_id, exp_vol_path):
+#This function verifies that a template DiskRASD exists for the newly created
+#storage volume.
+def verify_template_rasd_exists(virt, server, dp_inst_id, exp_vol_path):
dv_rasds = []
- status, rasds = get_stovol_rasd_from_sdc(virt, server, dp_inst_id)
+ status, rasds = get_template_rasd_from_sdc(virt, server, dp_inst_id)
if status != PASS:
logger.error("Failed to get the StorageVol for '%s' vol", exp_vol_path)
return FAIL
for item in rasds:
- if item['Address'] == exp_vol_path and item['PoolID'] == dp_inst_id:
+ if item['Address'] == exp_vol_path and item['PoolID'] == dp_inst_id \
+ and item['ResourceType'] == RASD_TYPE_DISK:
dv_rasds.append(item)
- if len(dv_rasds) != 4:
- logger.error("Got '%s' StorageVolRASD's expected 4", len(dv_rasds))
+ exp_template_rasd = 4
+
+ if virt == "Xen" or virt == "XenFV":
+ #There's one of each RASD type for both paravirt Xen and full virt Xen
+ exp_template_rasd = exp_template_rasd * 2
+
+ if len(dv_rasds) != exp_template_rasd:
+ logger.error("Got '%s' StorageVolRASD's expected %s", len(dv_rasds),
+ exp_template_rasd)
return FAIL
return PASS
@@ -222,8 +232,9 @@
raise Exception("Failed to create the Vol %s" % vol_name)
found = verify_vol(server, virt, pool_name, exp_vol_path, found)
- stovol_status = verify_sto_vol_rasd(virt, server, dp_inst_id,
- exp_vol_path)
+ stovol_status = verify_template_rasd_exists(virt, server,
+ dp_inst_id,
+ exp_vol_path)
ret = cleanup_pool_vol(server, virt, pool_name,
clean_pool, exp_vol_path)
@@ -237,7 +248,6 @@
logger.error("Exception details: %s", details)
status = FAIL
-
return status
if __name__ == "__main__":
sys.exit(main())
14 years, 7 months
Test Run Summary (Jan 25 2010): KVM on Fedora release 13 (Rawhide) with Pegasus
by Deepti B Kalakeri
=================================================
Test Run Summary (Jan 25 2010): KVM on Fedora release 13 (Rawhide) with Pegasus
=================================================
Distro: Fedora release 13 (Rawhide)
Kernel: 2.6.31.6-166.fc12.x86_64
libvirt: 0.7.4
Hypervisor: QEMU 0.12.1
CIMOM: Pegasus 2.9.0
Libvirt-cim revision: 1025
Libvirt-cim changeset: b57ba34c0932
Cimtest revision: 833
Cimtest changeset: 2de7eb653b5f
Total test execution: Unknown
=================================================
FAIL : 2
XFAIL : 4
SKIP : 12
PASS : 161
-----------------
Total : 179
=================================================
FAIL Test Summary:
HostSystem - 03_hs_to_settdefcap.py: FAIL
SettingsDefineCapabilities - 01_forward.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
VirtualSystemManagementService - 23_verify_duplicate_mac_err.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
=================================================
Full report:
--------------------------------------------------------------------
AllocationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
AllocationCapabilities - 02_alloccap_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 01_enum.py: PASS
--------------------------------------------------------------------
ComputerSystem - 02_nosystems.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
ComputerSystem - 03_defineVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 04_defineStartVS.py: PASS
--------------------------------------------------------------------
ComputerSystem - 05_activate_defined_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 06_paused_active_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 22_define_suspend.py: PASS
--------------------------------------------------------------------
ComputerSystem - 23_pause_pause.py: PASS
--------------------------------------------------------------------
ComputerSystem - 27_define_pause_errs.py: PASS
--------------------------------------------------------------------
ComputerSystem - 32_start_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot with return code 1
ERROR - Exception: Unable reboot dom 'cs_test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_FAILED: Unable to reboot domain: this function is not supported by the hypervisor: virDomainReboot
Bug:<00005>
--------------------------------------------------------------------
ComputerSystem - 33_suspend_reboot.py: XFAIL
ERROR - Got CIM error CIM_ERR_NOT_SUPPORTED: State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): CIM_ERR_NOT_SUPPORTED: State not supported
Bug:<00012>
--------------------------------------------------------------------
ComputerSystem - 34_start_disable.py: PASS
--------------------------------------------------------------------
ComputerSystem - 35_start_reset.py: PASS
--------------------------------------------------------------------
ComputerSystem - 40_RSC_start.py: PASS
--------------------------------------------------------------------
ComputerSystem - 41_cs_to_settingdefinestate.py: PASS
--------------------------------------------------------------------
ComputerSystem - 42_cs_gi_errs.py: PASS
--------------------------------------------------------------------
ComputerSystemIndication - 01_created_indication.py: PASS
--------------------------------------------------------------------
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: SKIP
--------------------------------------------------------------------
ElementAllocatedFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 03_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementAllocatedFromPool - 04_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 01_forward.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ElementCapabilities - 05_hostsystem_cap.py: PASS
--------------------------------------------------------------------
ElementConforms - 01_forward.py: PASS
--------------------------------------------------------------------
ElementConforms - 02_reverse.py: PASS
--------------------------------------------------------------------
ElementConforms - 03_ectp_fwd_errs.py: PASS
--------------------------------------------------------------------
ElementConforms - 04_ectp_rev_errs.py: PASS
--------------------------------------------------------------------
ElementSettingData - 01_forward.py: PASS
--------------------------------------------------------------------
ElementSettingData - 03_esd_assoc_with_rasd_errs.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
EnabledLogicalElementCapabilities - 02_elecap_gi_errs.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 01_forward.py: PASS
--------------------------------------------------------------------
HostedAccessPoint - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 01_forward.py: PASS
--------------------------------------------------------------------
HostedDependency - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedDependency - 03_enabledstate.py: PASS
--------------------------------------------------------------------
HostedDependency - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 01_forward.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedResourcePool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostedService - 01_forward.py: PASS
--------------------------------------------------------------------
HostedService - 02_reverse.py: PASS
--------------------------------------------------------------------
HostedService - 03_forward_errs.py: PASS
--------------------------------------------------------------------
HostedService - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: FAIL
ERROR - KVM_SettingsDefineCapabilities returned 40 RASD objects instead of 32 for DiskPool/cimtest-diskpool
CIM_ERR_INVALID_CLASS: Linux_ComputerSystem
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.py: PASS
--------------------------------------------------------------------
KVMRedirectionSAP - 02_ipv6_support.py: PASS
--------------------------------------------------------------------
LogicalDisk - 01_disk.py: PASS
--------------------------------------------------------------------
LogicalDisk - 02_nodevs.py: SKIP
ERROR - System has defined domains; unable to run
--------------------------------------------------------------------
LogicalDisk - 03_ld_gi_errs.py: PASS
--------------------------------------------------------------------
Memory - 01_memory.py: PASS
--------------------------------------------------------------------
Memory - 02_defgetmem.py: PASS
--------------------------------------------------------------------
Memory - 03_mem_gi_errs.py: PASS
--------------------------------------------------------------------
NetworkPort - 01_netport.py: PASS
--------------------------------------------------------------------
NetworkPort - 02_np_gi_errors.py: PASS
--------------------------------------------------------------------
NetworkPort - 03_user_netport.py: PASS
--------------------------------------------------------------------
Processor - 01_processor.py: PASS
--------------------------------------------------------------------
Processor - 02_definesys_get_procs.py: PASS
--------------------------------------------------------------------
Processor - 03_proc_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 01_enum.py: PASS
--------------------------------------------------------------------
Profile - 02_profile_to_elec.py: PASS
--------------------------------------------------------------------
Profile - 03_rprofile_gi_errs.py: PASS
--------------------------------------------------------------------
Profile - 04_verify_libvirt_cim_slp_profiles.py: SKIP
04_verify_libvirt_cim_slp_profiles.py:30: DeprecationWarning: the sets module is deprecated
from sets import Set
ERROR - SLP tool does not exist on the machine
--------------------------------------------------------------------
RASD - 01_verify_rasd_fields.py: PASS
--------------------------------------------------------------------
RASD - 02_enum.py: PASS
--------------------------------------------------------------------
RASD - 03_rasd_errs.py: PASS
--------------------------------------------------------------------
RASD - 04_disk_rasd_size.py: PASS
--------------------------------------------------------------------
RASD - 05_disk_rasd_emu_type.py: PASS
--------------------------------------------------------------------
RASD - 06_parent_net_pool.py: PASS
--------------------------------------------------------------------
RASD - 07_parent_disk_pool.py: PASS
--------------------------------------------------------------------
RASDIndications - 01_guest_states_rasd_ind.py: PASS
--------------------------------------------------------------------
RASDIndications - 02_guest_add_mod_rem_rasd_ind.py: PASS
--------------------------------------------------------------------
RedirectionService - 01_enum_crs.py: PASS
--------------------------------------------------------------------
RedirectionService - 02_enum_crscap.py: PASS
--------------------------------------------------------------------
RedirectionService - 03_RedirectionSAP_errs.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 01_verify_refprof.py: PASS
--------------------------------------------------------------------
ReferencedProfile - 02_refprofile_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 01_forward.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 02_reverse.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 03_forward_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 04_reverse_errs.py: PASS
--------------------------------------------------------------------
ResourceAllocationFromPool - 05_RAPF_err.py: PASS
--------------------------------------------------------------------
ResourcePool - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePool - 02_rp_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationCapabilities - 02_rpcc_gi_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 01_enum.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 02_rcps_gi_errors.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 03_CreateResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 04_CreateChildResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 05_AddResourcesToResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 06_RemoveResourcesFromResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 08_CreateDiskResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 09_DeleteDiskPool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 10_create_storagevolume.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 11_create_dir_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 12_create_netfs_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 13_delete_storagevolume.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 14_delete_storagevolume_errs.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAccessBySAP - 02_reverse.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 01_forward.py: PASS
--------------------------------------------------------------------
ServiceAffectsElement - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 01_forward.py: PASS
--------------------------------------------------------------------
SettingsDefine - 02_reverse.py: PASS
--------------------------------------------------------------------
SettingsDefine - 03_sds_fwd_errs.py: PASS
--------------------------------------------------------------------
SettingsDefine - 04_sds_rev_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 01_forward.py: FAIL
ERROR - KVM_SettingsDefineCapabilities returned 40 ResourcePool objects instead of 32
--------------------------------------------------------------------
SettingsDefineCapabilities - 03_forward_errs.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 04_forward_vsmsdata.py: PASS
--------------------------------------------------------------------
SettingsDefineCapabilities - 05_reverse_vsmcap.py: PASS
--------------------------------------------------------------------
SystemDevice - 01_forward.py: PASS
--------------------------------------------------------------------
SystemDevice - 02_reverse.py: PASS
--------------------------------------------------------------------
SystemDevice - 03_fwderrs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementCapabilities - 02_vsmcap_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 01_definesystem_name.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 02_destroysystem.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 03_definesystem_ess.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 04_definesystem_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 05_destroysystem_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 06_addresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 07_addresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 08_modifyresource.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 09_procrasd_persist.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 14_define_sys_disk.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 15_mod_system_settings.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 16_removeresource.py: XFAIL
ERROR - 0 RASD insts for domain/mouse:ps2
CIM_ERR_NOT_FOUND: No such instance (no device domain/mouse:ps2)
Bug:<00014>
--------------------------------------------------------------------
VirtualSystemManagementService - 17_removeresource_neg.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 18_define_sys_bridge.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 19_definenetwork_ers.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 20_verify_vnc_password.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 21_createVS_verifyMAC.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 22_addmulti_brg_interface.py: XFAIL
ERROR - (1, u"CIM_ERR_FAILED: Unable to change (0) device: operation failed: parsing pci_add reply failed: PCI bus doesn't support hotplug\r\nfailed to add macaddr=99:aa:bb:cc:ee:ff,vlan=1,name=nic.1\r\n")
ERROR - Error invoking AddRS: add_net_res
ERROR - AddResourceSettings call failed
ERROR - Failed to destroy Virtual Network 'my_network1'
InvokeMethod(AddResourceSettings): CIM_ERR_FAILED: Unable to change (0) device: operation failed: parsing pci_add reply failed: PCI bus doesn't support hotplug
failed to add macaddr=99:aa:bb:cc:ee:ff,vlan=1,name=nic.1
Bug:<00015>
--------------------------------------------------------------------
VirtualSystemManagementService - 23_verify_duplicate_mac_err.py: SKIP
ERROR - Need to give different bridge name since it already exists
--------------------------------------------------------------------
VirtualSystemManagementService - 24_define_sys_features.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 24_verify_modifyres_output.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationCapabilities - 02_vsmc_gi_errs.py: PASS
--------------------------------------------------------------------
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
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemMigrationSettingData - 02_vsmsd_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 01_forward.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 02_reverse.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 03_vssdc_fwd_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSettingDataComponent - 04_vssdc_rev_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 02_vs_sservice_gi_errs.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotService - 03_create_snapshot.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 01_enum.py: PASS
--------------------------------------------------------------------
VirtualSystemSnapshotServiceCapabilities - 02_vs_sservicecap_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.py: PASS
--------------------------------------------------------------------
VSSD - 05_set_uuid.py: PASS
--------------------------------------------------------------------
VSSD - 06_duplicate_uuid.py: PASS
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
14 years, 7 months
[PATCH] for cimtest
by Osier Yang
Hi all
the patch is trying to solve the problem:
when there is .vmlinuz-*.hmac under /boot,
cimtest/suites/libvirt-cim/images/xmt-makefv.sh won't work.
[root@dhcp-66-70-159 ~]# ls -a /boot/ | grep vmlinuz
vmlinuz-2.6.18-183.el5
.vmlinuz-2.6.18-183.el5.hmac
vmlinuz-2.6.18-183.el5xen
.vmlinuz-2.6.18-183.el5xen.hmac
[root@dhcp-66-70-159 images]# make
mkdir -p xm-test
(cd xm-test && wget
http://xm-test.xensource.com/ramdisks/initrd-1.1-i386.img)
--2010-01-14 08:33:15--
http://xm-test.xensource.com/ramdisks/initrd-1.1-i386.img
Resolving xm-test.xensource.com... 70.42.241.107
Connecting to xm-test.xensource.com|70.42.241.107|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3645440 (3.5M) [text/plain]
Saving to: `initrd-1.1-i386.img'
100%[=====================================>] 3,645,440 7.76K/s in 7m
22s
2010-01-14 08:40:39 (8.05 KB/s) - `initrd-1.1-i386.img' saved
[3645440/3645440]
chmod +x xmt-convert.sh
(cd xm-test && sh ../xmt-convert.sh `basename xm-test/initrd-1.1-i386.img`)
1856 blocks
if uname -r | grep -q xen; then \
cp /boot/vmlinuz-`uname -r`
/var/lib/libvirt/images/default-xen-kernel; \
fi
chmod +x xmt-makefv.sh
./xmt-makefv.sh xm-test/xm-test.gz xm-test/xmt_disk.img
FAILED:
make: *** [xm-test/xmt_disk.img] Error 1
hope it helps. :-)
Thanks and Regards
osier
14 years, 7 months
[PATCH] Fix storage volume generation so that bytes are supported
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1263415515 28800
# Node ID b57ba34c0932d77e11f65282dec5c2094d6ba818
# Parent 2e80fd8fdbc575decc0b8a1623f8b9ad9122dccf
Fix storage volume generation so that bytes are supported
If the units portion of the <capacity> tag isn't specified, then libvirt
will create the storage volume using bytes as the unit type. libvirt-cim
wasn't supporting this behavior properl. Instead of assuming gigabytes as the
default, libvirt will assume bytes when no unit is specified.
If a unit is specified, it needs to be one of the following supported types:
'k', 'K', 'm', 'M', 'g', 'G', 't', 'T', 'p', 'P', 'y', or 'Y'.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 2e80fd8fdbc5 -r b57ba34c0932 libxkutil/xmlgen.c
--- a/libxkutil/xmlgen.c Fri Dec 11 18:04:28 2009 -0800
+++ b/libxkutil/xmlgen.c Wed Jan 13 12:45:15 2010 -0800
@@ -1129,8 +1129,12 @@
free(string);
- if (xmlNewProp(cap, BAD_CAST "unit", BAD_CAST vol->cap_units) == NULL)
- goto out;
+ if (vol->cap_units != NULL) {
+ xmlAttrPtr tmp = NULL;
+ tmp = xmlNewProp(cap, BAD_CAST "unit", BAD_CAST vol->cap_units);
+ if (tmp == NULL)
+ goto out;
+ }
target = xmlNewChild(v, NULL, BAD_CAST "target", NULL);
if (target == NULL)
diff -r 2e80fd8fdbc5 -r b57ba34c0932 src/Virt_ResourcePoolConfigurationService.c
--- a/src/Virt_ResourcePoolConfigurationService.c Fri Dec 11 18:04:28 2009 -0800
+++ b/src/Virt_ResourcePoolConfigurationService.c Wed Jan 13 12:45:15 2010 -0800
@@ -727,10 +727,10 @@
res->res.storage_vol.cap = int_val;
free(res->res.storage_vol.cap_units);
- if (cu_get_str_prop(inst, "AllocationUnits", &val) != CMPI_RC_OK)
- res->res.storage_vol.cap_units = strdup("G");
+ if (cu_get_str_prop(inst, "AllocationUnits", &val) == CMPI_RC_OK)
+ res->res.storage_vol.cap_units = strdup(val);
else
- res->res.storage_vol.cap_units = strdup(val);
+ res->res.storage_vol.cap_units = NULL;
out:
diff -r 2e80fd8fdbc5 -r b57ba34c0932 src/Virt_SettingsDefineCapabilities.c
--- a/src/Virt_SettingsDefineCapabilities.c Fri Dec 11 18:04:28 2009 -0800
+++ b/src/Virt_SettingsDefineCapabilities.c Wed Jan 13 12:45:15 2010 -0800
@@ -1044,10 +1044,11 @@
}
#if VIR_USE_LIBVIRT_STORAGE
-static CMPIStatus new_volume_template(const CMPIObjectPath *ref,
- int template_type,
- virStoragePoolPtr poolptr,
- struct inst_list *list)
+static CMPIStatus _new_volume_template(const CMPIObjectPath *ref,
+ int template_type,
+ virStoragePoolPtr poolptr,
+ const char *units,
+ struct inst_list *list)
{
const char *id;
CMPIStatus s = {CMPI_RC_OK, NULL};
@@ -1059,7 +1060,6 @@
const char *path;
uint16_t alloc = 0;
uint16_t cap = 0;
- const char *units;
switch(template_type) {
case SDC_RASD_MIN:
@@ -1116,8 +1116,9 @@
cap = 0;
CMSetProperty(inst, "Capacity", (CMPIValue *)&cap, CMPI_uint16);
- units = "G";
- CMSetProperty(inst, "AllocationUnits", (CMPIValue *)units, CMPI_chars);
+ if (units != NULL)
+ CMSetProperty(inst, "AllocationUnits",
+ (CMPIValue *)units, CMPI_chars);
inst_list_add(list, inst);
@@ -1127,6 +1128,25 @@
return s;
}
+static CMPIStatus new_volume_template(const CMPIObjectPath *ref,
+ int template_type,
+ virStoragePoolPtr poolptr,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+ const char *units = NULL;
+
+ s = _new_volume_template(ref, template_type, poolptr, units, list);
+ if (s.rc != CMPI_RC_OK)
+ goto out;
+
+ units = "G";
+ s = _new_volume_template(ref, template_type, poolptr, units, list);
+
+ out:
+ return s;
+}
+
static CMPIStatus avail_volume_template(const CMPIObjectPath *ref,
int template_type,
virStorageVolPtr volume_ptr,
14 years, 8 months