[PATCH] [TEST] Add new tc to verify a MAC address is generated for the domain
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248165703 25200
# Node ID 76407aac7701beedc970f5add3b0c3eeef12c7cb
# Parent 910a44242f106fb6993e94f4431edacf3dedcba3
[TEST] Add new tc to verify a MAC address is generated for the domain.
This test case verifies that, if user does not specify MAC Address,
a MAC address is generated for the domain by the provider.
Verified with KVM and current sources on F10 and SLES11.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 910a44242f10 -r 76407aac7701 suites/libvirt-cim/cimtest/VirtualSystemManagementService/21_createVS_verifyMAC.py
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/21_createVS_verifyMAC.py Tue Jul 21 01:41:43 2009 -0700
@@ -0,0 +1,96 @@
+#!/usr/bin/python
+#
+# Copyright 2009 IBM Corp.
+#
+# Authors:
+# Deepti B. Kalakeri <deeptik(a)linux.vnet.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
+#
+# This test case verifies that, if user does not specify MAC Address,
+# a MAC address is generated for the domain by the provider.
+# Date: 21-07-2009
+#
+
+import sys
+from XenKvmLib.const import do_main
+from CimTest.Globals import logger
+from CimTest.ReturnCodes import PASS, FAIL
+from XenKvmLib.vxml import get_class
+from XenKvmLib.enumclass import EnumInstances
+from XenKvmLib.classes import get_typed_class
+
+SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
+default_dom = 'dom_mac_notspecified'
+MAC_ADDR_LEN = 6
+
+
+def verify_nrasd_mac_value(virt, server):
+ rasd_list = []
+ classname = get_typed_class(virt, "NetResourceAllocationSettingData")
+ try:
+ rasd_list = EnumInstances(server, classname, ret_cim_inst=True)
+ if len(rasd_list) < 1:
+ logger.error("%s returned %i instances, excepted at least 1.",
+ classname, len(rasd_list))
+ return FAIL
+
+ for rasd in rasd_list:
+ # Verify the Mac Address for the domain is generated and set
+ if default_dom in rasd['InstanceID']:
+ mac_addr_len = len(rasd['Address'].split(":"))
+ if rasd['Address'] != "" and mac_addr_len == MAC_ADDR_LEN:
+ logger.info("Mac Address for dom '%s' is set to '%s'", \
+ default_dom, rasd['Address'])
+ return PASS
+
+ except Exception, detail:
+ logger.error("Exception: %s", detail)
+ return FAIL
+
+ logger.error("Mac Address for dom '%s' is not set", default_dom)
+ return FAIL
+
+@do_main(SUPPORTED_TYPES)
+def main():
+ options = main.options
+
+ cxml = get_class(options.virt)(default_dom, mac=None)
+
+ try:
+ ret = cxml.cim_define(options.ip)
+ if not ret:
+ raise Exception("Unable to define %s" % default_dom)
+
+ status = cxml.cim_start(options.ip)
+ if status != PASS:
+ cxml.undefine(options.ip)
+ raise Exception("Failed to start the defined domain: %s" \
+ % default_dom)
+
+ status = verify_nrasd_mac_value(options.virt, options.ip)
+
+ except Exception, details:
+ logger.error("Exception details: %s", details)
+ return FAIL
+
+ cxml.cim_destroy(options.ip)
+ cxml.undefine(options.ip)
+
+ return status
+
+if __name__ == "__main__":
+ sys.exit(main())
+
diff -r 910a44242f10 -r 76407aac7701 suites/libvirt-cim/lib/XenKvmLib/vsms.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vsms.py Mon Jul 20 02:09:38 2009 -0700
+++ b/suites/libvirt-cim/lib/XenKvmLib/vsms.py Tue Jul 21 01:41:43 2009 -0700
@@ -159,10 +159,12 @@
class CIM_NetResourceAllocationSettingData(CIMClassMOF):
def __init__(self, type, mac, name, virt_net=None):
- self.Address = mac
self.NetworkType = type
self.ResourceType = RASD_TYPE_NET_ETHER
+ if mac != None:
+ self.Address = mac
+
if virt_net != None :
if type == 'network':
self.PoolID = "NetworkPool/%s" % virt_net
15 years, 1 month
[PATCH] [TEST]#2 Fixed the RASD/07_parent_disk_pool.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1248103418 25200
# Node ID fc0ce87139b4f1e8a1967e927bf28e442ca3175d
# Parent 14b666e2a803048c1ce4e71b550a49c62915b3a3
[TEST]#2 Fixed the RASD/07_parent_disk_pool.py
Patch 2:
-------
1) Improved the code
Verified with KVM and current sources on F10 and SLES11.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 14b666e2a803 -r fc0ce87139b4 suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py
--- a/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Thu Jul 16 07:28:51 2009 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Mon Jul 20 08:23:38 2009 -0700
@@ -37,7 +37,7 @@
# -PoolID="DiskPool/0"
# -Type=3 [ For Type 1 and 2 as well ]
# -Path="/dev/null"
-# -DevicePath=
+# -DevicePaths=
# -Host="host_sys.domain.com"
# -SourceDirectory="/var/lib/images"
#
@@ -45,13 +45,51 @@
import sys
from sets import Set
+from copy import copy
from CimTest.Globals import logger
from XenKvmLib.const import do_main
from CimTest.ReturnCodes import PASS, FAIL
from XenKvmLib.pool import get_pool_rasds
sup_types = ['KVM', 'Xen', 'XenFV']
-DISKPOOL_REC_LEN = 3
+DISKPOOL_REC_LEN = 7
+
+def init_list():
+ pval = "/dev/null"
+ ptype1 = { 'ResourceType' : 17,
+ 'PoolID' : "DiskPool/0",
+ 'Type' : 1L, 'DevicePaths': None,
+ 'Host' : None, 'SourceDirectory': None,
+ 'Path' : pval }
+
+ ptype2 = ptype1.copy()
+ ptype2['Type'] = 2L
+ ptype2['DevicePaths'] = [u'/dev/sda100']
+
+ ptype3 = ptype1.copy()
+ ptype3['Type'] = 3L
+ ptype3['Host'] = u'host_sys.domain.com'
+ ptype3['SourceDirectory'] = u'/var/lib/images'
+
+ ptype4 = ptype1.copy()
+ ptype4['Type'] = 4L
+ ptype4['DevicePaths'] = [u'/dev/VolGroup00/LogVol100']
+
+ ptype5 = ptype1.copy()
+ ptype5['Type'] = 5L
+ ptype5['DevicePaths'] = [u'iscsi-target']
+ ptype3['Host'] = u'host_sys.domain.com'
+
+ ptype6 = ptype1.copy()
+ ptype6['Type'] = 6L
+
+ ptype7 = ptype1.copy()
+ ptype7['Type'] = 7L
+ ptype7['Path'] = '/dev/disk/by-id'
+
+ exp_t_dp_h_sdir_path = [ ptype1, ptype2, ptype3, ptype4,
+ ptype5, ptype6, ptype7 ]
+ return exp_t_dp_h_sdir_path
def get_rec(diskpool_rasd, inst_id='Default'):
recs = []
@@ -70,16 +108,9 @@
if status != PASS:
return status
inst_list = [ 'Default', 'Minimum', 'Maximum', 'Increment' ]
- n_rec_val = { 'ResourceType' : 17,
- 'PoolID' : "DiskPool/0",
- 'Path' : "/dev/null",
- }
- exp_type_path_host_dir = [('1', 'None', 'None', 'None'),
- ('2', '/dev/sda100', 'None', 'None'),
- ('3', 'None', 'host_sys.domain.com',
- '/var/lib/images')]
-
-
+
+ exp_t_dp_h_sdir_path = init_list()
+
for inst_type in inst_list:
logger.info("Verifying '%s' records", inst_type)
@@ -89,23 +120,30 @@
raise Exception("Got %s recs instead of %s" %(len(n_rec),
DISKPOOL_REC_LEN))
- res_type_path_host_dir = []
for rec in n_rec:
- l = (str(rec['Type']), str(rec['DevicePath']),
- str(rec['Host']), str(rec['SourceDirectory']))
- res_type_path_host_dir.append(l)
+ found = False
+ for item in exp_t_dp_h_sdir_path:
+ if rec['Type'] == item['Type']:
+ found = True
+ for key, val in item.iteritems():
+ exp_val = val
+ res_val = rec[key]
+ if type(val).__name__ == 'list':
+ cmp_exp = (len(Set(res_val) - \
+ Set(exp_val)) != 0)
+ elif type(val).__name__ != 'NoneType':
+ cmp_exp = (exp_val != res_val)
+ elif type(val).__name__ == 'NoneType':
+ continue
- if len(Set(exp_type_path_host_dir) & Set(res_type_path_host_dir)) \
- != DISKPOOL_REC_LEN :
- raise Exception("Mismatching values, \nGot %s,\nExpected %s"\
- %(exp_type_path_host_dir,
- res_type_path_host_dir))
+ if cmp_exp:
+ raise Exception("Mismatching values, "\
+ "\nGot %s, \nExpected %s"\
+ % (res_val, exp_val))
- for key in n_rec_val.keys():
- for rec in n_rec:
- if n_rec_val[key] != rec[key]:
- raise Exception("'%s' Mismatch, Got %s, Expected %s" \
- % (key, rec[key], n_rec_val[key]))
+ if found == False:
+ raise Exception("Failed to get records for pooltype" \
+ " %s" % rec['Type'])
except Exception, details:
logger.error("Exception details: %s", details)
15 years, 1 month
Libvirt-cim postinsatllation fail
by Sunil Botre
Hi
I want to install libvirt-cim-0.5 on Fedora 7 hypervisor machine
I have also installed Pegasus2.9 and libvirt-0.4.0-4.fc7 and libvirt-devel-0.4.0-4.fc7 package
But while Installing libvirt-cim-0.5 step of postinstallation fails.
#Sudo Make postinstall
sh provider-register.sh -v -t pegasus -n root/virt -r schema/ComputerSystem.registration schema/LogicalDisk.registration schema/NetworkPort.registration schema/Memory.registration schema/Processor.registration schema/SystemDevice.registration schema/VSSD.registration schema/HostSystem.registration schema/HostedDependency.registration schema/VirtualSystemManagementService.registration schema/VirtualSystemManagementCapabilities.registration schema/EnabledLogicalElementCapabilities.registration schema/AllocationCapabilities.registration schema/SettingsDefineCapabilities.registration schema/MemoryPool.registration schema/ElementCapabilities.registration schema/ProcessorPool.registration schema/DiskPool.registration schema/HostedResourcePool.registration schema/ComputerSystemIndication.registration schema/ComputerSystemMigrationIndication.registration schema/ResourceAllocationSettingData.registration schema/ResourcePoolConfigurationService.registration schema/ResourcePoolConfigurationCapabilities.registration schema/VSSDComponent.registration schema/SettingsDefineState.registration schema/NetPool.registration schema/ResourceAllocationFromPool.registration schema/ElementAllocatedFromPool.registration schema/HostedService.registration schema/ElementSettingData.registration schema/VSMigrationCapabilities.registration schema/VSMigrationService.registration schema/ElementConformsToProfile.registration schema/VSMigrationSettingData.registration schema/VirtualSystemSnapshotService.registration schema/VirtualSystemSnapshotServiceCapabilities.registration -m schema/ComputerSystem.mof schema/LogicalDisk.mof schema/NetworkPort.mof schema/Memory.mof schema/Processor.mof schema/SystemDevice.mof schema/VSSD.mof schema/HostSystem.mof schema/HostedDependency.mof schema/VirtualSystemManagementService.mof schema/VirtualSystemManagementCapabilities.mof schema/EnabledLogicalElementCapabilities.mof schema/AllocationCapabilities.mof schema/SettingsDefineCapabilities.mof schema/MemoryPool.mof schema/ElementCapabilities.mof schema/ProcessorPool.mof schema/DiskPool.mof schema/HostedResourcePool.mof schema/RegisteredProfile.mof schema/ElementConformsToProfile.mof schema/ComputerSystemIndication.mof schema/ComputerSystemMigrationIndication.mof schema/ResourceAllocationSettingData.mof schema/ResourcePoolConfigurationService.mof schema/ResourcePoolConfigurationCapabilities.mof schema/VSSDComponent.mof schema/SettingsDefineState.mof schema/NetPool.mof schema/ResourceAllocationFromPool.mof schema/ElementAllocatedFromPool.mof schema/HostedService.mof schema/ElementSettingData.mof schema/VSMigrationCapabilities.mof schema/VSMigrationService.mof schema/VSMigrationSettingData.mof schema/VirtualSystemSnapshotService.mof schema/VirtualSystemSnapshotServiceCapabilities.mof
Processing provider modules: Virt_AllocationCapabilities Virt_ComputerSystem Virt_ComputerSystemIndication Virt_ComputerSystemMigrationIndication Virt_Device Virt_DevicePool Virt_ElementAllocatedFromPool Virt_ElementCapabilities Virt_ElementConformsToProfile Virt_ElementSettingData Virt_EnabledLogicalElementCapabilities Virt_HostedDependency Virt_HostedResourcePool Virt_HostedService Virt_HostSystem Virt_RASD Virt_ResourceAllocationFromPool Virt_ResourcePoolConfigurationCapabilities Virt_ResourcePoolConfigurationService Virt_SettingsDefineCapabilities Virt_SettingsDefineState Virt_SystemDevice Virt_VirtualSystemManagementCapabilities Virt_VirtualSystemManagementService Virt_VirtualSystemSnapshotService Virt_VirtualSystemSnapshotServiceCapabilities Virt_VSMigrationCapabilities Virt_VSMigrationService Virt_VSMigrationSettingData Virt_VSSD Virt_VSSDComponent
Registering providers with active cimserver
Parsing error: parse error: Error adding class Xen_VirtualSystemSnapshotServiceCapabilities to the repository: CIM_ERR_INVALID_SUPERCLASS: CIM_VirtualSystemSnapshotServiceCapabilities
make: *** [postinstall] Error 250
Please let me know if any suggestions.
Regards,
Sunil Botre| Software Engineer | Persistent Systems Limited
sunil_botre(a)persistent.co.in<mailto:sunil_botre@persistent.co.in> | Cell: +91 9604854768| Tel: +91 (20) 3023 6653
Persistent Systems - Innovation in software product design, development and delivery - www.persistentsys.com<http://www.persistentsys.com/>
DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Ltd. does not accept any liability for virus infected mails.
15 years, 1 month
[PATCH] [TEST] #2 Updates to VSMS 19_definenetwork_ers.py
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1247619180 25200
# Node ID 69e3ab27d1a8b0e50afa395f72a5c0cdc211c735
# Parent 031cff68b4d3ab0fc1ed9b34127b8f4e27cb27c9
[TEST] #2 Updates to VSMS 19_definenetwork_ers.py
Skip bridge type networks with provider versions that don't support setting the
bridge type via the providers.
Set different expected error messages for Xen guests, and for older versions of
libvirt.
Updates:
-Improve code reuse - in the if Xen / XenFV block
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r 031cff68b4d3 -r 69e3ab27d1a8 suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Fri Jul 17 12:07:44 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Tue Jul 14 17:53:00 2009 -0700
@@ -31,8 +31,9 @@
from XenKvmLib import vxml
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import default_network_name, do_main
+from XenKvmLib.const import default_network_name, do_main, get_provider_version
from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
+from XenKvmLib.xm_virt_util import virsh_version
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'brgtest_domain'
@@ -40,6 +41,8 @@
npool_name = default_network_name + str(random.randint(1, 100))
brg_name = "br" + str(random.randint(1, 100))
+bridge_support_rev = 900
+
exp_rc = CIM_ERR_FAILED
def verify_error(exp_rc, exp_desc,cxml):
@@ -50,7 +53,11 @@
def main():
options = main.options
- nettypes = ['bridge','network']
+ nettypes = ['network']
+
+ rev, changeset = get_provider_version(options.virt, options.ip)
+ if rev >= bridge_support_rev:
+ nettypes.append('bridge')
expected_values = {
"invalid" : {'bridge' : 'internal error Failed to add tap interface',
@@ -61,6 +68,27 @@
'network' : "Valid param "}
}
+ if options.virt == "Xen" or options.virt == "XenFV":
+ libvirt_version = virsh_version(options.ip, options.virt)
+ if libvirt_version <= "0.3.3":
+ inv_empty_network = "no network with matching name"
+
+ inv_br_str = "POST operation failed: (xend.err 'Device 0 (vif) " + \
+ "could not be connected. Could not find bridge " + \
+ "device invalid')"
+
+ else:
+ inv_empty_network = "Network not found"
+
+ inv_br_str = "POST operation failed: xend_post: error from xen " + \
+ "daemon: (xend.err 'Device 0 (vif) could not be " + \
+ "connected. Could not find bridge device invalid')"
+
+ expected_values['invalid']['network'] = inv_empty_network
+ expected_values['empty']['network'] = inv_empty_network
+
+ expected_values['invalid']['bridge'] = inv_br_str
+
tc_scen = {
'invalid' : 'invalid',
'empty' : '',
15 years, 1 month
[PATCH] [TEST] Fixed the RASD/07_parent_disk_pool.py
by Deepti B. Kalakeri
# HG changeset patch
# User Deepti B.Kalakeri <deeptik(a)linux.vnet.ibm.com>
# Date 1247831194 25200
# Node ID d78ebff2b762c75fec14de6bb4a012146ec4b86b
# Parent 14b666e2a803048c1ce4e71b550a49c62915b3a3
[TEST] Fixed the RASD/07_parent_disk_pool.py
Verified with KVM and current sources on F10 and SLES11.
Signed-off-by: Deepti B. Kalakeri <deeptik(a)linux.vnet.ibm.com>
diff -r 14b666e2a803 -r d78ebff2b762 suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py
--- a/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Thu Jul 16 07:28:51 2009 -0700
+++ b/suites/libvirt-cim/cimtest/RASD/07_parent_disk_pool.py Fri Jul 17 04:46:34 2009 -0700
@@ -51,7 +51,7 @@
from XenKvmLib.pool import get_pool_rasds
sup_types = ['KVM', 'Xen', 'XenFV']
-DISKPOOL_REC_LEN = 3
+DISKPOOL_REC_LEN = 7
def get_rec(diskpool_rasd, inst_id='Default'):
recs = []
@@ -72,14 +72,21 @@
inst_list = [ 'Default', 'Minimum', 'Maximum', 'Increment' ]
n_rec_val = { 'ResourceType' : 17,
'PoolID' : "DiskPool/0",
- 'Path' : "/dev/null",
}
- exp_type_path_host_dir = [('1', 'None', 'None', 'None'),
- ('2', '/dev/sda100', 'None', 'None'),
- ('3', 'None', 'host_sys.domain.com',
- '/var/lib/images')]
-
-
+
+ pval = "/dev/null"
+ exp_t_dp_h_sdir_path = sorted([(1L, None, None, None, pval),
+ (2L, [u'/dev/sda100'], None, None, pval),
+ (3L, None, u'host_sys.domain.com',
+ u'/var/lib/images', pval),
+ (4L, [u'/dev/VolGroup00/LogVol100'],
+ None, None, pval),
+ (5L, [u'iscsi-target'],
+ u'host_sys.domain.com', None, pval),
+ (6L, None, None, None, pval),
+ (7L, None, None, None,
+ "/dev/disk/by-id")])
+
for inst_type in inst_list:
logger.info("Verifying '%s' records", inst_type)
@@ -89,17 +96,30 @@
raise Exception("Got %s recs instead of %s" %(len(n_rec),
DISKPOOL_REC_LEN))
- res_type_path_host_dir = []
+ res_t_dp_h_sdir_path = []
for rec in n_rec:
- l = (str(rec['Type']), str(rec['DevicePath']),
- str(rec['Host']), str(rec['SourceDirectory']))
- res_type_path_host_dir.append(l)
+ l = ((rec['Type']), (rec['DevicePaths']),
+ (rec['Host']), (rec['SourceDirectory']),
+ (rec['Path']))
+ res_t_dp_h_sdir_path.append(l)
+ res_t_dp_h_sdir_path = sorted(res_t_dp_h_sdir_path)
- if len(Set(exp_type_path_host_dir) & Set(res_type_path_host_dir)) \
- != DISKPOOL_REC_LEN :
- raise Exception("Mismatching values, \nGot %s,\nExpected %s"\
- %(exp_type_path_host_dir,
- res_type_path_host_dir))
+ for exp_item in exp_t_dp_h_sdir_path:
+ i = 0
+ for j in range(0, len(exp_item)):
+ exp_val = exp_t_dp_h_sdir_path[i][j]
+ res_val = res_t_dp_h_sdir_path[i][j]
+ if type(list).__name__ == 'list':
+ cmp_exp = (len(Set(res_val) - Set(exp_val)) != 0)
+ elif type(list).__name__ != 'NoneType':
+ cmp_exp = (exp_val != res_val)
+ elif type(list).__name__ == 'NoneType':
+ continue
+
+ if cmp_exp:
+ raise Exception("Mismatching values, \nGot %s,\nExpected %s"\
+ %(exp_val, res_val))
+ i += 1
for key in n_rec_val.keys():
for rec in n_rec:
15 years, 1 month
[PATCH] [TEST] Updates to VSMS 19_definenetwork_ers.py
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1247619180 25200
# Node ID 2daf5abc8b907906380fa9b911a0711d23aaa19f
# Parent b2eb25caa1c8b2736418c39e448b6f228fc153bc
[TEST] Updates to VSMS 19_definenetwork_ers.py
Skip bridge type networks with provider versions that don't support setting the
bridge type via the providers.
Set different expected error messages for Xen guests, and for older versions of
libvirt.
Signed-off-by: Kaitlin Rupert <karupert(a)us.ibm.com>
diff -r b2eb25caa1c8 -r 2daf5abc8b90 suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py
--- a/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Tue Jul 14 16:14:07 2009 -0700
+++ b/suites/libvirt-cim/cimtest/VirtualSystemManagementService/19_definenetwork_ers.py Tue Jul 14 17:53:00 2009 -0700
@@ -31,8 +31,9 @@
from XenKvmLib import vxml
from CimTest.Globals import logger
from CimTest.ReturnCodes import FAIL, PASS
-from XenKvmLib.const import default_network_name, do_main
+from XenKvmLib.const import default_network_name, do_main, get_provider_version
from XenKvmLib.common_util import create_netpool_conf, destroy_netpool
+from XenKvmLib.xm_virt_util import virsh_version
sup_types = ['Xen', 'KVM', 'XenFV']
default_dom = 'brgtest_domain'
@@ -40,6 +41,8 @@
npool_name = default_network_name + str(random.randint(1, 100))
brg_name = "br" + str(random.randint(1, 100))
+bridge_support_rev = 900
+
exp_rc = CIM_ERR_FAILED
def verify_error(exp_rc, exp_desc,cxml):
@@ -50,7 +53,11 @@
def main():
options = main.options
- nettypes = ['bridge','network']
+ nettypes = ['network']
+
+ rev, changeset = get_provider_version(options.virt, options.ip)
+ if rev >= bridge_support_rev:
+ nettypes.append('bridge')
expected_values = {
"invalid" : {'bridge' : 'internal error Failed to add tap interface',
@@ -61,6 +68,27 @@
'network' : "Valid param "}
}
+ if options.virt == "Xen" or options.virt == "XenFV":
+ libvirt_version = virsh_version(options.ip, options.virt)
+ if libvirt_version <= "0.3.3":
+ expected_values['empty']['network'] = "no network with matching name"
+ expected_values['invalid']['network'] = "no network with matching name"
+
+ inv_br_str = "POST operation failed: (xend.err 'Device 0 (vif) " + \
+ "could not be connected. Could not find bridge device " + \
+ "invalid')"
+
+ expected_values['invalid']['bridge'] = inv_br_str
+
+ else:
+ expected_values['empty']['network'] = "Network not found"
+ expected_values['invalid']['network'] = "Network not found"
+
+ inv_br_str = "POST operation failed: xend_post: error from xen " + \
+ "daemon: (xend.err 'Device 0 (vif) could not be " + \
+ "connected. Could not find bridge device invalid')"
+ expected_values['invalid']['bridge'] = inv_br_str
+
tc_scen = {
'invalid' : 'invalid',
'empty' : '',
15 years, 1 month
[PATCH] Fix segfault VSMS provider when passing an incorrect namespace
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1247770802 10800
# Node ID 7f2654e5776c0528dfb69a80f3b626dca47464ce
# Parent 39a2f25cda5d49863f319236c3edb5272f3602ba
Fix segfault VSMS provider when passing an incorrect namespace
Checks if the vssd_to_domain function in Virt_VirtualSystemManagementService.c can get the object path from the CMPIInstance parameter.
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 39a2f25cda5d -r 7f2654e5776c src/Virt_VirtualSystemManagementService.c
--- a/src/Virt_VirtualSystemManagementService.c Thu Jul 16 15:28:11 2009 -0300
+++ b/src/Virt_VirtualSystemManagementService.c Thu Jul 16 16:00:02 2009 -0300
@@ -388,8 +388,16 @@
const char *cn;
char *pfx = NULL;
bool fullvirt;
+ CMPIObjectPath *opathp = NULL;
- cn = CLASSNAME(CMGetObjectPath(inst, NULL));
+
+ opathp = CMGetObjectPath(inst, NULL);
+ if (opathp == NULL) {
+ CU_DEBUG("Got a null object path");
+ return 0;
+ }
+
+ cn = CLASSNAME(opathp);
pfx = class_prefix_name(cn);
if (pfx == NULL) {
CU_DEBUG("Unknown prefix for class: %s", cn);
15 years, 1 month
Test Run Summary (Jul 16 2009): KVM on SUSE Linux Enterprise Server 11 (i586) with sfcb
by Deepti B Kalakeri
=================================================
Test Run Summary (Jul 16 2009): KVM on SUSE Linux Enterprise Server 11 (i586) with sfcb
=================================================
Distro: SUSE Linux Enterprise Server 11 (i586)
Kernel: 2.6.27.19-5-pae
libvirt: 0.4.6
Hypervisor: QEMU 0.9.1
CIMOM: sfcb sfcbd 1.3.2
Libvirt-cim revision: 929
Libvirt-cim changeset: 1f48bb4249af+
Cimtest revision: 730
Cimtest changeset: ec760853195b
=================================================
FAIL : 8
XFAIL : 4
SKIP : 6
PASS : 143
-----------------
Total : 161
=================================================
FAIL Test Summary:
ComputerSystemIndication - 01_created_indication.py: FAIL
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: FAIL
RASD - 07_parent_disk_pool.py: FAIL
ResourcePoolConfigurationService - 07_DeleteResourcePool.py: FAIL
VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
VirtualSystemMigrationService - 06_remote_live_migration.py: FAIL
VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL
=================================================
XFAIL Test Summary:
ComputerSystem - 32_start_reboot.py: XFAIL
ComputerSystem - 33_suspend_reboot.py: XFAIL
VirtualSystemManagementService - 09_procrasd_persist.py: XFAIL
VirtualSystemManagementService - 16_removeresource.py: XFAIL
=================================================
SKIP Test Summary:
ComputerSystem - 02_nosystems.py: SKIP
LogicalDisk - 02_nodevs.py: SKIP
VSSD - 02_bootldr.py: SKIP
VirtualSystemMigrationService - 01_migratable_host.py: SKIP
VirtualSystemMigrationService - 02_host_migrate_type.py: SKIP
VirtualSystemMigrationService - 05_migratable_host_errs.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 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): 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 State not supported with return code 7
ERROR - Exception: Unable Suspend dom 'test_domain'
InvokeMethod(RequestStateChange): State not supported
Bug:<00012>
--------------------------------------------------------------------
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: FAIL
ERROR - Waited too long for define indication
ERROR - Waited too long for start indication
ERROR - Waited too long for destroy indication
--------------------------------------------------------------------
ComputerSystemMigrationJobIndication - 01_csmig_ind_for_offline_mig.py: FAIL
ERROR - Failed to create Virtual Network 'cimtest-networkpool'
ERROR - Exception details :Unable to create network pool 'cimtest-networkpool' on 'elm3b25.beaverton.ibm.com'
ERROR - Exception: Unable to generate indication
--------------------------------------------------------------------
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
--------------------------------------------------------------------
HostSystem - 01_enum.py: PASS
--------------------------------------------------------------------
HostSystem - 02_hostsystem_to_rasd.py: PASS
--------------------------------------------------------------------
HostSystem - 03_hs_to_settdefcap.py: PASS
--------------------------------------------------------------------
HostSystem - 04_hs_to_EAPF.py: PASS
--------------------------------------------------------------------
HostSystem - 05_hs_gi_errs.py: PASS
--------------------------------------------------------------------
HostSystem - 06_hs_to_vsms.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
--------------------------------------------------------------------
KVMRedirectionSAP - 01_enum_KVMredSAP.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
--------------------------------------------------------------------
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: FAIL
07_parent_disk_pool.py:47: DeprecationWarning: the sets module is deprecated
from sets import Set
ERROR - Exception details: Got 7 recs instead of 3
--------------------------------------------------------------------
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: FAIL
ERROR - Exception in create_pool()
ERROR - Exception details: (1, u'*** Provider Virt_ResourcePoolConfigurationService(9436) exiting due to a SIGSEGV signal ')
ERROR - Error in networkpool creation
InvokeMethod(CreateChildResourcePool): *** Provider Virt_ResourcePoolConfigurationService(9436) exiting due to a SIGSEGV signal
--------------------------------------------------------------------
ResourcePoolConfigurationService - 08_CreateDiskResourcePool.py: PASS
--------------------------------------------------------------------
ResourcePoolConfigurationService - 09_DeleteDiskPool.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: PASS
--------------------------------------------------------------------
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
--------------------------------------------------------------------
VSSD - 01_enum.py: PASS
--------------------------------------------------------------------
VSSD - 02_bootldr.py: SKIP
--------------------------------------------------------------------
VSSD - 03_vssd_gi_errs.py: PASS
--------------------------------------------------------------------
VSSD - 04_vssd_to_rasd.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: XFAIL
--------------------------------------------------------------------
VirtualSystemManagementService - 10_hv_version.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 11_define_memrasdunits.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 12_referenced_config.py: PASS
--------------------------------------------------------------------
VirtualSystemManagementService - 13_refconfig_additional_devs.py: FAIL
ERROR - Got CIM error ResourceSettings Error: Conflicting MAC Addresses with return code 1
ERROR - Unable define domain rstest_domain2
ERROR - Unable to define rstest_domain2
InvokeMethod(DefineSystem): ResourceSettings Error: Conflicting MAC Addresses
--------------------------------------------------------------------
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
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
--------------------------------------------------------------------
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: FAIL
ERROR - Failed to create Virtual Network 'cimtest-networkpool'
ERROR - Exception details :Unable to create network pool 'cimtest-networkpool' on 'elm3b25.beaverton.ibm.com'
--------------------------------------------------------------------
VirtualSystemMigrationService - 07_remote_offline_migration.py: FAIL
ERROR - Failed to create Virtual Network 'cimtest-networkpool'
ERROR - Exception details :Unable to create network pool 'cimtest-networkpool' on 'elm3b25.beaverton.ibm.com'
--------------------------------------------------------------------
VirtualSystemMigrationService - 08_remote_restart_resume_migration.py: FAIL
ERROR - Failed to create Virtual Network 'cimtest-networkpool'
ERROR - Exception details is :Unable to create network pool 'cimtest-networkpool' on 'elm3b25.beaverton.ibm.com'
ERROR - Restart migration -1
ERROR - Resume migration -1
--------------------------------------------------------------------
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
--------------------------------------------------------------------
--
Thanks and Regards,
Deepti B. Kalakeri
IBM Linux Technology Center
deeptik(a)linux.vnet.ibm.com
15 years, 1 month