[PATCH] [TEST] Clean up CS 01 - import necessary items from Globals
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259878320 28800
# Node ID e9de3634a25633777e40bd80cc400a07ed42c6e1
# Parent 60eb89c3ac9db80ef89401c48a9711e59f12b4bc
[TEST] Clean up CS 01 - import necessary items from Globals
No need to import Globals directly. Also, clean up formatting of error
messages.
diff -r 60eb89c3ac9d -r d3e61b6dde50 suites/libvirt-cim/cimtest/ComputerSystem/0
1_enum.py
diff -r 60eb89c3ac9d -r e9de3634a256 suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py
--- a/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Tue Dec 01 15:08:50 2009 -0800
+++ b/suites/libvirt-cim/cimtest/ComputerSystem/01_enum.py Thu Dec 03 14:12:00 2009 -0800
@@ -28,7 +28,7 @@
from XenKvmLib.xm_virt_util import domain_list
from XenKvmLib.classes import get_typed_class
from VirtLib import utils
-from CimTest import Globals
+from CimTest.Globals import logger, CIM_ERROR_ENUMERATE
from CimTest.ReturnCodes import PASS, FAIL
SUPPORTED_TYPES = ['Xen', 'KVM', 'XenFV', 'LXC']
@@ -48,20 +48,20 @@
idx = live_cs.index(name)
del live_cs[idx]
except ValueError, detail:
- Globals.logger.error("Provider reports system `%s', \
-but virsh does not", name)
+ logger.error("Provider reports system `%s', but virsh does not",
+ name)
status = FAIL
for system in live_cs:
- Globals.logger.error("Provider does not report system `%s', \
-but virsh does", system)
+ logger.error("Provider does not report system `%s', but virsh does",
+ system)
status = FAIL
except IndexError, detail:
- Globals.logger.error("Exception: %s", detail)
+ logger.error("Exception: %s", detail)
except Exception, detail:
- Globals.logger.error(Globals.CIM_ERROR_ENUMERATE, 'ComputerSystem')
- Globals.logger.error("Exception: %s", detail)
+ logger.error(Globals.CIM_ERROR_ENUMERATE, 'ComputerSystem')
+ logger.error("Exception: %s", detail)
return status
15 years
[PATCH] Remove duplicate code in _netpool_member_of()
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259893229 28800
# Node ID 67abfd38dce38599a70213327df509bd1f967d03
# Parent 57490fca41e5b1f2ecc893bf22771a6c718df161
Remove duplicate code in _netpool_member_of()
diff -r 57490fca41e5 -r 67abfd38dce3 src/Virt_DevicePool.c
--- a/src/Virt_DevicePool.c Thu Dec 03 18:20:28 2009 -0800
+++ b/src/Virt_DevicePool.c Thu Dec 03 18:20:29 2009 -0800
@@ -490,12 +490,6 @@
goto out;
}
- if (ndev->source == NULL) {
- CU_DEBUG("Unable to determine pool since no network "
- "source defined");
- goto out;
- }
-
if (STREQ(ndev->type, "bridge"))
net = bridge_to_network(conn, ndev->source);
else if (STREQ(ndev->type, "network"))
15 years
[PATCH] [TEST](#3) VirtCIM init for the LXC virt must also receive pae, acpi and apic param
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1259986929 7200
# Node ID 683a8a57d54506032a659bdb9178b7558827ffde
# Parent 9ead5a3d9abf030286ace6137698725edb79ec94
[TEST](#3) VirtCIM init for the LXC virt must also receive pae, acpi and apic param
#2:
- Fixed code style
#3:
- Rebased code
- Fixed additional code style
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 9ead5a3d9abf -r 683a8a57d545 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Fri Dec 04 10:35:09 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Sat Dec 05 02:22:09 2009 -0200
@@ -1005,9 +1005,12 @@
keymap="en-us",
irstype="mouse", btype="usb", vnc_passwd=None):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
- VirtCIM.__init__(self, 'LXC', test_dom, uuid, const.LXC_default_mp,
- const.LXC_default_source, ntype, net_name, mac, vcpus,
- mem, const.default_mallocunits, None, grstype,
+ # pae, acpi and apic parameters doesn't make sense here, so we
+ # statically set them to False (a.k.a. ignore them)
+ VirtCIM.__init__(self, 'LXC', test_dom, uuid, False, False, False,
+ const.LXC_default_mp, const.LXC_default_source,
+ ntype, net_name, mac, vcpus, mem,
+ const.default_mallocunits, None, grstype,
address, is_ipv6_only, port_num, keymap, irstype,
btype, vnc_passwd)
self._os(const.LXC_init_path)
15 years
[PATCH] Xen version 3.3.0 doesn't accept system in the migration URI
by Kaitlin Rupert
# HG changeset patch
# User Kaitlin Rupert <karupert(a)us.ibm.com>
# Date 1259882291 28800
# Node ID a8972b732291267c0d695709f311f76dbcc015ca
# Parent 282660c5e43aba6b284a9909144b9df14dc95f5b
Xen version 3.3.0 doesn't accept system in the migration URI
This change has been tested with Xen version 3.1.0. Also tests against KVM
to check for regressions.
diff -r 282660c5e43a -r a8972b732291 src/Virt_VSMigrationService.c
--- a/src/Virt_VSMigrationService.c Wed Dec 02 12:48:47 2009 -0800
+++ b/src/Virt_VSMigrationService.c Thu Dec 03 15:18:11 2009 -0800
@@ -186,7 +186,12 @@
goto out;
}
- rc = asprintf(&uri, "%s+%s://%s/system", prefix, tport, dest);
+ if (STREQC(prefix, "xen"))
+ rc = asprintf(&uri, "%s+%s://%s", prefix, tport, dest);
+ else {
+ rc = asprintf(&uri, "%s+%s://%s/system", prefix, tport, dest);
+ }
+
if (rc == -1) {
uri = NULL;
goto out;
15 years
[PATCH] [TEST] VirtCIM init for the LXC virt must also receive pae, acpi and apic param
by Richard Maciel
# HG changeset patch
# User Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
# Date 1259704363 7200
# Node ID 1c723b6b44a4a49f01395dc9f30249824e44b9ca
# Parent 9445f602d8a8705743254f85ef426d284ab382d4
[TEST] VirtCIM init for the LXC virt must also receive pae, acpi and apic param
Signed-off-by: Richard Maciel <rmaciel(a)linux.vnet.ibm.com>
diff -r 9445f602d8a8 -r 1c723b6b44a4 suites/libvirt-cim/lib/XenKvmLib/vxml.py
--- a/suites/libvirt-cim/lib/XenKvmLib/vxml.py Wed Nov 18 13:50:16 2009 -0800
+++ b/suites/libvirt-cim/lib/XenKvmLib/vxml.py Tue Dec 01 19:52:43 2009 -0200
@@ -996,10 +996,13 @@
address="127.0.0.1", port_num='-1', keymap="en-us",
irstype="mouse", btype="usb", vnc_passwd=None):
VirtXML.__init__(self, 'lxc', test_dom, set_uuid(), mem, vcpus)
- VirtCIM.__init__(self, 'LXC', test_dom, uuid, const.LXC_default_mp,
- const.LXC_default_source, ntype, net_name, mac, vcpus,
- mem, const.default_mallocunits, None, grstype,
- address, port_num, keymap, irstype, btype, vnc_passwd)
+ # pae, acpi and apic parameters doesn't make sense here, so we statically set
+ # them to False (a.k.a. ignore them)
+ VirtCIM.__init__(self, 'LXC', test_dom, uuid, False, False, False,
+ const.LXC_default_mp, const.LXC_default_source, ntype,
+ net_name, mac, vcpus, mem, const.default_mallocunits,
+ None, grstype, address, port_num, keymap, irstype, btype,
+ vnc_passwd)
self._os(const.LXC_init_path)
self._devices(const.LXC_default_emulator, mac, ntype, net_name, const.LXC_default_tty)
self.create_lxc_file(CIM_IP, const.LXC_init_path)
15 years