virt-manager-1.3.2/ 0000775 0001751 0001751 00000000000 12637033400 015571 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/PKG-INFO 0000664 0001751 0001751 00000000342 12637033400 016665 0 ustar crobinso crobinso 0000000 0000000 Metadata-Version: 1.0
Name: virt-manager
Version: 1.3.2
Summary: UNKNOWN
Home-page: http://virt-manager.org
Author: Cole Robinson
Author-email: virt-tools-list@redhat.com
License: GPLv2+
Description: UNKNOWN
Platform: UNKNOWN
virt-manager-1.3.2/tests/ 0000775 0001751 0001751 00000000000 12637033400 016733 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/xmlparse.py 0000664 0001751 0001751 00000135272 12627132763 021165 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import glob
import traceback
import unittest
import virtinst
from tests import utils
conn = utils.open_testdriver()
kvmconn = utils.open_kvm()
def sanitize_file_xml(xml):
# s/"/'/g from generated XML, matches what libxml dumps out
# This won't work all the time, but should be good enough for testing
return xml.replace("'", "\"")
class XMLParseTest(unittest.TestCase):
def _roundtrip_compare(self, filename):
expectXML = sanitize_file_xml(file(filename).read())
guest = virtinst.Guest(conn, parsexml=expectXML)
actualXML = guest.get_xml_config()
utils.diff_compare(actualXML, expect_out=expectXML)
def _alter_compare(self, actualXML, outfile, support_check=None):
utils.diff_compare(actualXML, outfile)
if (support_check and not conn.check_support(support_check)):
return
utils.test_create(conn, actualXML)
def testRoundTrip(self):
"""
Make sure parsing doesn't output different XML
"""
exclude = ["misc-xml-escaping.xml"]
failed = False
error = ""
for f in glob.glob("tests/xmlconfig-xml/*.xml"):
if [e for e in exclude if f.endswith(e)]:
continue
try:
self._roundtrip_compare(f)
except Exception:
failed = True
error += "%s:\n%s\n" % (f, "".join(traceback.format_exc()))
if failed:
raise AssertionError("Roundtrip parse tests failed:\n%s" % error)
def _set_and_check(self, obj, param, initval, *args):
"""
Check expected initial value obj.param == initval, then
set newval, and make sure it is returned properly
"""
curval = getattr(obj, param)
self.assertEquals(initval, curval)
for newval in args:
setattr(obj, param, newval)
curval = getattr(obj, param)
self.assertEquals(newval, curval)
def _make_checker(self, obj):
def check(name, initval, *args):
return self._set_and_check(obj, name, initval, *args)
return check
def _get_test_content(self, basename, kvm=False):
infile = "tests/xmlparse-xml/%s-in.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
guest = virtinst.Guest(kvm and kvmconn or conn,
parsexml=file(infile).read())
return guest, outfile
def testAlterGuest(self):
"""
Test changing Guest() parameters after parsing
"""
guest, outfile = self._get_test_content("change-guest")
check = self._make_checker(guest)
check("name", "TestGuest", "change_name")
check("id", None, 1234)
check("description", None, "Hey desc changed&")
check("title", None, "Hey title changed!")
check("vcpus", 5, 12)
check("curvcpus", None, 10)
check("cpuset", "1-3", "1-8,^6", "1-5,15")
check("maxmemory", 409600, 512000)
check("memory", 204800, 1024000)
check("maxmemory", 1024000, 2048000)
check("uuid", "12345678-1234-1234-1234-123456789012",
"11111111-2222-3333-4444-555555555555")
check("emulator", "/usr/lib/xen/bin/qemu-dm", "/usr/binnnn/fooemu")
check("type", "kvm", "test")
check("bootloader", None, "pygrub")
check("on_poweroff", "destroy", "restart")
check("on_reboot", "restart", "destroy")
check("on_crash", "restart", "destroy")
check("on_lockfailure", "poweroff", "restart")
check = self._make_checker(guest.clock)
check("offset", "utc", "localtime")
guest.clock.remove_timer(guest.clock.timers[0])
check = self._make_checker(guest.clock.timers[0])
check("name", "pit", "rtc")
check("tickpolicy", "delay", "merge")
timer = guest.clock.add_timer()
check = self._make_checker(timer)
check("name", None, "hpet")
check("present", None, False)
check = self._make_checker(guest.pm)
check("suspend_to_mem", False, True)
check("suspend_to_disk", None, False)
check = self._make_checker(guest.os)
check("os_type", "hvm", "xen")
check("arch", "i686", None)
check("machine", "foobar", "pc-0.11")
check("loader", None, "/foo/loader")
check("init", None, "/sbin/init")
check("bootorder", ["hd"], ["fd"])
check("enable_bootmenu", None, False)
check("useserial", None, True)
check("kernel", None)
check("initrd", None)
check("kernel_args", None)
guest.os.set_initargs_string("foo 'bar baz' frib")
self.assertEqual([i.val for i in guest.os.initargs],
["foo", "bar baz", "frib"])
check = self._make_checker(guest.features)
check("acpi", True, False)
check("apic", True, True)
check("eoi", None, True)
check("pae", False, False)
check("viridian", False, True)
check("hap", False, False)
check("privnet", False, False)
check("hyperv_relaxed", None, True)
check("hyperv_vapic", False, None)
check("hyperv_spinlocks", True, True)
check("hyperv_spinlocks_retries", 12287, 54321)
check("vmport", False, True)
check("kvm_hidden", None, True)
check("pvspinlock", None, True)
check = self._make_checker(guest.cpu)
check("match", "exact", "strict")
check("model", "footest", "qemu64")
check("vendor", "Intel", "qemuvendor")
check("threads", 2, 1)
check("cores", 5, 3)
guest.cpu.sockets = 4.0
check("sockets", 4)
check = self._make_checker(guest.cpu.features[0])
check("name", "x2apic")
check("policy", "force", "disable")
rmfeat = guest.cpu.features[3]
guest.cpu.remove_feature(rmfeat)
self.assertEquals(rmfeat.get_xml_config(),
"""\n""")
guest.cpu.add_feature("addfeature")
check = self._make_checker(guest.numatune)
check("memory_mode", "interleave", "strict", None)
check("memory_nodeset", "1-5,^3,7", "2,4,6")
check = self._make_checker(guest.memtune)
check("hard_limit", None, 1024, 2048)
check("soft_limit", None, 100, 200)
check("swap_hard_limit", None, 300, 400)
check("min_guarantee", None, 400, 500)
check = self._make_checker(guest.blkiotune)
check("weight", None, 100, 200)
check("device_weight", None, 300)
check("device_path", None, "/home/1.img")
check = self._make_checker(guest.idmap)
check("uid_start", None, 0)
check("uid_target", None, 1000)
check("uid_count", None, 10)
check("gid_start", None, 0)
check("gid_target", None, 1000)
check("gid_count", None, 10)
check = self._make_checker(guest.resource)
check("partition", None, "/virtualmachines/production")
check = self._make_checker(guest.get_devices("memballoon")[0])
check("model", "virtio", "none")
check = self._make_checker(guest.memoryBacking)
check("hugepages", False, True)
check("page_size", None, 1)
check("page_unit", None, "G")
check("page_nodeset", None, "1,5-8")
check("nosharepages", False, True)
check("locked", False, True)
self._alter_compare(guest.get_xml_config(), outfile,
support_check=conn.SUPPORT_CONN_VMPORT)
def testSeclabel(self):
guest, outfile = self._get_test_content("change-seclabel")
check = self._make_checker(guest.seclabel[0])
check("type", "static", "none")
check("model", "selinux", "apparmor")
check("label", "foolabel", "barlabel")
check("imagelabel", "imagelabel", "fooimage")
check("baselabel", None, "baselabel")
check("relabel", None, False)
guest.remove_child(guest.seclabel[1])
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterMinimalGuest(self):
guest, outfile = self._get_test_content("change-minimal-guest")
check = self._make_checker(guest.features)
check("acpi", False, True)
check("pae", False)
self.assertTrue(
guest.features.get_xml_config().startswith("\n"""
"""\n""")
d = virtinst.VirtualDisk(conn, parsexml=xml)
self._set_and_check(d, "target", "hda", "hdb")
self.assertEquals(xml.replace("hda", "hdb"), d.get_xml_config())
def testAlterChars(self):
guest, outfile = self._get_test_content("change-chars")
serial1 = guest.get_devices("serial")[0]
serial2 = guest.get_devices("serial")[1]
parallel1 = guest.get_devices("parallel")[0]
parallel2 = guest.get_devices("parallel")[1]
console1 = guest.get_devices("console")[0]
console2 = guest.get_devices("console")[1]
channel1 = guest.get_devices("channel")[0]
channel2 = guest.get_devices("channel")[1]
channel3 = guest.get_devices("channel")[2]
check = self._make_checker(serial1)
check("type", "null", "udp")
check("bind_host", None, "example.com")
check("bind_port", None, 66)
check("source_host", None, "example.com.uk")
check("source_port", None, 77)
check = self._make_checker(serial2)
check("type", "tcp")
check("protocol", "telnet", "raw")
check("source_mode", "bind", "connect")
check = self._make_checker(parallel1)
check("source_mode", "bind")
check("source_path", "/tmp/foobar", None)
check("type", "unix", "pty")
check = self._make_checker(parallel2)
check("type", "udp")
check("bind_port", 1111, 1357)
check("bind_host", "my.bind.host", "my.foo.host")
check("source_port", 2222, 7777)
check("source_host", "my.source.host", "source.foo.host")
check = self._make_checker(console1)
check("type", "pty")
check("target_type", None)
check = self._make_checker(console2)
check("type", "file")
check("source_path", "/tmp/foo.img", None)
check("source_path", None, "/root/foo")
check("target_type", "virtio")
check = self._make_checker(channel1)
check("type", "pty")
check("target_type", "virtio", "bar", "virtio")
check("target_name", "foo.bar.frob", "test.changed")
check = self._make_checker(channel2)
check("type", "unix", "foo", "unix")
check("target_type", "guestfwd")
check("target_address", "1.2.3.4", "5.6.7.8")
check("target_port", 4567, 1199)
check = self._make_checker(channel3)
check("type", "spiceport")
check("source_channel", "org.spice-space.webdav.0", "test.1")
check("target_type", "virtio")
check("target_name", "org.spice-space.webdav.0", "test.2")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterControllers(self):
guest, outfile = self._get_test_content("change-controllers")
dev1 = guest.get_devices("controller")[0]
dev2 = guest.get_devices("controller")[1]
dev3 = guest.get_devices("controller")[2]
dev4 = guest.get_devices("controller")[3]
check = self._make_checker(dev1)
check("type", "ide")
check("index", 3, 1)
check = self._make_checker(dev2)
check("type", "virtio-serial")
check("index", 0, 7)
check("ports", 32, 5)
check("vectors", 17, None)
check = self._make_checker(dev3)
check("type", "scsi")
check("index", 1, 2)
check = self._make_checker(dev4)
check("type", "usb", "foo", "usb")
check("index", 3, 9)
check("model", "ich9-ehci1", "ich9-uhci1")
check("master_startport", 4, 2)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterNics(self):
guest, outfile = self._get_test_content("change-nics")
dev1 = guest.get_devices("interface")[0]
dev2 = guest.get_devices("interface")[1]
dev3 = guest.get_devices("interface")[2]
dev4 = guest.get_devices("interface")[3]
dev5 = guest.get_devices("interface")[4]
check = self._make_checker(dev1)
check("type", "user")
check("model", None, "testmodel")
check("source", None, None,)
check("macaddr", "22:11:11:11:11:11", "AA:AA:AA:AA:AA:AA")
check("filterref", None, "foo")
check = self._make_checker(dev2)
check("source", "default", None)
check("type", "network", "bridge")
check("source", None, "newbr0")
check("model", "e1000", "virtio")
check = self._make_checker(dev3)
check("type", "bridge")
check("source", "foobr0", "newfoo0")
check("macaddr", "22:22:22:22:22:22")
check("target_dev", None, "test1")
check = self._make_checker(dev4)
check("type", "ethernet")
check("source", "eth0", "eth1")
check("target_dev", "nic02", "nic03")
check("target_dev", "nic03", None)
check = self._make_checker(dev5)
check("type", "direct")
check("source", "eth0.1")
check("source_mode", "vepa", "bridge")
check("portgroup", None, "sales")
check("driver_name", None, "vhost")
check("driver_queues", None, 5)
virtualport = dev5.virtualport
check = self._make_checker(virtualport)
check("type", "802.1Qbg", "foo", "802.1Qbg")
check("managerid", 12, 11)
check("typeid", 1193046, 1193047)
check("typeidversion", 1, 2)
check("instanceid", "09b11c53-8b5c-4eeb-8f00-d84eaa0aaa3b",
"09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterInputs(self):
guest, outfile = self._get_test_content("change-inputs")
dev1 = guest.get_devices("input")[0]
dev2 = guest.get_devices("input")[1]
check = self._make_checker(dev1)
check("type", "mouse", "tablet")
check("bus", "ps2", "usb")
check = self._make_checker(dev2)
check("type", "tablet", "mouse")
check("bus", "usb", "xen")
check("bus", "xen", "usb")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterGraphics(self):
guest, outfile = self._get_test_content("change-graphics")
dev1 = guest.get_devices("graphics")[0]
dev2 = guest.get_devices("graphics")[1]
dev3 = guest.get_devices("graphics")[2]
dev4 = guest.get_devices("graphics")[3]
dev5 = guest.get_devices("graphics")[4]
dev6 = guest.get_devices("graphics")[5]
check = self._make_checker(dev1)
check("type", "vnc")
check("passwd", "foobar", "newpass")
check("port", 100, 6000)
check("listen", "0.0.0.0", "1.2.3.4")
check("keymap", None, "en-us")
check = self._make_checker(dev2)
check("type", "vnc")
check("xauth", "/tmp/.Xauthority", "fooauth")
check("display", "1:2", "6:1")
check = self._make_checker(dev3)
check("type", "rdp", "vnc")
check("listen", "1.1.2.3", None)
check = self._make_checker(dev4)
check("type", "vnc")
check("port", -1)
check("socket", "/tmp/foobar", "/var/lib/libvirt/socket/foo")
check = self._make_checker(dev5)
check("autoport", True, False)
check = self._make_checker(dev5.listens[0])
check("type", "network", "foo", "network")
check("network", "Bobsnetwork", "mynewnet")
check = self._make_checker(dev6.listens[0])
check("type", "address")
check("address", "0.0.0.0")
check = self._make_checker(dev6)
check("type", "spice")
check("passwd", "foobar", "newpass")
check("connected", None, "disconnect")
check("port", 100, 6000)
check("tlsPort", 101, 6001)
check("listen", "0.0.0.0", "1.2.3.4")
check("channel_inputs_mode", "insecure", "secure")
check("channel_main_mode", "secure", "any")
check("channel_record_mode", "any", "insecure")
check("channel_display_mode", "any", "secure")
check("channel_cursor_mode", "any", "any")
check("channel_playback_mode", "any", "insecure")
check("passwdValidTo", "2010-04-09T15:51:00", "2011-01-07T19:08:00")
check("defaultMode", None, "secure")
check("image_compression", None, "auto_glz")
check("streaming_mode", None, "filter")
check("clipboard_copypaste", None, True)
check("mouse_mode", None, "client")
check("filetransfer_enable", None, False)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterVideos(self):
guest, outfile = self._get_test_content("change-videos")
dev1 = guest.get_devices("video")[0]
dev2 = guest.get_devices("video")[1]
dev3 = guest.get_devices("video")[2]
check = self._make_checker(dev1)
check("model", "vmvga", "vga")
check("vram", None, 1000)
check("heads", None, 1)
check = self._make_checker(dev2)
check("model", "cirrus", "vmvga")
check("vram", 10240, None)
check("heads", 3, 5)
check = self._make_checker(dev3)
check("model", "cirrus", "cirrus", "qxl")
check("ram", None, 100)
check("vgamem", None, 8192)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterHostdevs(self):
infile = "tests/xmlparse-xml/change-hostdevs-in.xml"
outfile = "tests/xmlparse-xml/change-hostdevs-out.xml"
guest = virtinst.Guest(conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("hostdev")[0]
dev2 = guest.get_devices("hostdev")[1]
dev3 = guest.get_devices("hostdev")[2]
dev4 = guest.get_devices("hostdev")[3]
check = self._make_checker(dev1)
check("type", "usb", "foo", "usb")
check("managed", True, False)
check("mode", "subsystem", None)
check("vendor", "0x4321", "0x1111")
check("product", "0x1234", "0x2222")
check("bus", None, "1")
check("device", None, "2")
check = self._make_checker(dev2)
check("type", "usb")
check("managed", False, True)
check("mode", "capabilities", "subsystem")
check("bus", "0x12", "0x56")
check("device", "0x34", "0x78")
check = self._make_checker(dev3)
check("type", "pci")
check("managed", True, True)
check("mode", "subsystem", "subsystem")
check("domain", "0x0", "0x4")
check("bus", "0x1", "0x5")
check("slot", "0x2", "0x6")
check("function", "0x3", "0x7")
check("driver_name", None, "vfio")
check("rom_bar", None, True)
check = self._make_checker(dev4)
check("type", "scsi")
check("scsi_adapter", "scsi_host0", "foo")
check("scsi_bus", 0, 1)
check("scsi_target", 0, 2)
check("scsi_unit", 0, 3)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterWatchdogs(self):
guest, outfile = self._get_test_content("change-watchdogs")
dev1 = guest.get_devices("watchdog")[0]
check = self._make_checker(dev1)
check("model", "ib700", "i6300esb")
check("action", "none", "poweroff")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterFilesystems(self):
guest, outfile = self._get_test_content("change-filesystems")
dev1 = guest.get_devices("filesystem")[0]
dev2 = guest.get_devices("filesystem")[1]
dev3 = guest.get_devices("filesystem")[2]
dev4 = guest.get_devices("filesystem")[3]
dev5 = guest.get_devices("filesystem")[4]
dev6 = guest.get_devices("filesystem")[5]
dev7 = guest.get_devices("filesystem")[6]
check = self._make_checker(dev1)
check("type", None, "mount")
check("accessmode", None, "passthrough")
check("driver", "handle", None)
check("wrpolicy", None, None)
check("source", "/foo/bar", "/new/path")
check("target", "/bar/baz", "/new/target")
check = self._make_checker(dev2)
check("type", "template")
check("accessmode", None, "mapped")
check("source", "template_fedora", "template_new")
check("target", "/bar/baz")
check = self._make_checker(dev3)
check("type", "mount", None)
check("accessmode", "squash", None)
check("driver", "path", "handle")
check("wrpolicy", "immediate", None)
check("readonly", False, True)
check = self._make_checker(dev4)
check("type", "mount", None)
check("accessmode", "mapped", None)
check("driver", "path", "handle")
check("wrpolicy", None, "immediate")
check("readonly", False, True)
check = self._make_checker(dev5)
check("type", "ram")
check("source", "1024", 123)
check("units", "MB", "KiB")
check = self._make_checker(dev6)
check("type", "block")
check("source", "/foo/bar", "/dev/new")
check("readonly", False, True)
check = self._make_checker(dev7)
check("type", "file")
check("accessmode", "passthrough", None)
check("driver", "nbd", "loop")
check("format", "qcow", "raw")
check("source", "/foo/bar.img", "/foo/bar.raw")
check("readonly", False, True)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterSounds(self):
infile = "tests/xmlparse-xml/change-sounds-in.xml"
outfile = "tests/xmlparse-xml/change-sounds-out.xml"
guest = virtinst.Guest(conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("sound")[0]
dev2 = guest.get_devices("sound")[1]
dev3 = guest.get_devices("sound")[2]
check = self._make_checker(dev1)
check("model", "sb16", "ac97")
check = self._make_checker(dev2)
check("model", "es1370", "es1370")
check = self._make_checker(dev3)
check("model", "ac97", "sb16")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterAddr(self):
guest, outfile = self._get_test_content("change-addr")
dev1 = guest.get_devices("disk")[0]
dev2 = guest.get_devices("controller")[0]
dev3 = guest.get_devices("channel")[0]
dev4 = guest.get_devices("disk")[1]
check = self._make_checker(dev1.address)
check("type", "drive", "pci")
check("type", "pci", "drive")
check("controller", 3, 1)
check("bus", 5, 4)
check("unit", 33, 32)
check = self._make_checker(dev1.alias)
check("name", "foo2", None)
check = self._make_checker(dev2.address)
dev2.address.domain = "0x0010"
self.assertEqual(dev2.address.domain, 16)
check("type", "pci")
check("domain", 16, 1)
check("bus", 0, 4)
check("slot", 4, 10)
check("function", 7, 6)
check = self._make_checker(dev2.alias)
check("name", None, "frob")
check = self._make_checker(dev3.address)
check("type", "virtio-serial")
check("controller", 0)
check("bus", 0)
check("port", 2, 4)
check = self._make_checker(dev3.alias)
check("name", "channel0", "channel1")
dev4.address.clear()
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterSmartCard(self):
guest, outfile = self._get_test_content("change-smartcard")
dev1 = guest.get_devices("smartcard")[0]
dev2 = guest.get_devices("smartcard")[1]
check = self._make_checker(dev1)
check("type", None, "tcp")
check = self._make_checker(dev2)
check("mode", "passthrough", "host")
check("type", "spicevmc", None)
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterRedirdev(self):
guest, outfile = self._get_test_content("change-redirdev")
dev1 = guest.get_devices("redirdev")[0]
dev2 = guest.get_devices("redirdev")[1]
check = self._make_checker(dev1)
check("bus", "usb", "baz", "usb")
check("host", "foo", "bar")
check("service", 12, 42)
check = self._make_checker(dev2)
check("type", "tcp", "spicevmc")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterTPM(self):
guest, outfile = self._get_test_content("change-tpm")
dev1 = guest.get_devices("tpm")[0]
check = self._make_checker(dev1)
check("type", "passthrough", "foo", "passthrough")
check("model", "tpm-tis", "tpm-tis")
check("device_path", "/dev/tpm0", "frob")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterRNG_EGD(self):
guest, outfile = self._get_test_content("change-rng-egd")
dev1 = guest.get_devices("rng")[0]
check = self._make_checker(dev1)
check("type", "egd")
check("backend_type", "udp", "udp")
check("connect_host", "1.2.3.4", "1.2.3.5")
check("connect_service", "1234", "1235")
check("bind_host", None, None)
check("bind_service", "1233", "1236")
check("rate_bytes", "1234", "4321")
check("rate_period", "2000", "2001")
self._alter_compare(guest.get_xml_config(), outfile)
def testAlterRNG_Random(self):
guest, outfile = self._get_test_content("change-rng-random")
dev1 = guest.get_devices("rng")[0]
check = self._make_checker(dev1)
check("type", "random", "random")
check("model", "virtio", "virtio")
check("device", "/dev/random", "/dev/hwrng")
self._alter_compare(guest.get_xml_config(), outfile)
def testConsoleCompat(self):
guest, outfile = self._get_test_content("console-compat")
dev1 = guest.get_devices("console")[0]
check = self._make_checker(dev1)
check("source_path", "/dev/pts/4")
check("_tty", "/dev/pts/4", "foo", "/dev/pts/4")
self._alter_compare(guest.get_xml_config(), outfile)
def testPanicDevice(self):
guest, outfile = self._get_test_content("change-panic-device")
dev1 = guest.get_devices("panic")[0]
check = self._make_checker(dev1)
check("type", "isa", None, "isa")
check("iobase", "0x505", None, "0x506")
self._alter_compare(guest.get_xml_config(), outfile)
def testAddRemoveDevices(self):
guest, outfile = self._get_test_content("add-devices")
rmdev = guest.get_devices("disk")[2]
guest.remove_device(rmdev)
adddev = virtinst.VirtualNetworkInterface(conn=conn)
adddev.type = "network"
adddev.source = "default"
adddev.macaddr = "1A:2A:3A:4A:5A:6A"
adddev.address.set_addrstr("spapr-vio")
guest.add_device(virtinst.VirtualWatchdog(conn))
guest.add_device(adddev)
guest.remove_device(adddev)
guest.add_device(adddev)
guest.add_device(virtinst.VirtualAudio(conn,
parsexml=""""""))
self._alter_compare(guest.get_xml_config(), outfile)
def testChangeKVMMedia(self):
guest, outfile = self._get_test_content("change-media", kvm=True)
disk = guest.get_devices("disk")[0]
check = self._make_checker(disk)
check("path", None, "/dev/default-pool/default-vol")
disk.sync_path_props()
disk = guest.get_devices("disk")[1]
check = self._make_checker(disk)
check("path", None, "/dev/default-pool/default-vol")
check("path", "/dev/default-pool/default-vol", "/dev/disk-pool/diskvol1")
disk.sync_path_props()
disk = guest.get_devices("disk")[2]
check = self._make_checker(disk)
check("path", None, "/dev/disk-pool/diskvol1")
disk.sync_path_props()
disk = guest.get_devices("disk")[3]
check = self._make_checker(disk)
check("path", None, "/dev/default-pool/default-vol")
disk.sync_path_props()
disk = guest.get_devices("disk")[4]
check = self._make_checker(disk)
check("path", None, "/dev/disk-pool/diskvol1")
disk.sync_path_props()
self._alter_compare(guest.get_xml_config(), outfile)
def testChangeSnapshot(self):
basename = "change-snapshot"
infile = "tests/xmlparse-xml/%s-in.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
snap = virtinst.DomainSnapshot(conn, parsexml=file(infile).read())
check = self._make_checker(snap)
check("name", "offline-root-child1", "name-foo")
check("state", "shutoff", "somestate")
check("description", "offline desk", "foo\nnewline\n indent")
check("parent", "offline-root", "newparent")
check("creationTime", 1375905916, 1234)
check("memory_type", "no", "internal")
check = self._make_checker(snap.disks[0])
check("name", "hda", "hdb")
check("snapshot", "internal", "no")
utils.diff_compare(snap.get_xml_config(), outfile)
###################
# Interface tests #
###################
def testInterfaceBridgeIP(self):
basename = "test-bridge-ip"
infile = "tests/interface-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename
iface = virtinst.Interface(conn, parsexml=file(infile).read())
self.assertEquals(len(iface.protocols), 2)
self.assertEquals(len(iface.interfaces), 3)
check = self._make_checker(iface)
check("type", "bridge", "foo", "bridge")
check("name", "test-bridge-ip", "foo-new")
check("stp", None, True)
check("delay", None, 2)
check = self._make_checker(iface.protocols[0])
check("family", "ipv4", "foo", "ipv4")
check("dhcp_peerdns", True, False)
check("gateway", "1.2.3.4", "5.5.5.5")
self.assertEquals(iface.protocols[0].ips[1].address, "255.255.255.0")
check = self._make_checker(iface.protocols[1])
check("dhcp", True, False)
check("autoconf", True, False)
check = self._make_checker(iface.protocols[1].ips[1])
check("address", "fe80::215:58ff:fe6e:5", "2002::")
check("prefix", 64, 38)
# Remove a child interface, verify it's data remains intact
child_iface = iface.interfaces[1]
iface.remove_interface(child_iface)
check = self._make_checker(child_iface)
check("name", "bond-brbond")
self.assertEquals(len(child_iface.interfaces), 2)
utils.diff_compare(iface.get_xml_config(), outfile)
utils.test_create(conn, iface.get_xml_config(), "interfaceDefineXML")
def testInterfaceBondArp(self):
basename = "test-bond-arp"
infile = "tests/interface-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename
iface = virtinst.Interface(conn, parsexml=file(infile).read())
check = self._make_checker(iface)
check("start_mode", "onboot", "hotplug")
check("macaddr", "AA:AA:AA:AA:AA:AA", "AA:AA:AA:11:AA:AA")
check("mtu", 1501, 1234)
check("bond_mode", None, "active-backup")
check("arp_interval", 100, 234)
check("arp_target", "192.168.100.200", "1.2.3.4")
check("arp_validate_mode", "backup", "active")
utils.diff_compare(iface.get_xml_config(), outfile)
utils.test_create(conn, iface.get_xml_config(), "interfaceDefineXML")
def testInterfaceBondMii(self):
basename = "test-bond-mii"
infile = "tests/interface-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename
iface = virtinst.Interface(conn, parsexml=file(infile).read())
check = self._make_checker(iface)
check("mii_frequency", 123, 111)
check("mii_downdelay", 34, 22)
check("mii_updelay", 12, 33)
check("mii_carrier_mode", "netif", "ioctl")
utils.diff_compare(iface.get_xml_config(), outfile)
utils.test_create(conn, iface.get_xml_config(), "interfaceDefineXML")
def testInterfaceVLAN(self):
basename = "test-vlan"
infile = "tests/interface-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/interface-%s-out.xml" % basename
iface = virtinst.Interface(conn, parsexml=file(infile).read())
check = self._make_checker(iface)
check("tag", 123, 456)
check("parent_interface", "eth2", "foonew")
utils.diff_compare(iface.get_xml_config(), outfile)
utils.test_create(conn, iface.get_xml_config(), "interfaceDefineXML")
#################
# Storage tests #
#################
def testFSPool(self):
basename = "pool-fs"
infile = "tests/xmlparse-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
pool = virtinst.StoragePool(conn, parsexml=file(infile).read())
check = self._make_checker(pool)
check("type", "fs", "dir")
check("name", "pool-fs", "foo-new")
check("uuid", "10211510-2115-1021-1510-211510211510",
"10211510-2115-1021-1510-211510211999")
check("capacity", 984373075968, 200000)
check("allocation", 756681687040, 150000)
check("available", 227691388928, 50000)
check("format", "auto", "ext3")
check("source_path", "/some/source/path", "/dev/foo/bar")
check("target_path", "/some/target/path", "/mnt/my/foo")
check("source_name", None, "fooname")
utils.diff_compare(pool.get_xml_config(), outfile)
utils.test_create(conn, pool.get_xml_config(), "storagePoolDefineXML")
def testISCSIPool(self):
basename = "pool-iscsi"
infile = "tests/storage-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
pool = virtinst.StoragePool(conn, parsexml=file(infile).read())
check = self._make_checker(pool)
check("iqn", "foo.bar.baz.iqn", "my.iqn")
check = self._make_checker(pool.hosts[0])
check("name", "some.random.hostname", "my.host")
utils.diff_compare(pool.get_xml_config(), outfile)
utils.test_create(conn, pool.get_xml_config(), "storagePoolDefineXML")
def testGlusterPool(self):
if not conn.check_support(conn.SUPPORT_CONN_POOL_GLUSTERFS):
raise unittest.SkipTest("Gluster pools not supported with this "
"libvirt version.")
basename = "pool-gluster"
infile = "tests/storage-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
pool = virtinst.StoragePool(conn, parsexml=file(infile).read())
check = self._make_checker(pool)
check("source_path", "/some/source/path", "/foo")
check = self._make_checker(pool.hosts[0])
check("name", "some.random.hostname", "my.host")
utils.diff_compare(pool.get_xml_config(), outfile)
utils.test_create(conn, pool.get_xml_config(), "storagePoolDefineXML")
def testRBDPool(self):
basename = "pool-rbd"
infile = "tests/xmlparse-xml/%s.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
pool = virtinst.StoragePool(conn, parsexml=file(infile).read())
check = self._make_checker(pool.hosts[0])
check("name", "ceph-mon-1.example.com")
check("port", 6789, 1234)
check = self._make_checker(pool.hosts[1])
check("name", "ceph-mon-2.example.com", "foo.bar")
check("port", 6789)
check = self._make_checker(pool.hosts[2])
check("name", "ceph-mon-3.example.com")
check("port", 6789, 1000)
pool.add_host("frobber", "5555")
utils.diff_compare(pool.get_xml_config(), outfile)
utils.test_create(conn, pool.get_xml_config(), "storagePoolDefineXML")
def testVol(self):
basename = "pool-dir-vol"
infile = "tests/xmlparse-xml/%s-in.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
vol = virtinst.StorageVolume(conn, parsexml=file(infile).read())
check = self._make_checker(vol)
check("type", None, "file")
check("key", None, "fookey")
check("capacity", 10737418240, 2000)
check("allocation", 5368709120, 1000)
check("format", "raw", "qcow2")
check("target_path", None, "/foo/bar")
check("backing_store", "/foo/bar/baz", "/my/backing")
check("lazy_refcounts", False, True)
check = self._make_checker(vol.permissions)
check("mode", "0700", "0744")
check("owner", "10736", "10000")
check("group", "10736", "10000")
check("label", None, "foo.label")
utils.diff_compare(vol.get_xml_config(), outfile)
###################
# tests #
###################
def testNetMulti(self):
basename = "network-multi"
infile = "tests/xmlparse-xml/%s-in.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
net = virtinst.Network(conn, parsexml=file(infile).read())
check = self._make_checker(net)
check("name", "ipv6_multirange", "new-foo")
check("uuid", "41b4afe4-87bb-8087-6724-5e208a2d483a",
"41b4afe4-87bb-8087-6724-5e208a2d1111")
check("bridge", "virbr3", "virbr3new")
check("stp", True, False)
check("delay", 0, 2)
check("domain_name", "net7", "newdom")
check("ipv6", None, True)
check("macaddr", None, "52:54:00:69:eb:FF")
check = self._make_checker(net.forward)
check("mode", "nat", "route")
check("dev", None, "eth22")
check = self._make_checker(net.bandwidth)
check("inbound_average", "1000", "3000")
check("inbound_peak", "5000", "4000")
check("inbound_burst", "5120", "5220")
check("inbound_floor", None, None)
check("outbound_average", "1000", "2000")
check("outbound_peak", "5000", "3000")
check("outbound_burst", "5120", "5120")
self.assertEquals(len(net.portgroups), 2)
check = self._make_checker(net.portgroups[0])
check("name", "engineering", "foo")
check("default", True, False)
self.assertEqual(len(net.ips), 4)
check = self._make_checker(net.ips[0])
check("address", "192.168.7.1", "192.168.8.1")
check("netmask", "255.255.255.0", "255.255.254.0")
check("tftp", None, "/var/lib/tftproot")
check("bootp_file", None, "pxeboot.img")
check("bootp_server", None, "1.2.3.4")
check = self._make_checker(net.ips[0].ranges[0])
check("start", "192.168.7.128", "192.168.8.128")
check("end", "192.168.7.254", "192.168.8.254")
check = self._make_checker(net.ips[0].hosts[1])
check("macaddr", "52:54:00:69:eb:91", "52:54:00:69:eb:92")
check("name", "badbob", "newname")
check("ip", "192.168.7.3", "192.168.8.3")
check = self._make_checker(net.ips[1])
check("family", "ipv6", "ipv6")
check("prefix", 64, 63)
r = net.add_route()
r.family = "ipv4"
r.address = "192.168.8.0"
r.prefix = "24"
r.gateway = "192.168.8.10"
check = self._make_checker(r)
check("netmask", None, "foo", None)
utils.diff_compare(net.get_xml_config(), outfile)
utils.test_create(conn, net.get_xml_config(), "networkDefineXML")
##############
# Misc tests #
##############
def testCPUUnknownClear(self):
# Make sure .clear() even removes XML elements we don't know about
basename = "clear-cpu-unknown-vals"
infile = "tests/xmlparse-xml/%s-in.xml" % basename
outfile = "tests/xmlparse-xml/%s-out.xml" % basename
guest = virtinst.Guest(kvmconn, parsexml=file(infile).read())
guest.cpu.copy_host_cpu()
guest.cpu.clear()
utils.diff_compare(guest.get_xml_config(), outfile)
if __name__ == "__main__":
unittest.main()
virt-manager-1.3.2/tests/testdriver.xml 0000664 0001751 0001751 00000260024 12627132763 021667 0 ustar crobinso crobinso 0000000 0000000
1
4
4
1
4
4000
i686
10000000
test
4a64cc71-19c4-2fd0-2323-3050941ea3c3
8388608
2097152
2
hvm
destroy
restart
destroy
test-arm-kernel
8388608
2097152
2
hvm
/dev/default-pool/test-arm-kernel
/dev/default-pool/test-arm-initrd
/dev/default-pool/test-arm-dtb
console=ttyAMA0 rw root=/dev/vda3
test-for-virtxml
204800
409600
100
/dev/sdd
200
12345678-12F4-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
Test VM for virtxml cli tests
destroy
restart
restart
9
core2duo
Intel
/usr/lib/xen/bin/qemu-dm
5242880
50
test-many-devices
204800
409600
100
/dev/sdd
200
12345678-12F4-1234-1234-A23456A89012
hvm
/usr/lib/xen/boot/hvmloader
Test VM for virt-manager details UI testing
Foo bar baz & yeah boii < > yeahfoo
destroy
restart
restart
9
core2duo
Intel
/usr/lib/xen/bin/qemu-dm
5242880
50
cert1
cert2
cert3
test-alternate-devs
4a64cc71-19c4-2fd0-2323-00aa941ea3c3
Test alternate devices that can't be crammed in
test-many-devices, like an alternate RNG.
test alternate devs (title)
8388608
2097152
2
hvm
destroy
restart
destroy
/dev/hwrng
test-clone-simple
204800
409600
12345678-1234-FFFF-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
test-for-clone
204800
409600
12345678-1234-1234-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
test-halffull-clone
204800
409600
abcd5678-1234-1234-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
test-full-clone
204800
409600
abcd5678-aaaa-1234-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
test-xenpv-kernel
596a5d2171f48fb2e068e2386a5c413e
xen
/var/lib/xen/vmlinuz.2Dn2YT
/var/lib/xen/initrd.img.0u-Vhq
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
430080
2
destroy
destroy
destroy
test-duplicate-usb
4a64cc71-19c4-2fd0-2323-3050abaea3c3
8388608
2097152
2
hvm
destroy
restart
destroy
test-spapr-xml
2754dd7b-ac8a-4850-aec0-1f3fcd43235b
524288
1
hvm
spapr-vlan
test-state-shutoff
1048576
/tmp/bootfoo
5
test-state-paused
1048576
/tmp/bootfoo
3
test-state-crashed
1048576
/tmp/bootfoo
6
test-state-pmsuspended
1048576
/tmp/bootfoo
7
test-state-transient
1048576
/tmp/bootfoo
test-state-managedsave
1048576
/tmp/bootfoo
5
test-snapshots
409600
12345678-1234-FDDF-1234-12345678FFFF
/tmp/bootfoo
internal-root
running
1375905080
FOO
desc line #2
ba
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
internal-root-child1
running
internal-root
1375885107
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
1
offline-root
shutoff
1375905902
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
offline-root-child1
shutoff
offline-root
1375905916
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
offline-root-child2
shutoff
offline-root
137590600
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
snap-paused
paused
1375903080
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
snap-pmsuspended
pmsuspended
1375903080
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
aaa-external-mem
running
1365903080
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
zzz-external-diskonly
shutoff
1365903080
test-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
default
715666b7-dbd4-6c78-fa55-94863da09f2d
isolated_net
nat_to_eth0
route
715666b7-aaaa-6c78-fa55-94863da09f2d
netboot
81ff0d90-c91e-6742-64da-4a736edb9a9b
plainbridge-portgroups
b1b9d7c6-f620-048f-71ee-ca3ba1ac3e98
ipv4_prefix
81ff0d90-c91e-6742-64da-4a736edb9122
ipv4_nomask
81ff0d90-aaaa-6742-64da-4a736edb9a9b
ipv6_empty
591d28b3-25fd-21f5-ac71-e1877d787945
ipv6_2ranges
e08c0cc3-b892-b53b-c41d-c4f526291be9
ipv6_multirange
41b4afe4-87bb-8087-6724-5e208a2d483a
ipv6_multirange2
f9c6675f-98f8-ce75-b39a-02c1d23081e0
ipv6route
default-pool
35bb2ad9-388a-cdfe-461a-b8907f6e53fe
107374182400
0
107374182400
/dev/default-pool
0700
10736
10736
default-vol
1000000
50000
0700
10736
10736
dir-vol
1000000
50000
0700
10736
10736
iso-vol
1000000
50000
0700
10736
10736
bochs-vol
1000000
50000
0700
10736
10736
testvol1.img
1000000
50000
0700
10736
10736
testvol2.img
1000000
50000
0700
10736
10736
UPPER
1000000
50000
0700
10736
10736
test-clone-simple.img
1000000
50000
0700
10736
10736
collidevol1.img
1000000
50000
sharevol.img
1000000
50000
backingl3.img
1000000
50000
backingl2.img
1000000
50000
/dev/default-pool/backingl3.img
backingl1.img
1000000
50000
/dev/default-pool/backingl2.img
overlay.img
1000000
50000
/dev/default-pool/backingl1.img
test-arm-kernel
1000000
50000
test-arm-initrd
1000000
50000
test-arm-dtb
1000000
50000
spurious-slash-pool
35bb2ad9-1122-cdfe-461a-b8907f6e53fe
107374182400
0
107374182400
/spurious-slash-pool//
0700
10736
10736
default-vol
1000000
50000
testvol1.img
1000000
50000
testvol2.img
1000000
50000
collidevol1.img
1000000
50000
inactive-pool
35bb2aaa-388a-cdfe-461a-b8907f6e53fe
107374182400
0
107374182400
/inactive-pool
0700
10736
10736
inactive-vol
1000000
50000
0700
10736
10736
cross-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5abc
107374182400
0
107374182400
/dev/cross-pool
0700
10736
10736
testvol1.img
1000000
50000
0700
10736
10736
testvol2.img
1000000
50000
0700
10736
10736
halffull-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5444
3000
3000
0
/halffull-pool
0700
10736
10736
testvol1.img
1000
1000
0700
10736
10736
testvol2.img
1000
1000
0700
10736
10736
full-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5555
1
1
0
/full-pool
0700
10736
10736
testvol1.img
107374182400
107374182400
0700
10736
10736
disk-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5aaa
107374182400
0
107374182400
/dev/disk-pool
0700
10736
10736
diskvol1
1000000
50000
0700
10736
10736
iscsi-pool
abcdead9-388a-cdfe-461a-b8907f6e5aaa
107374182400
0
107374182400
/iscsi-pool
0700
10736
10736
diskvol1
1000000
50000
0700
10736
10736
rbd-ceph
4bcd023e-990e-fcf6-d95c-52dd0cd938c8
47256127143936
5537792235090
35978000121856
rbd
vol1
rbd/vol1
8302592
8388608
rbd/vol1
some-rbd-vol
rbd/some-rbd-vol
104857600
104857600
rbd/some-rbd-vol
myshpool
581381f8-a13f-4f7c-89b5-9c9b71c64834
107374182400
53687091200
53687091200
mysheeppool
vol_sheepdog
sheep/vol_sheepdog
1024
0
sheepdog:vol_sheepdog
0600
-1
-1
gluster-pool
7b83ef6d-28da-44f1-841f-2011320f13b0
492258959360
16975638528
475283320832
test-volume
test-gluster.raw
gluster://192.168.1.100/test-volume/some/dir/test-gluster.raw
10737418240
2489327616
gluster://192.168.1.100/test-volume/some/dir/test-gluster.raw
0666
0
0
test-gluster2.raw
gluster://192.168.1.100/test-volume/some/dir/test-gluster2.raw
10737418240
2489327616
gluster://192.168.1.100/test-volume/some/dir/test-gluster2.raw
0666
0
0
test-gluster.qcow2
gluster://192.168.1.100/test-volume/test-gluster.qcow2
10737418240
2489327616
gluster://192.168.1.100/test-volume/test-gluster.qcow2
0666
0
0
computer
LENOVO
ThinkPad T61
L3B2616
97e80381-494f-11cb-8e0e-cbc168f7d753
LENOVO
7LET51WW (1.21 )
08/22/2007
net_00_1c_25_10_b1_e4
pci_8086_1049
eth0
00:1c:25:10:b1:e4
net_00_1c_25_10_b1_ea
pci_8086_1022
physeth2
00:1c:25:10:aa:e4
net_00_1c_bf_04_29_a4
pci_8086_4227
wlan0
00:1c:bf:04:29:a4
net_00_1c_bf_04_29_a4_0
pci_8086_4227
wmaster0
00:1c:bf:04:29:a4
net_3e_79_a5_6f_37_c3
computer
virbr0
3e:79:a5:6f:37:c3
net_computer_loopback
computer
lo
00:00:00:00:00:00
pci_1180_476
pci_8086_2448
yenta_cardbus
1
21
10
50
RL5c476 II
Ricoh Co Ltd
pci_1180_592
pci_8086_2448
0
21
0
4
R5C592 Memory Stick Bus Host Adapter
Ricoh Co Ltd
pci_1180_822
pci_8086_2448
sdhci-pci
2
21
0
2
R5C822 SD/SDIO/MMC/MS/MSPro Host Adapter
Ricoh Co Ltd
pci_1180_832
pci_8086_2448
firewire_ohci
0
21
0
1
R5C832 IEEE 1394 Controller
Ricoh Co Ltd
pci_1180_843
pci_8086_2448
ricoh-mmc
0
21
0
3
R5C843 MMC Host Controller
Ricoh Co Ltd
pci_1180_852
pci_8086_2448
0
21
0
5
xD-Picture Card Controller
Ricoh Co Ltd
pci_8086_1049
computer
e1000e
0
0
25
0
82566MM Gigabit Network Connection
Intel Corporation
pci_8086_2448
computer
0
0
30
0
82801 Mobile PCI Bridge
Intel Corporation
pci_8086_2811
computer
0
0
31
0
82801HBM (ICH8M-E) LPC Interface Controller
Intel Corporation
pci_8086_2829
computer
ahci
0
0
31
2
82801HBM/HEM (ICH8M/ICH8M-E) SATA AHCI Controller
Intel Corporation
pci_8086_2829_scsi_host
pci_8086_2829
0
pci_8086_2829_scsi_host_0
pci_8086_2829
1
pci_8086_2829_scsi_host_1
pci_8086_2829
2
pci_8086_2829_scsi_host_scsi_device_lun0
pci_8086_2829_scsi_host
sd
0
0
0
0
disk
pci_8086_2829_scsi_host_scsi_host
pci_8086_2829_scsi_host
0
pci_8086_2830
computer
uhci_hcd
0
0
29
0
82801H (ICH8 Family) USB UHCI Controller #1
Intel Corporation
pci_8086_2831
computer
uhci_hcd
0
0
29
1
82801H (ICH8 Family) USB UHCI Controller #2
Intel Corporation
pci_8086_2832
computer
uhci_hcd
0
0
29
2
82801H (ICH8 Family) USB UHCI Controller #3
Intel Corporation
pci_8086_2834
computer
uhci_hcd
0
0
26
0
82801H (ICH8 Family) USB UHCI Controller #4
Intel Corporation
pci_8086_2835
computer
uhci_hcd
0
0
26
1
82801H (ICH8 Family) USB UHCI Controller #5
Intel Corporation
pci_8086_2836
computer
ehci_hcd
0
0
29
7
82801H (ICH8 Family) USB2 EHCI Controller #1
Intel Corporation
pci_8086_283a
computer
ehci_hcd
0
0
26
7
82801H (ICH8 Family) USB2 EHCI Controller #2
Intel Corporation
pci_8086_283e
computer
i801_smbus
0
0
31
3
82801H (ICH8 Family) SMBus Controller
Intel Corporation
pci_8086_283f
computer
pcieport-driver
0
0
28
0
82801H (ICH8 Family) PCI Express Port 1
Intel Corporation
pci_8086_2841
computer
pcieport-driver
0
0
28
1
82801H (ICH8 Family) PCI Express Port 2
Intel Corporation
pci_8086_2843
computer
pcieport-driver
0
0
28
2
82801H (ICH8 Family) PCI Express Port 3
Intel Corporation
pci_8086_2845
computer
pcieport-driver
0
0
28
3
82801H (ICH8 Family) PCI Express Port 4
Intel Corporation
pci_8086_2847
computer
pcieport-driver
0
0
28
4
82801H (ICH8 Family) PCI Express Port 5
Intel Corporation
pci_8086_284b
computer
HDA Intel
0
0
27
0
82801H (ICH8 Family) HD Audio Controller
Intel Corporation
pci_8086_2850
computer
ata_piix
0
0
31
1
82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller
Intel Corporation
pci_8086_2850_scsi_host
pci_8086_2850
3
pci_8086_2850_scsi_host_0
pci_8086_2850
4
pci_8086_2850_scsi_host_scsi_device_lun0
pci_8086_2850_scsi_host
sr
3
0
0
0
cdrom
pci_8086_2850_scsi_host_scsi_host
pci_8086_2850_scsi_host
3
pci_8086_2a00
computer
agpgart-intel
0
2
0
15
Mobile PM965/GM965/GL960 Memory Controller Hub
Intel Corporation
pci_8086_2a02
computer
i915
0
0
2
0
Mobile GM965/GL960 Integrated Graphics Controller
Intel Corporation
pci_8086_2a03
computer
0
0
2
1
Mobile GM965/GL960 Integrated Graphics Controller
Intel Corporation
pci_8086_2a04
computer
0
0
3
0
Mobile PM965/GM965 MEI Controller
Intel Corporation
pci_8086_2a06
computer
0
0
3
2
Mobile PM965/GM965 PT IDER Controller
Intel Corporation
pci_8086_2a07
computer
serial
0
0
3
3
Mobile PM965/GM965 KT Controller
Intel Corporation
pci_8086_4227
pci_8086_2841
iwl3945
0
3
0
0
PRO/Wireless 3945ABG [Golan] Network Connection
Intel Corporation
storage_serial_ST910021AS_5MH04L87
pci_8086_2829_scsi_host_scsi_device_lun0
/dev/sda
pci
disk
ST910021AS
ATA
ST910021AS_5MH04L87
100030242816
storage_serial_SATA_WDC_WD1600AAJS__WD_WCAP95119685
pci_8086_27c0_scsi_host_scsi_device_lun0
/dev/sda
scsi
disk
WDC WD1600AAJS-2
ATA
160041885696
storage_model_DVDRAM_GSA_U10N
pci_8086_2850_scsi_host_scsi_device_lun0
/dev/sr1
pci
cdrom
DVDRAM GSA-U10N
HL-DT-ST
0
0
storage_model_DVDRAM_GSA_U1200N
pci_8086_2850_scsi_host_scsi_device_lun0
/dev/sr0
pci
cdrom
DVDRAM GSA-U10N
HL-DT-ST
1
1234
Fedora12_media
storage_serial_MITSUMI_MITSUMI_USB_FDD_061M
usb_device_3ee_6901_noserial_if0_scsi_host_0_scsi_device_lun0
/dev/fda
usb
floppy
USB FDD 061M
MITSUMI
MITSUMI_MITSUMI_USB_FDD_061M
0
0
storage_serial_MITSUMI_MITSUMI_USB_FDD_061M_2
usb_device_3ee_6901_noserial_if0_scsi_host_0_scsi_device_lun0
/dev/fdb
usb
floppy
USB FDD 061M
MITSUMI
MITSUMI_MITSUMI_USB_FDD_061M
1
123456
Floppy_install_label
storage_serial_SanDisk_Cruzer_Micro_2004453082054CA1BEEE_0_0
usb_device_781_5151_2004453082054CA1BEEE_if0_scsi_host_0_scsi_device_lun0
/dev/sdb
usb
disk
Cruzer Micro
SanDisk
1
12345678
Windows_Media
usb_device_1d6b_1_0000_00_1a_0
pci_8086_2834
usb
3
1
1.1 root hub
Linux Foundation
usb_device_1d6b_1_0000_00_1a_0_if0
usb_device_1d6b_1_0000_00_1a_0
hub
0
9
0
0
usb_device_1d6b_1_0000_00_1a_1
pci_8086_2835
usb
4
1
1.1 root hub
Linux Foundation
usb_device_1d6b_1_0000_00_1a_1_if0
usb_device_1d6b_1_0000_00_1a_1
hub
0
9
0
0
usb_device_1d6b_1_0000_00_1d_0
pci_8086_2830
usb
5
1
1.1 root hub
Linux Foundation
usb_device_1d6b_1_0000_00_1d_0_if0
usb_device_1d6b_1_0000_00_1d_0
hub
0
9
0
0
usb_device_1d6b_1_0000_00_1d_1
pci_8086_2831
usb
6
1
1.1 root hub
Linux Foundation
usb_device_1d6b_1_0000_00_1d_1_if0
usb_device_1d6b_1_0000_00_1d_1
hub
0
9
0
0
usb_device_781_5151_2004453082054CA1BEEE
usb_device_1d6b_2_0000_00_1a_7
1
4
Cruzer Micro 256/512MB Flash Drive
SanDisk Corp.
usb_device_1d6b_1_0000_00_1d_2
pci_8086_2832
usb
7
1
1.1 root hub
Linux Foundation
usb_device_1d6b_1_0000_00_1d_2_if0
usb_device_1d6b_1_0000_00_1d_2
hub
0
9
0
0
usb_device_1d6b_2_0000_00_1a_7
pci_8086_283a
usb
1
1
2.0 root hub
Linux Foundation
usb_device_1d6b_2_0000_00_1a_7_if0
usb_device_1d6b_2_0000_00_1a_7
hub
0
9
0
0
usb_device_1d6b_2_0000_00_1d_7
pci_8086_2836
usb
2
1
2.0 root hub
Linux Foundation
usb_device_1d6b_2_0000_00_1d_7_if0
usb_device_1d6b_2_0000_00_1d_7
hub
0
9
0
0
usb_device_483_2016_noserial
usb_device_1d6b_1_0000_00_1a_0
usb
3
2
Fingerprint Reader
SGS Thomson Microelectronics
usb_device_483_2016_noserial_if0
usb_device_483_2016_noserial
0
255
0
0
usb_device_4b3_4485_noserial
usb_device_1d6b_2_0000_00_1a_7
usb
1
3
Serial Converter
IBM Corp.
usb_device_4b3_4485_noserial_if0
usb_device_4b3_4485_noserial
hub
0
9
0
2
usb_device_62a_1_noserial
usb_device_4b3_4485_noserial
usb
1
4
Notebook Optical Mouse
Creative Labs
usb_device_62a_1_noserial_if0
usb_device_62a_1_noserial
usbhid
0
3
1
2
pci_8086_25f8
computer
pcieport-driver
0
0
4
0
5000 Series Chipset PCI Express x8 Port 4-5
Intel Corporation
pci_10df_fe00_0
pci_8086_25f8
lpfc
0
16
0
1
Zephyr-X LightPulse Fibre Channel Host Adapter
Emulex Corporation
pci_10df_fe00_0_scsi_host
pci_10df_fe00_0
4
20000000c9848141
10000000c9848141
usb_5_20
usb_usb5
usb
1
20
Dup USB 1
HP
usb_5_21
usb_usb5
usb
1
21
Dup USB 2
HP
virt-manager-1.3.2/tests/test_inject.py 0000775 0001751 0001751 00000012623 12627132763 021642 0 ustar crobinso crobinso 0000000 0000000 #!/usr/bin/python2 -tt
# Copyright (C) 2013, 2014 Red Hat, Inc.
import atexit
import os
import sys
import unittest
from tests import INITRD_TEST_DISTROS
from tests import utils
from virtinst import Guest
from virtinst import urlfetcher
from virtinst import util
from virtinst.distroinstaller import _perform_initrd_injections
cleanup = []
_alldistros = {}
testconn = utils.open_testdefault()
guest = Guest(testconn)
guest.os.os_type = "hvm"
guest.os.arch = "x86_64"
meter = util.make_meter(quiet=False)
DEVFEDORA_URL = "http://dl.fedoraproject.org/pub/fedora/linux/development/%s/%s/os/"
OLD_FEDORA_URL = "http://dl.fedoraproject.org/pub/fedora/linux/releases/%s/Fedora/%s/os/"
FEDORA_URL = "http://dl.fedoraproject.org/pub/fedora/linux/releases/%s/Server/%s/os/"
(WARN_RHEL4,
WARN_RHEL5,
WARN_LATEST) = range(1, 4)
def prompt():
sys.stdout.write("(press enter to continue)")
return sys.stdin.readline()
class Distro(object):
def __init__(self, name, url, warntype=WARN_LATEST,
ks2=False, virtio=True):
self.name = name
self.url = url
self.virtio = virtio
self.warntype = warntype
self.ks = "tests/inject-data/old-kickstart.ks"
if ks2:
self.ks = "tests/inject-data/new-kickstart.ks"
self.kernel = None
self.initrd = None
def _add(*args, **kwargs):
_d = Distro(*args, **kwargs)
_alldistros[_d.name] = _d
_add("centos-4.9", "http://vault.centos.org/4.9/os/x86_64",
warntype=WARN_RHEL4, ks2=True, virtio=False)
_add("centos-5-latest", "http://ftp.linux.ncsu.edu/pub/CentOS/5/os/x86_64/",
warntype=WARN_RHEL5)
_add("centos-6-latest", "http://ftp.linux.ncsu.edu/pub/CentOS/6/os/x86_64/",
warntype=WARN_RHEL5)
_add("centos-7-latest", "http://ftp.linux.ncsu.edu/pub/CentOS/7/os/x86_64/",
ks2=True)
_add("fedora-20", OLD_FEDORA_URL % ("20", "x86_64"), ks2=True)
_add("fedora-21", FEDORA_URL % ("21", "x86_64"), ks2=True)
_add("fedora-22", DEVFEDORA_URL % ("22", "x86_64"), ks2=True)
def exit_cleanup():
for f in cleanup or []:
try:
os.unlink(f)
except:
pass
atexit.register(exit_cleanup)
def _fetch_distro(distro):
print "Fetching distro=%s" % distro.name
fetcher = urlfetcher.fetcherForURI(distro.url, "/tmp", meter)
origenv = os.environ.pop("VIRTINST_TEST_SUITE")
try:
fetcher.prepareLocation()
store = urlfetcher.getDistroStore(guest, fetcher)
kernel, initrd, ignore = store.acquireKernel(guest)
cleanup.append(kernel)
cleanup.append(initrd)
distro.kernel = kernel
distro.initrd = initrd
finally:
fetcher.cleanupLocation()
if origenv:
os.environ["VIRTINST_TEST_SUITE"] = origenv
def _test_distro(distro):
os.system("clear")
print "\n"
if distro.warntype == WARN_RHEL4:
print "RHEL4: Makes its way to the text installer, then chokes "
print "on our bogus URI http://HEY-THIS-IS-OUR-BAD-KICKSTART-URL.com/"
elif distro.warntype == WARN_RHEL5:
print "RHEL5, RHEL6, Fedora < 17: You'll get an error about a "
print "bogus bootproto ITREADTHEKICKSTART. This means anaconda "
print "read our busted kickstart."
else:
print "RHEL7, Fedora >= 17: Chokes on the bogus URI in the early "
print "console screen when fetching the installer squashfs image."
originitrd = distro.initrd
kernel = distro.kernel
newinitrd = originitrd + ".copy"
injectfile = distro.ks
os.system("cp -f %s %s" % (originitrd, newinitrd))
cleanup.append(newinitrd)
_perform_initrd_injections(newinitrd, [injectfile], ".")
nic = distro.virtio and "virtio" or "rtl8139"
append = "-append \"ks=file:/%s\"" % os.path.basename(injectfile)
cmd = ("sudo qemu-kvm -enable-kvm -name %s "
"-cpu host -m 1500 -sdl "
"-net bridge,br=virbr0 -net nic,model=%s "
"-kernel %s -initrd %s %s" %
(distro.name, nic, kernel, newinitrd, append))
print "\n\n" + cmd
os.system(cmd)
_printinitrd = False
_printfetch = False
class FetchTests(unittest.TestCase):
def setUp(self):
global _printfetch
if _printfetch:
return
print """
This is an interactive test.
First step is we need to go and fetch a bunch of distro kernel/initrd
from public trees. This is going to take a while. Let it run then come
back later and we will be waiting to continue.
"""
prompt()
_printfetch = True
class InjectTests(unittest.TestCase):
def setUp(self):
global _printinitrd
if _printinitrd:
return
print """
Okay, we have all the media. We are going to perform the initrd injection
of some broken kickstarts, then manually launch a qemu instance to verify
the kickstart is detected. How you know it's working depends on the distro.
When each test launches, we will print the manual verification instructions.
"""
prompt()
_printinitrd = True
def _make_tests():
def _make_fetch_cb(_d):
return lambda s: _fetch_distro(_d)
def _make_check_cb(_d):
return lambda s: _test_distro(_d)
distros = INITRD_TEST_DISTROS or _alldistros.keys()
idx = 0
for d in distros:
dobj = _alldistros[d]
idx += 1
setattr(FetchTests, "testFetch%.3d" % idx, _make_fetch_cb(dobj))
setattr(InjectTests, "testInitrd%.3d" % idx, _make_check_cb(dobj))
_make_tests()
virt-manager-1.3.2/tests/capabilities.py 0000664 0001751 0001751 00000012043 12627132763 021751 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import os
import unittest
from tests import utils
from virtinst import Capabilities
from virtinst import DomainCapabilities
from virtinst.capabilities import _CPUMapFileValues
conn = utils.open_testdriver()
class TestCapabilities(unittest.TestCase):
def _buildCaps(self, filename):
path = os.path.join("tests/capabilities-xml", filename)
return Capabilities(conn, file(path).read())
def testCapsCPUFeaturesOldSyntax(self):
filename = "test-old-vmx.xml"
host_feature_list = ["vmx"]
caps = self._buildCaps(filename)
for f in host_feature_list:
self.assertEquals(caps.host.cpu.has_feature(f), True)
def testCapsCPUFeaturesOldSyntaxSVM(self):
filename = "test-old-svm.xml"
host_feature_list = ["svm"]
caps = self._buildCaps(filename)
for f in host_feature_list:
self.assertEquals(caps.host.cpu.has_feature(f), True)
def testCapsCPUFeaturesNewSyntax(self):
filename = "test-qemu-with-kvm.xml"
host_feature_list = ['lahf_lm', 'xtpr', 'cx16', 'tm2', 'est', 'vmx',
'ds_cpl', 'pbe', 'tm', 'ht', 'ss', 'acpi', 'ds']
caps = self._buildCaps(filename)
for f in host_feature_list:
self.assertEquals(caps.host.cpu.has_feature(f), True)
self.assertEquals(caps.host.cpu.model, "core2duo")
self.assertEquals(caps.host.cpu.vendor, "Intel")
self.assertEquals(caps.host.cpu.threads, 3)
self.assertEquals(caps.host.cpu.cores, 5)
self.assertEquals(caps.host.cpu.sockets, 7)
def testCapsUtilFuncs(self):
caps_with_kvm = self._buildCaps("test-qemu-with-kvm.xml")
caps_no_kvm = self._buildCaps("test-qemu-no-kvm.xml")
caps_empty = self._buildCaps("test-old-vmx.xml")
def test_utils(caps, has_guests, is_kvm):
if caps.guests:
self.assertEquals(caps.guests[0].has_install_options(), has_guests)
self.assertEquals(caps.guests[0].is_kvm_available(), is_kvm)
test_utils(caps_empty, False, False)
test_utils(caps_with_kvm, True, True)
test_utils(caps_no_kvm, True, False)
def testCapsNuma(self):
cells = self._buildCaps("lxc.xml").host.topology.cells
self.assertEquals(len(cells), 1)
self.assertEquals(len(cells[0].cpus), 8)
self.assertEquals(cells[0].cpus[3].id, '3')
################################################
# Test cpu_map.xml/getCPUModel output handling #
################################################
def _testCPUMap(self, api):
caps = self._buildCaps("test-qemu-with-kvm.xml")
setattr(_CPUMapFileValues, "_cpu_filename",
"tests/capabilities-xml/cpu_map.xml")
setattr(caps, "_force_cpumap", not api)
cpu_64 = caps.get_cpu_values("x86_64")
cpu_32 = caps.get_cpu_values("i486")
cpu_random = caps.get_cpu_values("mips")
def test_cpu_map(cpumap, cpus):
cpunames = sorted(cpumap, key=str.lower)
for c in cpus:
self.assertTrue(c in cpunames)
self.assertEquals(cpu_64, cpu_32)
x86_cpunames = [
'486', 'athlon', 'Conroe', 'core2duo', 'coreduo', 'n270',
'Nehalem', 'Opteron_G1', 'Opteron_G2', 'Opteron_G3', 'Penryn',
'pentium', 'pentium2', 'pentium3', 'pentiumpro', 'phenom',
'qemu32', 'qemu64']
test_cpu_map(cpu_64, x86_cpunames)
test_cpu_map(cpu_random, [])
cpu_64 = caps.get_cpu_values("x86_64")
self.assertTrue(len(cpu_64) > 0)
def testCPUMapFile(self):
self._testCPUMap(api=True)
def testCPUMapAPI(self):
self._testCPUMap(api=False)
##############################
# domcapabilities.py testing #
##############################
def testDomainCapabilities(self):
xml = file("tests/capabilities-xml/test-domcaps.xml").read()
caps = DomainCapabilities(utils.open_testdriver(), xml)
self.assertEqual(caps.os.loader.supported, True)
self.assertEquals(caps.os.loader.get_values(),
["/foo/bar", "/tmp/my_path"])
self.assertEquals(caps.os.loader.enum_names(), ["type", "readonly"])
self.assertEquals(caps.os.loader.get_enum("type").get_values(),
["rom", "pflash"])
if __name__ == "__main__":
unittest.main()
virt-manager-1.3.2/tests/interface.py 0000664 0001751 0001751 00000015301 12575626735 021271 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import os
import unittest
import logging
from virtinst import Interface, InterfaceProtocol
from tests import utils
conn = utils.open_testdriver()
datadir = "tests/interface-xml"
def _m(_n):
xml = conn.interfaceLookupByName(_n).XMLDesc(0)
return Interface(conn, parsexml=xml)
class TestInterfaces(unittest.TestCase):
def build_interface(self, interface_type, name):
iobj = Interface(conn)
iobj.type = interface_type
iobj.name = name
return iobj
def set_general_params(self, iface_obj):
iface_obj.mtu = 1501
iface_obj.macaddr = "AA:AA:AA:AA:AA:AA"
iface_obj.start_mode = Interface.INTERFACE_START_MODE_ONBOOT
proto = InterfaceProtocol(conn)
proto.family = InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV4
iface_obj.add_protocol(proto)
def add_child_interfaces(self, iface_obj):
if iface_obj.type == Interface.INTERFACE_TYPE_BRIDGE:
iface_obj.add_interface(_m("vlaneth1"))
iface_obj.add_interface(_m("bond-brbond"))
iface_obj.add_interface(_m("eth0"))
elif iface_obj.type == Interface.INTERFACE_TYPE_BOND:
iface_obj.add_interface(_m("eth0"))
iface_obj.add_interface(_m("eth1"))
iface_obj.add_interface(_m("eth2"))
def define_xml(self, obj, compare=True):
obj.validate()
xml = obj.get_xml_config()
logging.debug("Defining interface XML:\n%s", xml)
if compare:
filename = os.path.join(datadir, obj.name + ".xml")
utils.diff_compare(xml, filename)
iface = obj.install()
newxml = iface.XMLDesc(0)
logging.debug("Defined XML:\n%s", newxml)
iface.undefine()
# Bridge tests
def testBridgeInterface(self):
filename = "bridge"
obj = self.build_interface(Interface.INTERFACE_TYPE_BRIDGE,
"test-%s" % filename)
self.add_child_interfaces(obj)
obj.stp = False
obj.delay = "7"
self.define_xml(obj)
def testBridgeInterfaceIP(self):
filename = "bridge-ip"
obj = self.build_interface(Interface.INTERFACE_TYPE_BRIDGE,
"test-%s" % filename)
self.add_child_interfaces(obj)
# IPv4 proto
iface_proto1 = InterfaceProtocol(conn)
iface_proto1.family = InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV4
iface_proto1.add_ip("129.63.1.2")
iface_proto1.add_ip("255.255.255.0")
iface_proto1.gateway = "1.2.3.4"
iface_proto1.dhcp = True
iface_proto1.dhcp_peerdns = True
# IPv6 proto
iface_proto2 = InterfaceProtocol(conn)
iface_proto2.family = InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV6
iface_proto2.add_ip("fe99::215:58ff:fe6e:5", prefix="32")
iface_proto2.add_ip("fe80::215:58ff:fe6e:5", prefix="64")
iface_proto2.gateway = "1.2.3.4"
iface_proto2.dhcp = True
iface_proto2.dhcp_peerdns = True
iface_proto2.autoconf = True
obj.add_protocol(iface_proto1)
obj.add_protocol(iface_proto2)
self.define_xml(obj)
# Bond tests
def testBondInterface(self):
filename = "bond"
obj = self.build_interface(Interface.INTERFACE_TYPE_BOND,
"test-%s" % filename)
self.add_child_interfaces(obj)
self.set_general_params(obj)
self.define_xml(obj)
def testBondInterfaceARP(self):
filename = "bond-arp"
obj = self.build_interface(Interface.INTERFACE_TYPE_BOND,
"test-%s" % filename)
self.add_child_interfaces(obj)
self.set_general_params(obj)
obj.arp_interval = 100
obj.arp_target = "192.168.100.200"
obj.arp_validate_mode = "backup"
self.define_xml(obj)
def testBondInterfaceMII(self):
filename = "bond-mii"
obj = self.build_interface(Interface.INTERFACE_TYPE_BOND,
"test-%s" % filename)
self.add_child_interfaces(obj)
self.set_general_params(obj)
obj.mii_frequency = "123"
obj.mii_updelay = "12"
obj.mii_downdelay = "34"
obj.mii_carrier_mode = "netif"
self.define_xml(obj)
# Ethernet tests
def testEthernetInterface(self):
filename = "ethernet"
obj = self.build_interface(Interface.INTERFACE_TYPE_ETHERNET,
"test-%s" % filename)
self.define_xml(obj)
def testEthernetManyParam(self):
filename = "ethernet-params"
obj = self.build_interface(Interface.INTERFACE_TYPE_ETHERNET,
"test-%s" % filename)
obj.mtu = 1234
obj.mac = "AA:BB:FF:FF:BB:AA"
obj.start_mode = Interface.INTERFACE_START_MODE_HOTPLUG
self.define_xml(obj)
# VLAN tests
def testVLANInterface(self):
filename = "vlan"
obj = self.build_interface(Interface.INTERFACE_TYPE_VLAN,
"test-%s" % filename)
obj.tag = "123"
obj.parent_interface = "eth2"
self.define_xml(obj)
def testVLANInterfaceBusted(self):
obj = self.build_interface(Interface.INTERFACE_TYPE_VLAN,
"vlan1")
try:
self.define_xml(obj, compare=False)
assert(False)
except ValueError:
pass
except:
assert(False)
# protocol_xml test
def testEthernetProtocolInterface(self):
filename = "ethernet-copy-proto"
obj = self.build_interface(Interface.INTERFACE_TYPE_ETHERNET,
"test-%s" % filename)
protoxml = (" \n"
" \n"
" \n")
proto = InterfaceProtocol(conn, parsexml=protoxml)
obj.add_protocol(proto)
self.define_xml(obj)
if __name__ == "__main__":
unittest.main()
virt-manager-1.3.2/tests/misc.py 0000664 0001751 0001751 00000007576 12600567720 020266 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import fileinput
import fnmatch
import glob
import imp
import importlib
import os
import sys
import unittest
import xml.etree.ElementTree as ET
_badmodules = ["gi.repository.Gtk", "gi.repository.Gdk"]
def _restore_modules(fn):
def wrap(*args, **kwargs):
origimport = __builtins__["__import__"]
def my_import(name, *iargs, **ikwargs):
if name in _badmodules:
raise AssertionError("Tried to import '%s'" % name)
return origimport(name, *iargs, **ikwargs)
try:
__builtins__["__import__"] = my_import
return fn(*args, **kwargs)
finally:
__builtins__["__import__"] = origimport
return wrap
def _find_py(dirname):
ret = []
for root, ignore, filenames in os.walk(dirname):
for filename in fnmatch.filter(filenames, "*.py"):
ret.append(os.path.join(root, filename))
ret.sort(key=lambda s: s.lower())
return ret
class TestMisc(unittest.TestCase):
"""
Miscellaneous tests
"""
def _check_modules(self, files):
for f in files:
regular_import = f.endswith(".py")
if f.endswith("/__init__.py"):
f = f.rsplit("/", 1)[0]
name = f.rsplit(".", 1)[0].replace("/", ".")
if name in sys.modules:
continue
if regular_import:
importlib.import_module(name)
else:
imp.load_source(name, f)
found = []
for f in _badmodules:
if f in sys.modules:
found.append(f)
if found:
raise AssertionError("%s found in sys.modules" % found)
@_restore_modules
def test_no_gtk_virtinst(self):
"""
Make sure virtinst doesn't pull in any gnome modules
"""
files = ["virt-install", "virt-clone", "virt-convert"]
files += _find_py("virtinst")
files += _find_py("virtconv")
files += _find_py("virtcli")
self._check_modules(files)
def test_ui_minimum_version(self):
failures = []
for filename in glob.glob("ui/*.ui"):
required_version = None
for line in fileinput.input(filename):
# This is much faster than XML parsing the whole file
if not line.strip().startswith(' "
"tag for gtk+, it should say 3.8")
if (int(required_version.split(".")[0]) != 3 or
int(required_version.split(".")[1]) != 8):
failures.append((filename, required_version))
if failures:
raise AssertionError("The following files should require gtk "
"version of gtk-3.8, which is what we target:\n" +
"\n".join([("%s version=%s" % tup) for tup in failures]))
virt-manager-1.3.2/tests/pep8.cfg 0000664 0001751 0001751 00000001003 12575626735 020306 0 ustar crobinso crobinso 0000000 0000000 [pep8]
format = pylint
# E1* : # Continuation line indents
# E203: # Space before : in dictionary defs
# E221: # Multiple spaces before operator
# (warngs about column aligning assigments)
# E241: # Space after , column alignment nono
# E301: # 1 blank line between methods
# E303: # Too many blank lines
# E501: # Line too long
ignore=E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E203,E221,E241,E301,E303,E501
virt-manager-1.3.2/tests/cli-test-xml/ 0000775 0001751 0001751 00000000000 12637033400 021255 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/ 0000775 0001751 0001751 00000000000 12637033400 023127 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/ovf/ 0000775 0001751 0001751 00000000000 12637033400 023721 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/ovf/test1.ovf 0000664 0001751 0001751 00000013457 12575626735 025533 0 ustar crobinso crobinso 0000000 0000000
Virtual disk information
The list of logical networks
The VM Network network
A virtual machine
test.ovf
The kind of installed guest operating system
Red Hat Enterprise Linux 5 (64-bit)
Virtual hardware requirements
Virtual Hardware Family
0
test.ovf
vmx-07
-
hertz * 10^6
Number of Virtual CPUs
1 virtual CPU(s)
1
3
3
-
byte * 2^20
Memory Size
512MB of memory
2
4
777
-
0
SCSI Controller
SCSI controller 0
3
lsilogic
6
-
1
IDE Controller
IDE 1
4
5
-
0
IDE Controller
IDE 0
5
5
-
0
false
Floppy Drive
Floppy drive 1
6
14
-
0
false
CD/DVD Drive 1
7
4
15
-
7
true
VM Network
E1000 ethernet adapter on "VM Network"
Network adapter 1
8
E1000
10
-
0
Hard disk 1
ovf:/disk/vmdisk1
9
3
17
-
1
Hard disk 2
ovf:/file/vmfile1
10
4
17
A human-readable annotation
This is the description, created by RWMJ.
A human-readable annotation
This is the description, created by RWMJ.
virt-manager-1.3.2/tests/cli-test-xml/virtconv/ovf/testfile 0000664 0001751 0001751 00000000000 12575626735 025475 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/ovf/test.ovf-disk1.vmdk 0000664 0001751 0001751 00000000000 12575626735 027377 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/vmx/ 0000775 0001751 0001751 00000000000 12637033400 023741 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/vmx/root.raw 0000664 0001751 0001751 00000000000 12572100216 025423 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/vmx/data.raw 0000664 0001751 0001751 00000000000 12572100216 025351 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/virtconv/vmx/test1.vmx 0000664 0001751 0001751 00000003033 12572100216 025532 0 ustar crobinso crobinso 0000000 0000000
#!/usr/bin/vmplayer
# Generated by setup.py
# http://virt-manager.org/
# This is a Workstation 5 or 5.5 config file and can be used with Player
config.version = "8"
virtualHW.version = "4"
guestOS = "other"
displayName = "test-image"
annotation = "None"
guestinfo.vmware.product.long = "test-image"
guestinfo.vmware.product.url = "http://virt-manager.org/"
guestinfo.vmware.product.class = "virtual machine"
numvcpus = "7"
memsize = "256"
MemAllowAutoScaleDown = "FALSE"
MemTrimRate = "-1"
uuid.action = "create"
tools.remindInstall = "TRUE"
hints.hideAll = "TRUE"
tools.syncTime = "TRUE"
serial0.present = "FALSE"
serial1.present = "FALSE"
parallel0.present = "FALSE"
logging = "TRUE"
log.fileName = "test-image.log"
log.append = "TRUE"
log.keepOld = "3"
isolation.tools.hgfs.disable = "FALSE"
isolation.tools.dnd.disable = "FALSE"
isolation.tools.copy.enable = "TRUE"
isolation.tools.paste.enabled = "TRUE"
floppy0.present = "FALSE"
# IDE disk
ide0:0.present = "TRUE"
ide0:0.fileName = "root.raw"
ide0:0.mode = "persistent"
ide0:0.startConnected = "TRUE"
ide0:0.writeThrough = "TRUE"
# IDE disk
ide0:1.present = "TRUE"
ide0:1.fileName = "data.raw"
ide0:1.mode = "persistent"
ide0:1.startConnected = "TRUE"
ide0:1.writeThrough = "TRUE"
# IDE disk
ide1:0.present = "TRUE"
ide1:0.fileName = "scratch.raw"
ide1:0.mode = "persistent"
ide1:0.startConnected = "TRUE"
ide1:0.writeThrough = "TRUE"
ethernet0.present = "TRUE"
ethernet0.connectionType = "nat"
ethernet0.addressType = "generated"
ethernet0.generatedAddressOffset = "0"
ethernet0.autoDetect = "TRUE"
virt-manager-1.3.2/tests/cli-test-xml/virtconv/vmx/scratch.raw 0000664 0001751 0001751 00000000000 12572100216 026067 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/clone-disk-managed.xml 0000664 0001751 0001751 00000001225 12575626735 025445 0 ustar crobinso crobinso 0000000 0000000
origtest
db69fa1f-eef0-e567-3c20-3ef16f10376b
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/cli-test-xml/clone-disk.xml 0000664 0001751 0001751 00000001677 12572100216 024040 0 ustar crobinso crobinso 0000000 0000000
origtest
db69fa1f-eef0-e567-3c20-3ef16f10376b
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/cli-test-xml/clone-disk-noexist.xml 0000664 0001751 0001751 00000001711 12572100216 025514 0 ustar crobinso crobinso 0000000 0000000
test-clone-noexist
204800
409600
abcd5678-1234-1234-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/ 0000775 0001751 0001751 00000000000 12637033400 024004 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/ 0000775 0001751 0001751 00000000000 12637033400 025251 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/boot.iso 0000664 0001751 0001751 00000000010 12572100216 026715 0 ustar crobinso crobinso 0000000 0000000 testiso
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12637033400 026731 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/pxeboot/initrd.img 0000664 0001751 0001751 00000000013 12572100216 030710 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/pxeboot/vmlinuz 0000664 0001751 0001751 00000000014 12572100216 030351 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/xen/ 0000775 0001751 0001751 00000000000 12637033400 026043 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/xen/initrd.img 0000664 0001751 0001751 00000000013 12572100216 030022 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/images/xen/vmlinuz 0000664 0001751 0001751 00000000014 12572100216 027463 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virt-manager-1.3.2/tests/cli-test-xml/fakerhel6tree/.treeinfo 0000664 0001751 0001751 00000003161 12572100216 025617 0 ustar crobinso crobinso 0000000 0000000 [addon-ClusteredStorage]
repository = ClusteredStorage
name = Clustered Storage
identity = ClusteredStorage/ClusteredStorage.cert
[images-x86_64]
initrd = images/pxeboot/initrd.img
boot.iso = images/boot.iso
kernel = images/pxeboot/vmlinuz
[general]
family = Red Hat Enterprise Linux
timestamp = 1279616972.112428
variant = Server
totaldiscs = 1
version = 6.0
discnum = 1
packagedir = Packages
variants = Server
arch = x86_64
[addon-LargeFileSystem]
repository = LargeFileSystem
name = Large Filesystem Support
identity = LargeFileSystem/LargeFileSystem.cert
[addon-LoadBalance]
repository = LoadBalance
name = Load Balance
identity = LoadBalance/LoadBalance.cert
[images-xen]
initrd = images/pxeboot/initrd.img
kernel = images/pxeboot/vmlinuz
[variant-Server]
addons = ClusteredStorage,HighAvailability,LargeFileSystem,LoadBalance
repository = Server/repodata
identity = Server/Server.cert
[addon-HighAvailability]
repository = HighAvailability
name = High Availability
identity = HighAvailability/HighAvailability.cert
[checksums]
images/pxeboot/initrd.img = sha256:40fda5e693f1f446623a6d94e0f89d7ec8963f096bf1613a6e0d22ae3efbee04
images/efiboot.img = sha256:ab891e10ad69408659bb710a1469b08db681cad96ef4b61635a32c2ffc711aa4
images/boot.iso = sha256:56e92c567fee183f83f30d1d001b4237ff27de74803f0ced827ec461e51b9608
images/pxeboot/vmlinuz = sha256:4bea4f88b26302d4cf095ef1fe6a0f0c064f2131b7d1b6460f30d03d08905336
images/install.img = sha256:4eb68c16b34da7165e23715a3bc5250edc7cc0bc1d3d04b0f3131724481390fa
images/efidisk.img = sha256:15faa40fe22e9797b2bd76c065e1f258848d007e901ff315aa44c4637b74024e
[stage2]
mainimage = images/install.img
virt-manager-1.3.2/tests/cli-test-xml/compare/ 0000775 0001751 0001751 00000000000 12637033400 022703 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-idmap.xml 0000664 0001751 0001751 00000000635 12625404144 030521 0 ustar crobinso crobinso 0000000 0000000 /usr/lib/xen/boot/hvmloader
-
-
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-pm.xml 0000664 0001751 0001751 00000000552 12625404145 030042 0 ustar crobinso crobinso 0000000 0000000 restart
restart
-
+
+
/usr/lib/xen/bin/qemu-dm
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-clock.xml 0000664 0001751 0001751 00000001127 12625404145 030520 0 ustar crobinso crobinso 0000000 0000000
-
-
+
+
-
+
+
destroy
restart
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-cpu.xml 0000664 0001751 0001751 00000001407 12625404144 030214 0 ustar crobinso crobinso 0000000 0000000
- core2duo
+ pentium2
Intel
-
+
@@
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-qemu-plain.xml 0000664 0001751 0001751 00000003402 12627132763 030135 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Penryn
destroy
restart
restart
/usr/bin/qemu-system-x86_64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-build-blkiotune.xml 0000664 0001751 0001751 00000000172 12627132763 030311 0 ustar crobinso crobinso 0000000 0000000
100
/dev/sdf
200
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-cpuset-auto.xml 0000664 0001751 0001751 00000004264 12627132763 030345 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
2
hvm
destroy
destroy
destroy
/usr/bin/test-hv
foobar
00000000-1111-2222-3333-444444444444
65536
65536
2
hvm
destroy
restart
restart
/usr/bin/test-hv
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-metadata.xml 0000664 0001751 0001751 00000001254 12627132763 031214 0 ustar crobinso crobinso 0000000 0000000
- test-for-virtxml
- 12345678-12f4-1234-1234-123456789012
- Test VM for virtxml cli tests
-
+ foo-my-new-name
+ 12345678-12F4-1234-1234-123456789AFA
+ hey this is my
+new
+very,very=new desc'
409600
204800
@@
+ This is my,funky=new title
Domain 'foo-my-new-name' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-stdin-edit.xml 0000664 0001751 0001751 00000000750 12625404142 027255 0 ustar crobinso crobinso 0000000 0000000
test
6695eb01-f6a4-8304-79aa-97f2502e193f
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-rhel7.xml 0000664 0001751 0001751 00000010170 12627132763 027701 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-print-xml.xml 0000664 0001751 0001751 00000000700 12625404142 027136 0 ustar crobinso crobinso 0000000 0000000
test
4a64cc71-19c4-2fd0-2323-3050941ea3c3
8388608
2097152
7
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-location-iso.xml 0000664 0001751 0001751 00000007056 12627132763 030476 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/tmp/virtinst-vmlinuz.
/tmp/virtinst-initrd.img.
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-all.xml 0000664 0001751 0001751 00000001064 12625404152 026704 0 ustar crobinso crobinso 0000000 0000000
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-test-url-detection.xml 0000664 0001751 0001751 00000000005 12625404127 031606 0 ustar crobinso crobinso 0000000 0000000 linux virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-bootorder.xml 0000664 0001751 0001751 00000000134 12625404143 030130 0 ustar crobinso crobinso 0000000 0000000 Domain 'test' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-ppc64le-kvm-import.xml 0000664 0001751 0001751 00000001766 12637017152 031453 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/libexec/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-clear-disk.xml 0000664 0001751 0001751 00000000767 12627132763 030173 0 ustar crobinso crobinso 0000000 0000000
/usr/lib/xen/bin/qemu-dm
-
-
+
-
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-filesystem.xml 0000664 0001751 0001751 00000001117 12625404151 031605 0 ustar crobinso crobinso 0000000 0000000
-
+
-
-
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-many-devices.xml 0000664 0001751 0001751 00000025141 12627132763 030455 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
4
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
WD-WMAP9A966149
1
5
10
2
6
20
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-soundhw.xml 0000664 0001751 0001751 00000000547 12625404151 031116 0 ustar crobinso crobinso 0000000 0000000
-
+
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-serial.xml 0000664 0001751 0001751 00000000506 12625404150 030700 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-add-disk-create-storage.xml 0000664 0001751 0001751 00000000606 12627132763 031605 0 ustar crobinso crobinso 0000000 0000000
+
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-arm-kvm-import.xml 0000664 0001751 0001751 00000002027 12627132763 030751 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-default.xml 0000664 0001751 0001751 00000001104 12625404136 027500 0 ustar crobinso crobinso 0000000 0000000
foolxc
00000000-1111-2222-3333-444444444444
65536
65536
1
exe
/bin/sh
destroy
restart
restart
/usr/libexec/libvirt_lxc
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-singleton-config-1.xml 0000664 0001751 0001751 00000004123 12627132763 031471 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
foobar & baz
1048576
1048576
4
hvm
/usr/share/OVMF/OVMF_CODE.fd
destroy
restart
restart
/virtualmachines/production
/usr/bin/qemu-kvm
/dev/random
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-f14-url.xml 0000664 0001751 0001751 00000006660 12627132763 030063 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/tmp/virtinst-vmlinuz.
/tmp/virtinst-initrd.img.
method=tests/cli-test-xml/faketree console=ttyS0
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-xen-hvm.xml 0000664 0001751 0001751 00000002234 12627132763 027451 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
/usr/lib64/xen/bin/qemu-dm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-channel.xml 0000664 0001751 0001751 00000000547 12625404150 031036 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-video.xml 0000664 0001751 0001751 00000000547 12625404151 030535 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-smartcard.xml 0000664 0001751 0001751 00000000553 12625404147 031411 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-xen-default.xml 0000664 0001751 0001751 00000001377 12627132763 030312 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
/usr/bin/pygrub
destroy
restart
restart
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-remove-sound-model.xml 0000664 0001751 0001751 00000000500 12625404155 030727 0 ustar crobinso crobinso 0000000 0000000
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-build-tpm.xml 0000664 0001751 0001751 00000000147 12625404143 027107 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-ppc64-pseries-f20.xml 0000664 0001751 0001751 00000002220 12627132763 031053 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-system-ppc64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-arm-vexpress-f19.xml 0000664 0001751 0001751 00000002124 12627132763 031116 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0,1234 rw root=/dev/vda3
/f19-arm.dtb
destroy
restart
restart
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-remove-disk-path.xml 0000664 0001751 0001751 00000001000 12625404156 030362 0 ustar crobinso crobinso 0000000 0000000
/usr/lib/xen/bin/qemu-dm
-
-
-
-
-
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown.virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-redirdev.xml 0000664 0001751 0001751 00000000724 12625404147 031235 0 ustar crobinso crobinso 0000000 0000000
-
-
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-remove-video-all.xml 0000664 0001751 0001751 00000000703 12625404156 030363 0 ustar crobinso crobinso 0000000 0000000
-
-
-
-
-
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-ppc64-machdefault-f20.xml 0000664 0001751 0001751 00000002220 12627132763 031656 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-system-ppc64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-clone-clone-auto2.xml 0000664 0001751 0001751 00000002111 12625404105 027631 0 ustar crobinso crobinso 0000000 0000000
newvm
00000000-1111-2222-3333-444444444444
409600
204800
5
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-rhel6.xml 0000664 0001751 0001751 00000010170 12627132763 027700 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-simple-pxe.xml 0000664 0001751 0001751 00000004222 12627132763 030151 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
destroy
destroy
/usr/bin/test-hv
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/test-hv
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-add-disk-notarget.xml 0000664 0001751 0001751 00000000612 12627132763 030520 0 ustar crobinso crobinso 0000000 0000000
+
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-aarch64-machdefault.xml 0000664 0001751 0001751 00000002071 12627132763 031571 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0,1234 rw root=/dev/vda3
cortex-a57
destroy
restart
restart
/usr/bin/qemu-system-aarch64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-pos-num.xml 0000664 0001751 0001751 00000000534 12625404152 027533 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-network.xml 0000664 0001751 0001751 00000001034 12625404146 031114 0 ustar crobinso crobinso 0000000 0000000
-
-
-
+
+
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-q35-defaults.xml 0000664 0001751 0001751 00000010201 12627132763 030275 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-clear-cpu.xml 0000664 0001751 0001751 00000002153 12627132763 030017 0 ustar crobinso crobinso 0000000 0000000
-
- core2duo
- Intel
-
-
-
-
-
-
-
-
-
-
-
-
-
-
@@
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-numatune.xml 0000664 0001751 0001751 00000000563 12625404144 031263 0 ustar crobinso crobinso 0000000 0000000
9
-
+
hvm
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-clear-clock.xml 0000664 0001751 0001751 00000001131 12627132763 030316 0 ustar crobinso crobinso 0000000 0000000
-
-
-
-
-
destroy
restart
restart
@@
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-blkiotune.xml 0000664 0001751 0001751 00000000670 12625404144 031422 0 ustar crobinso crobinso 0000000 0000000 409600
204800
- 100
+ 500
- /dev/sdd
- 200
+ /dev/sdf
+ 600
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-qemu-32-on-64.xml 0000664 0001751 0001751 00000002650 12625404130 030107 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-convert-ovf-compare.xml 0000664 0001751 0001751 00000004163 12627132763 030322 0 ustar crobinso crobinso 0000000 0000000
test.ovf
00000000-1111-2222-3333-444444444444
This is the description, created by RWMJ.
795648
795648
3
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-singleton-config-2.xml 0000664 0001751 0001751 00000015633 12627132763 031502 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
my-title
my-description
1048576
524288
100
/home/test/1.img
200
10
20
30
40
4
hvm
/foo/bar
foobar
meee
destroy
destroy
destroy
/virtualmachines/production
/usr/bin/qemu-kvm
ignore
foobar
00000000-1111-2222-3333-444444444444
my-title
my-description
1048576
524288
100
/home/test/1.img
200
10
20
30
40
4
hvm
/foo/bar
foobar
meee
destroy
restart
preserve
/virtualmachines/production
/usr/bin/qemu-kvm
ignore
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-build-idmap.xml 0000664 0001751 0001751 00000000151 12627132763 027404 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-add-disk-basic.xml 0000664 0001751 0001751 00000000627 12627132763 027764 0 ustar crobinso crobinso 0000000 0000000
+
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-aarch64-kvm-import.xml 0000664 0001751 0001751 00000002155 12627132763 031424 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/usr/share/AAVMF/AAVMF_CODE.fd
destroy
restart
restart
/usr/bin/qemu-system-aarch64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-arm-defaultmach-f20.xml 0000664 0001751 0001751 00000002152 12627132763 031505 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0,1234 rw root=/dev/vda3
destroy
restart
restart
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-win2k3-cdrom.xml 0000664 0001751 0001751 00000013503 12627132763 031102 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-s390x-cdrom.xml 0000664 0001751 0001751 00000002074 12627132763 030061 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/kernel.img
/initrd.img
destroy
restart
restart
/usr/bin/qemu-system-s390x
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-prompt-response.xml 0000664 0001751 0001751 00000000443 12625404143 030366 0 ustar crobinso crobinso 0000000 0000000 --- Original XML
+++ Altered XML
@@ -14,4 +14,5 @@
destroy
+
Define 'test' with the changed XML? (y/n): Domain 'test' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-add-sound.xml 0000664 0001751 0001751 00000000441 12627132763 027075 0 ustar crobinso crobinso 0000000 0000000
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-features.xml 0000664 0001751 0001751 00000000616 12625404145 031245 0 ustar crobinso crobinso 0000000 0000000
-
-
+
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-disk.xml 0000664 0001751 0001751 00000001037 12625404146 030360 0 ustar crobinso crobinso 0000000 0000000
/usr/lib/xen/bin/qemu-dm
-
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-aarch64-cdrom.xml 0000664 0001751 0001751 00000004272 12627132763 030425 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
CODE.fd
restart
destroy
destroy
/usr/bin/qemu-system-aarch64
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
CODE.fd
restart
destroy
preserve
/usr/bin/qemu-system-aarch64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-xen-pv.xml 0000664 0001751 0001751 00000003234 12627132763 027305 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
linux
/tmp/virtinst-vmlinuz.
/tmp/virtinst-initrd.img.
method=tests/cli-test-xml/faketree
destroy
destroy
destroy
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
/usr/bin/pygrub
destroy
restart
restart
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-neg-num.xml 0000664 0001751 0001751 00000000566 12625404152 027510 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-memballoon.xml 0000664 0001751 0001751 00000000567 12625404150 031555 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-build-cpu.xml 0000664 0001751 0001751 00000000155 12627132763 027105 0 ustar crobinso crobinso 0000000 0000000
pentium3
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-remove-hostdev-name.xml 0000664 0001751 0001751 00000000765 12625404156 031111 0 ustar crobinso crobinso 0000000 0000000
-
-
-
-
-
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-memory.xml 0000664 0001751 0001751 00000001162 12625404143 030732 0 ustar crobinso crobinso 0000000 0000000 12345678-12f4-1234-1234-123456789012
Test VM for virtxml cli tests
- 409600
- 204800
+ 1024000
+ 512000
100
@@
-
9
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-arm-virt-f20.xml 0000664 0001751 0001751 00000002152 12627132763 030214 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0,1234 rw root=/dev/vda3
destroy
restart
restart
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-parallel.xml 0000664 0001751 0001751 00000000567 12625404150 031224 0 ustar crobinso crobinso 0000000 0000000
-
-
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-rng.xml 0000664 0001751 0001751 00000000662 12625404147 030220 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-graphics.xml 0000664 0001751 0001751 00000000613 12625404146 031225 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-tpm.xml 0000664 0001751 0001751 00000000501 12625404147 030222 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-manual-init.xml 0000664 0001751 0001751 00000001113 12625404137 030273 0 ustar crobinso crobinso 0000000 0000000
foolxc
00000000-1111-2222-3333-444444444444
65536
65536
1
exe
/usr/bin/httpd
destroy
restart
restart
/usr/libexec/libvirt_lxc
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-remove-disk-index.xml 0000664 0001751 0001751 00000001174 12625404156 030551 0 ustar crobinso crobinso 0000000 0000000 50
-
-
-
-
-
-
-
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-select-sound-model.xml 0000664 0001751 0001751 00000000534 12625404152 031640 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-aarch64-machvirt.xml 0000664 0001751 0001751 00000002071 12627132763 031131 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0,1234 rw root=/dev/vda3
cortex-a57
destroy
restart
restart
/usr/bin/qemu-system-aarch64
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-console.xml 0000664 0001751 0001751 00000000544 12627132763 031077 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-win7-uefi.xml 0000664 0001751 0001751 00000015012 12627132763 027677 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
CODE.fd
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
CODE.fd
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
CODE.fd
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-add-host-device.xml 0000664 0001751 0001751 00000000655 12627132763 030166 0 ustar crobinso crobinso 0000000 0000000
+
+
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-security.xml 0000664 0001751 0001751 00000000556 12627132763 031307 0 ustar crobinso crobinso 0000000 0000000
-
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-clone-clone-auto1.xml 0000664 0001751 0001751 00000005274 12627132763 027657 0 ustar crobinso crobinso 0000000 0000000
test-for-clone1
00000000-1111-2222-3333-444444444444
409600
204800
5
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-s390x-cdrom-KVMIBM.xml 0000664 0001751 0001751 00000002142 12627132763 031040 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/kernel.img
/initrd.img
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-watchdog.xml 0000664 0001751 0001751 00000000635 12625404147 031232 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-w2k3-cdrom.xml 0000664 0001751 0001751 00000007361 12627132763 027765 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
4
hvm
destroy
destroy
destroy
/usr/bin/test-hv
foobar
00000000-1111-2222-3333-444444444444
65536
65536
4
hvm
destroy
destroy
destroy
/usr/bin/test-hv
foobar
00000000-1111-2222-3333-444444444444
65536
65536
4
hvm
destroy
restart
restart
/usr/bin/test-hv
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-host-device.xml 0000664 0001751 0001751 00000000705 12625404151 031635 0 ustar crobinso crobinso 0000000 0000000
-
-
+
+
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-events.xml 0000664 0001751 0001751 00000000463 12625404143 030731 0 ustar crobinso crobinso 0000000 0000000
destroy
restart
- restart
+ preserve
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-arm-vexpress-plain.xml 0000664 0001751 0001751 00000001661 12627132763 031627 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/f19-arm.kernel
/f19-arm.initrd
console=ttyAMA0 rw root=/dev/mmcblk0p3
/f19-arm.dtb
destroy
restart
restart
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-select-disk-target.xml 0000664 0001751 0001751 00000000623 12625404152 031627 0 ustar crobinso crobinso 0000000 0000000
-
+
5242880
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-centos7.xml 0000664 0001751 0001751 00000010170 12627132763 030242 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-disk-remove-path.xml 0000664 0001751 0001751 00000000573 12625404146 032611 0 ustar crobinso crobinso 0000000 0000000
/usr/lib/xen/bin/qemu-dm
-
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-select-disk-path.xml 0000664 0001751 0001751 00000000724 12625404152 031277 0 ustar crobinso crobinso 0000000 0000000
-
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-kvm-session-defaults.xml 0000664 0001751 0001751 00000010603 12627132763 032151 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-xml-edit-simple-vcpus.xml 0000664 0001751 0001751 00000001214 12625404144 030561 0 ustar crobinso crobinso 0000000 0000000
- 9
+ 20
@@
+
Domain 'test-for-virtxml' defined successfully.
Changes will take effect after the next domain shutdown. virt-manager-1.3.2/tests/cli-test-xml/compare/virt-install-f21-kvm-remote.xml 0000664 0001751 0001751 00000004000 12627132763 030534 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/compare/virt-convert-vmx-compare.xml 0000664 0001751 0001751 00000003776 12627132763 030353 0 ustar crobinso crobinso 0000000 0000000
fedora
00000000-1111-2222-3333-444444444444
524288
524288
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/ 0000775 0001751 0001751 00000000000 12637033400 024224 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/ 0000775 0001751 0001751 00000000000 12637033400 025471 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/boot.iso 0000664 0001751 0001751 00000000010 12572100216 027135 0 ustar crobinso crobinso 0000000 0000000 testiso
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12637033400 027151 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/pxeboot/initrd.img 0000664 0001751 0001751 00000000013 12572100216 031130 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/pxeboot/vmlinuz 0000664 0001751 0001751 00000000014 12572100216 030571 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/xen/ 0000775 0001751 0001751 00000000000 12637033400 026263 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/xen/initrd.img 0000664 0001751 0001751 00000000013 12572100216 030242 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/images/xen/vmlinuz 0000664 0001751 0001751 00000000014 12572100216 027703 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virt-manager-1.3.2/tests/cli-test-xml/fakefedoratree/.treeinfo 0000664 0001751 0001751 00000001635 12572100216 026043 0 ustar crobinso crobinso 0000000 0000000 [general]
family = Fedora
timestamp = 1329856240.07
variant = Fedora
version = 17
packagedir =
arch = x86_64
[stage2]
mainimage = LiveOS/squashfs.img
[images-x86_64]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
boot.iso = images/boot.iso
[images-xen]
kernel = images/pxeboot/vmlinuz
initrd = images/pxeboot/initrd.img
[checksums]
images/boot.iso = sha256:a3c57709481b7bdc5fab8d5bd4a58aadbbf92df6cfe4bfafdebb280bf3de4a68
images/macboot.img = sha256:1022a1750882d731c27e096e5541a961290356d2faae8533757172454b59b64f
images/efiboot.img = sha256:7a8214df0627ee0116eb32c8462a0a71bc2f31b1e4a7a6d1fea497eae330d66b
images/pxeboot/initrd.img = sha256:dfb445af75d8a5e1f2ac1a021caf3854f96b6bbea249a3b37ea7929bdcad10a8
images/pxeboot/vmlinuz = sha256:dba59f0711ec8a2ef6b8981be15286ee2ea4d9b9e4d66eec0bb27b0518d463a5
repodata/repomd.xml = sha256:26f1267b3cce890db94129993e722f0fbe760361d0096b1399328ecd2c210d74
virt-manager-1.3.2/tests/cli-test-xml/virtxml-stdin-edit.xml 0000664 0001751 0001751 00000000710 12575626735 025570 0 ustar crobinso crobinso 0000000 0000000
test
6695eb01-f6a4-8304-79aa-97f2502e193f
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/cli-test-xml/faketree/ 0000775 0001751 0001751 00000000000 12637033400 023043 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/ 0000775 0001751 0001751 00000000000 12637033400 024310 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/boot.iso 0000664 0001751 0001751 00000000010 12572100216 025754 0 ustar crobinso crobinso 0000000 0000000 testiso
virt-manager-1.3.2/tests/cli-test-xml/faketree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12637033400 025770 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/pxeboot/initrd.img 0000664 0001751 0001751 00000000000 12572100216 027743 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/pxeboot/vmlinuz 0000664 0001751 0001751 00000000000 12572100216 027403 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/xen/ 0000775 0001751 0001751 00000000000 12637033400 025102 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/cli-test-xml/faketree/images/xen/initrd.img 0000664 0001751 0001751 00000000013 12572100216 027061 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virt-manager-1.3.2/tests/cli-test-xml/faketree/images/xen/vmlinuz 0000664 0001751 0001751 00000000014 12572100216 026522 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virt-manager-1.3.2/tests/capabilities-xml/ 0000775 0001751 0001751 00000000000 12637033400 022162 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/capabilities-xml/lxc.xml 0000664 0001751 0001751 00000003411 12600567720 023500 0 ustar crobinso crobinso 0000000 0000000
39303242-3334-3636-3341-3745ffffffff
x86_64
16414548
4103637
0
|
selinux
0
system_u:system_r:svirt_lxc_net_t:s0
exe
64
/usr/libexec/libvirt_lxc
exe
32
/usr/libexec/libvirt_lxc
virt-manager-1.3.2/tests/capabilities-xml/cpu_map.xml 0000664 0001751 0001751 00000041533 12572100216 024334 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/capabilities-xml/test-qemu-no-kvm.xml 0000664 0001751 0001751 00000011367 12600567720 026054 0 ustar crobinso crobinso 0000000 0000000
x86_64
core2duo
tcp
|
qemuStacked
hvm
32
/usr/bin/qemu
pc-0.12
pc
pc-0.11
pc-0.10
isapc
hvm
64
/usr/bin/qemu-system-x86_64
pc-0.12
pc
pc-0.11
pc-0.10
isapc
hvm
32
/usr/bin/qemu-system-arm
integratorcp
syborg
musicpal
mainstone
n800
n810
cheetah
sx1
sx1-v1
tosa
akita
spitz
borzoi
terrier
connex
verdex
lm3s811evb
lm3s6965evb
realview-eb
realview-eb-mpcore
realview-pb-a8
realview-pbx-a9
versatilepb
versatileab
hvm
32
/usr/bin/qemu-system-mips
malta
mipssim
magnum
pica61
mips
hvm
32
/usr/bin/qemu-system-mipsel
malta
mipssim
magnum
pica61
mips
hvm
32
/usr/bin/qemu-system-sparc
SS-5
SS-10
SS-600MP
SS-20
Voyager
LX
SS-4
SPARCClassic
SPARCbook
SS-1000
SS-2000
SS-2
hvm
32
/usr/bin/qemu-system-ppc
g3beige
mpc8544ds
bamboo
ref405ep
taihu
mac99
prep
virt-manager-1.3.2/tests/capabilities-xml/kvm-aarch64.xml 0000664 0001751 0001751 00000007367 12600567720 024753 0 ustar crobinso crobinso 0000000 0000000
25ef0280-ec82-42b0-8fb6-10adccc67c02
aarch64
host
tcp
rdma
16647424
|
selinux
0
system_u:system_r:svirt_t:s0
system_u:system_r:svirt_tcg_t:s0
dac
0
+107:+107
+107:+107
hvm
64
/usr/bin/qemu-system-aarch64
virt
integratorcp
nuri
verdex
smdkc210
collie
spitz
realview-eb
realview-pbx-a9
versatilepb
realview-pb-a8
musicpal
z2
akita
kzm
realview-eb-mpcore
sx1
sx1-v1
cubieboard
highbank
netduino2
terrier
n810
mainstone
midway
cheetah
tosa
vexpress-a15
borzoi
versatileab
lm3s6965evb
n800
connex
vexpress-a9
xilinx-zynq-a9
canon-a1100
lm3s811evb
/usr/bin/qemu-system-aarch64
virt-manager-1.3.2/tests/capabilities-xml/kvm-armv7l.xml 0000664 0001751 0001751 00000006607 12600567720 024727 0 ustar crobinso crobinso 0000000 0000000
06bf8e5a-b512-4782-abbc-1ab7b6f008f4
armv7l
host
tcp
rdma
2064964
|
selinux
0
system_u:system_r:svirt_t:s0
system_u:system_r:svirt_tcg_t:s0
dac
0
+107:+107
+107:+107
hvm
32
/usr/bin/qemu-system-arm
integratorcp
nuri
verdex
smdkc210
collie
virt
spitz
realview-pbx-a9
realview-eb
versatilepb
realview-pb-a8
musicpal
z2
akita
kzm
realview-eb-mpcore
sx1
sx1-v1
cubieboard
highbank
terrier
n810
mainstone
midway
cheetah
tosa
borzoi
versatileab
lm3s6965evb
n800
connex
xilinx-zynq-a9
vexpress-a9
vexpress-a15
canon-a1100
lm3s811evb
/usr/bin/qemu-system-arm
virt-manager-1.3.2/tests/capabilities-xml/xen-rhel5.4.xml 0000664 0001751 0001751 00000003524 12600567720 024670 0 ustar crobinso crobinso 0000000 0000000
x86_64
xenmigr
|
xen
64
/usr/lib64/xen/bin/qemu-dm
xenpv
xen
32
/usr/lib64/xen/bin/qemu-dm
xenpv
hvm
32
/usr/lib64/xen/bin/qemu-dm
/usr/lib/xen/boot/hvmloader
xenfv
hvm
64
/usr/lib64/xen/bin/qemu-dm
/usr/lib/xen/boot/hvmloader
xenfv
virt-manager-1.3.2/tests/capabilities-xml/test-old-vmx.xml 0000664 0001751 0001751 00000000775 12600567720 025267 0 ustar crobinso crobinso 0000000 0000000
x86_64
xenmigr
|
virt-manager-1.3.2/tests/capabilities-xml/kvm-x86_64-rhel7.xml 0000664 0001751 0001751 00000007464 12600567720 025476 0 ustar crobinso crobinso 0000000 0000000
b1517723-d556-41ee-8f77-ef18afe127d1
x86_64
qemu64
AMD
tcp
4193900
|
selinux
0
dac
0
hvm
32
/usr/libexec/qemu-kvm
pc
q35
rhel6.0.0
rhel6.1.0
rhel6.2.0
rhel6.3.0
rhel6.4.0
rhel6.5.0
none
/usr/libexec/qemu-kvm
hvm
64
/usr/libexec/qemu-kvm
pc
q35
rhel6.0.0
rhel6.1.0
rhel6.2.0
rhel6.3.0
rhel6.4.0
rhel6.5.0
none
/usr/libexec/qemu-kvm
virt-manager-1.3.2/tests/capabilities-xml/test-old-svm.xml 0000664 0001751 0001751 00000000773 12600567720 025260 0 ustar crobinso crobinso 0000000 0000000
x86_64
xenmigr
|
virt-manager-1.3.2/tests/capabilities-xml/kvm-x86_64-domcaps.xml 0000664 0001751 0001751 00000002774 12600567720 026102 0 ustar crobinso crobinso 0000000 0000000
/bin/qemu-system-x86_64
kvm
pc-i440fx-2.1
x86_64
/usr/share/AAVMF/AAVMF_CODE.fd
/usr/share/OVMF/OVMF_CODE.fd
rom
pflash
yes
no
disk
cdrom
floppy
lun
ide
fdc
scsi
virtio
usb
subsystem
default
mandatory
requisite
optional
usb
pci
scsi
default
kvm
vfio
virt-manager-1.3.2/tests/capabilities-xml/kvm-s390x-KVMIBM.xml 0000664 0001751 0001751 00000005317 12627132763 025371 0 ustar crobinso crobinso 0000000 0000000
b53b15d6-348a-4620-afd3-81278b81fbd7
s390x
host
tcp
rdma
3911020
|
selinux
0
system_u:system_r:svirt_t:s0
system_u:system_r:svirt_tcg_t:s0
dac
0
+107:+107
+107:+107
hvm
64
/usr/bin/qemu-system-s390x
s390-ccw-kvmibm-1.1.1
s390-ccw-virtio
s390-ccw-kvmibm-1.1.0
s390-virtio
s390
s390-ccw-virtio-2.4
/usr/bin/qemu-system-s390x
/usr/bin/qemu-kvm
s390-ccw-kvmibm-1.1.1
s390-ccw-virtio
s390-ccw-kvmibm-1.1.0
s390-virtio
s390
s390-ccw-virtio-2.4
virt-manager-1.3.2/tests/capabilities-xml/test-qemu-with-kvm.xml 0000664 0001751 0001751 00000014007 12600567720 026405 0 ustar crobinso crobinso 0000000 0000000
x86_64
core2duo
Intel
tcp
|
qemuStacked
hvm
32
/usr/bin/qemu
pc-0.12
pc
pc-0.11
pc-0.10
isapc
/usr/bin/qemu-kvm
pc-0.12
pc
pc-0.11
pc-0.10
isapc
hvm
64
/usr/bin/qemu-system-x86_64
pc-0.12
pc
pc-0.11
pc-0.10
isapc
/usr/bin/qemu-kvm
pc-0.12
pc
pc-0.11
pc-0.10
isapc
hvm
32
/usr/bin/qemu-system-arm
integratorcp
syborg
musicpal
mainstone
n800
n810
cheetah
sx1
sx1-v1
tosa
akita
spitz
borzoi
terrier
connex
verdex
lm3s811evb
lm3s6965evb
realview-eb
realview-eb-mpcore
realview-pb-a8
realview-pbx-a9
versatilepb
versatileab
hvm
32
/usr/bin/qemu-system-mips
malta
mipssim
magnum
pica61
mips
hvm
32
/usr/bin/qemu-system-mipsel
malta
mipssim
magnum
pica61
mips
hvm
32
/usr/bin/qemu-system-sparc
SS-5
SS-10
SS-600MP
SS-20
Voyager
LX
SS-4
SPARCClassic
SPARCbook
SS-1000
SS-2000
SS-2
hvm
32
/usr/bin/qemu-system-ppc
g3beige
mpc8544ds
bamboo
ref405ep
taihu
mac99
prep
xen
32
/usr/bin/xenner
xenner
xen
64
/usr/bin/xenner
xenner
virt-manager-1.3.2/tests/capabilities-xml/test-domcaps.xml 0000664 0001751 0001751 00000003376 12600567720 025327 0 ustar crobinso crobinso 0000000 0000000
/bin/emulatorbin
kvm
my-machine-type
x86_64
/foo/bar
/tmp/my_path
rom
pflash
default
yes
no
disk
cdrom
floppy
lun
ide
fdc
scsi
virtio
xen
usb
uml
sata
sd
subsystem
capabilities
default
mandatory
requisite
optional
usb
pci
scsi
storage
misc
net
default
kvm
vfio
xen
virt-manager-1.3.2/tests/capabilities-xml/kvm-ppc64le.xml 0000664 0001751 0001751 00000020273 12600567720 024767 0 ustar crobinso crobinso 0000000 0000000
a8726024-45c0-4b62-b631-14fbb6d75b9e
ppc64le
power8e
IBM
tcp
rdma
67108864
1048576
0
0
|
67108864
1048576
0
0
|
67108864
1048576
0
0
|
67108864
1048576
0
0
|
none
0
dac
0
+107:+107
+107:+107
hvm
64
/usr/libexec/qemu-kvm
pseries
/usr/libexec/qemu-kvm
virt-manager-1.3.2/tests/capabilities-xml/kvm-s390x.xml 0000664 0001751 0001751 00000004262 12627132763 024404 0 ustar crobinso crobinso 0000000 0000000
b88e553c-5920-4aa8-bb09-cc0ab8e6e0c2
s390x
host
tcp
rdma
2878860
|
selinux
0
system_u:system_r:svirt_t:s0
system_u:system_r:svirt_tcg_t:s0
dac
0
+107:+107
+107:+107
hvm
64
/usr/bin/qemu-system-s390x
s390
s390-ccw
/usr/bin/qemu-system-s390x
/usr/bin/qemu-system-s390x
s390
s390-ccw
virt-manager-1.3.2/tests/capabilities-xml/kvm-x86_64.xml 0000664 0001751 0001751 00000060210 12600567720 024443 0 ustar crobinso crobinso 0000000 0000000
39303242-3334-3636-3341-3745ffffffff
x86_64
Opteron_G4
AMD
tcp
rdma
16414544
4103636
0
|
selinux
0
system_u:system_r:svirt_t:s0
system_u:system_r:svirt_tcg_t:s0
dac
0
+107:+107
+107:+107
hvm
64
/usr/bin/qemu-system-alpha
clipper
hvm
32
/usr/bin/qemu-system-arm
virt
integratorcp
nuri
verdex
smdkc210
collie
spitz
realview-eb
realview-pbx-a9
versatilepb
realview-pb-a8
musicpal
z2
akita
kzm
realview-eb-mpcore
sx1
sx1-v1
cubieboard
highbank
netduino2
terrier
n810
mainstone
midway
cheetah
tosa
vexpress-a15
borzoi
versatileab
lm3s6965evb
n800
connex
vexpress-a9
xilinx-zynq-a9
canon-a1100
lm3s811evb
hvm
64
/usr/bin/qemu-system-aarch64
virt
integratorcp
nuri
verdex
smdkc210
collie
spitz
realview-eb
realview-pbx-a9
versatilepb
realview-pb-a8
musicpal
z2
akita
kzm
realview-eb-mpcore
sx1
sx1-v1
cubieboard
highbank
netduino2
terrier
n810
mainstone
midway
cheetah
tosa
vexpress-a15
borzoi
versatileab
lm3s6965evb
n800
connex
vexpress-a9
xilinx-zynq-a9
canon-a1100
lm3s811evb
hvm
32
/usr/bin/qemu-system-cris
axis-dev88
hvm
32
/usr/bin/qemu-system-i386
pc
pc-0.12
pc-1.3
pc-q35-1.6
pc-q35-1.5
pc-i440fx-1.6
pc-q35-2.2
xenpv
pc-i440fx-1.7
pc-q35-2.1
pc-0.11
pc-0.10
pc-1.2
pc-i440fx-2.2
isapc
pc-q35-1.4
xenfv
pc-0.15
pc-i440fx-1.5
pc-0.14
pc-i440fx-1.4
pc-q35-2.0
pc-1.1
pc-q35-1.7
pc-i440fx-2.1
pc-1.0
pc-i440fx-2.0
q35
pc-0.13
/usr/bin/qemu-kvm
pc
pc-1.3
pc-0.12
pc-q35-1.6
pc-q35-1.5
pc-i440fx-1.6
pc-q35-2.2
pc-i440fx-1.7
xenpv
pc-q35-2.1
pc-0.11
pc-0.10
pc-i440fx-2.2
pc-1.2
isapc
pc-q35-1.4
xenfv
pc-0.15
pc-i440fx-1.5
pc-i440fx-1.4
pc-q35-2.0
pc-0.14
pc-1.1
pc-q35-1.7
pc-i440fx-2.1
pc-1.0
pc-i440fx-2.0
q35
pc-0.13
hvm
32
/usr/bin/qemu-system-lm32
lm32-evr
milkymist
lm32-uclinux
hvm
32
/usr/bin/qemu-system-m68k
mcf5208evb
dummy
an5206
hvm
32
/usr/bin/qemu-system-microblaze
petalogix-s3adsp1800
petalogix-ml605
hvm
32
/usr/bin/qemu-system-microblazeel
petalogix-s3adsp1800
petalogix-ml605
hvm
32
/usr/bin/qemu-system-mips
malta
mips
mipssim
magnum
pica61
hvm
32
/usr/bin/qemu-system-mipsel
malta
mips
mipssim
magnum
pica61
hvm
64
/usr/bin/qemu-system-mips64
malta
mips
mipssim
magnum
pica61
hvm
64
/usr/bin/qemu-system-mips64el
malta
mips
magnum
mipssim
pica61
fulong2e
hvm
32
/usr/bin/qemu-system-ppc
g3beige
ref405ep
virtex-ml507
ppce500
mpc8544ds
bamboo
prep
mac99
taihu
hvm
64
/usr/bin/qemu-system-ppc64
pseries
ref405ep
virtex-ml507
ppce500
mpc8544ds
bamboo
g3beige
prep
pseries-2.1
pseries-2.2
mac99
taihu
hvm
64
/usr/bin/qemu-system-ppc64
pseries
ref405ep
virtex-ml507
ppce500
mpc8544ds
bamboo
g3beige
prep
pseries-2.1
pseries-2.2
mac99
taihu
hvm
32
/usr/bin/qemu-system-ppcemb
ref405ep
virtex-ml507
bamboo
taihu
hvm
64
/usr/bin/qemu-system-s390x
s390
s390-ccw
hvm
32
/usr/bin/qemu-system-sh4
shix
r2d
hvm
64
/usr/bin/qemu-system-sh4eb
shix
r2d
hvm
32
/usr/bin/qemu-system-sparc
SS-5
SS-4
SPARCbook
SS-600MP
Voyager
SS-10
SPARCClassic
SS-20
leon3_generic
LX
hvm
64
/usr/bin/qemu-system-sparc64
sun4u
Niagara
sun4v
hvm
32
/usr/bin/qemu-system-unicore32
puv3
hvm
64
/usr/bin/qemu-system-x86_64
pc
pc-1.3
pc-0.12
pc-q35-1.6
pc-q35-1.5
pc-i440fx-1.6
pc-q35-2.2
pc-i440fx-1.7
xenpv
pc-q35-2.1
pc-0.11
pc-0.10
pc-i440fx-2.2
pc-1.2
isapc
pc-q35-1.4
xenfv
pc-0.15
pc-i440fx-1.5
pc-i440fx-1.4
pc-q35-2.0
pc-0.14
pc-1.1
pc-q35-1.7
pc-i440fx-2.1
pc-1.0
pc-i440fx-2.0
q35
pc-0.13
/usr/bin/qemu-kvm
pc
pc-1.3
pc-0.12
pc-q35-1.6
pc-q35-1.5
pc-i440fx-1.6
pc-q35-2.2
pc-i440fx-1.7
xenpv
pc-q35-2.1
pc-0.11
pc-0.10
pc-i440fx-2.2
pc-1.2
isapc
pc-q35-1.4
xenfv
pc-0.15
pc-i440fx-1.5
pc-i440fx-1.4
pc-q35-2.0
pc-0.14
pc-1.1
pc-q35-1.7
pc-i440fx-2.1
pc-1.0
pc-i440fx-2.0
q35
pc-0.13
hvm
32
/usr/bin/qemu-system-xtensa
sim
kc705
lx200
lx60
ml605
hvm
32
/usr/bin/qemu-system-xtensaeb
sim
kc705
lx200
lx60
ml605
virt-manager-1.3.2/tests/virtconvtest.py 0000664 0001751 0001751 00000006717 12627132763 022105 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
from distutils.spawn import find_executable
import glob
import os
import StringIO
import unittest
from virtconv import VirtConverter
from tests import utils
base_dir = os.getcwd() + "/tests/virtconv-files/"
out_dir = base_dir + "libvirt_output"
conn = utils.open_kvm()
class TestVirtConv(unittest.TestCase):
def _convert_helper(self, infile, outfile, in_type, disk_format):
outbuf = StringIO.StringIO()
def print_cb(msg):
print >> outbuf, msg
converter = VirtConverter(conn, infile, print_cb=print_cb)
if converter.parser.name != in_type:
raise AssertionError("find_parser_by_file for '%s' returned "
"wrong parser type.\n"
"Expected: %s\n"
"Received: %s\n" %
(infile, in_type, converter.parser.name))
converter.convert_disks(disk_format, dry=True)
guest = converter.get_guest()
ignore, out_xml = guest.start_install(return_xml=True)
out_expect = out_xml
if outbuf.getvalue():
out_expect += ("\n\n" + outbuf.getvalue())
if not conn.check_support(conn.SUPPORT_CONN_VMPORT):
self.skipTest("Not comparing XML because vmport isn't supported")
utils.diff_compare(out_expect, outfile)
utils.test_create(converter.conn, out_xml)
def _compare_single_file(self, in_path, in_type, disk_format=None):
cwd = os.getcwd()
base = in_type + "2libvirt"
in_base = os.path.basename(in_path).rsplit(".", 1)[0]
out_path = "%s/%s_%s.%s" % (out_dir, base, in_base, "libvirt")
if disk_format:
out_path += ".disk_%s" % disk_format
if (os.path.splitext(in_path)[1] in [".zip"] and
not find_executable("unar")):
self.skipTest("Install 'unar' to run all tests.")
try:
os.chdir(os.path.dirname(in_path))
self._convert_helper(in_path, out_path, in_type, disk_format)
finally:
os.chdir(cwd)
def _compare_files(self, in_type):
in_dir = base_dir + in_type + "_input"
if not os.path.exists(in_dir):
raise RuntimeError("Directory does not exist: %s" % in_dir)
for in_path in glob.glob(os.path.join(in_dir, "*")):
self._compare_single_file(in_path, in_type)
def testOVF2Libvirt(self):
self._compare_files("ovf")
def testVMX2Libvirt(self):
self._compare_files("vmx")
def testDiskConvert(self):
self._compare_single_file(
base_dir + "ovf_input/test1.ovf", "ovf", disk_format="qcow2")
self._compare_single_file(
base_dir + "vmx_input/test1.vmx", "vmx", disk_format="raw")
virt-manager-1.3.2/tests/clone-xml/ 0000775 0001751 0001751 00000000000 12637033400 020631 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/clone-xml/cross-pool-out.xml 0000664 0001751 0001751 00000002144 12625404076 024271 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/nostorage-in.xml 0000664 0001751 0001751 00000000636 12572100216 023763 0 ustar crobinso crobinso 0000000 0000000
clone-orig
19618dc6-7895-956d-6056-8ebcd8061234
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/clone-xml/managed-storage-in.xml 0000664 0001751 0001751 00000002220 12575626735 025035 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/force-in.xml 0000664 0001751 0001751 00000002451 12600567720 023066 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/skip-out.xml 0000664 0001751 0001751 00000002445 12625404077 023144 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/empty-disks-out.xml 0000664 0001751 0001751 00000002433 12575626735 024457 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/noclone-storage-in.xml 0000664 0001751 0001751 00000002260 12572100216 025054 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/managed-storage-out.xml 0000664 0001751 0001751 00000002213 12625404076 025224 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/general-cfg-out.xml 0000664 0001751 0001751 00000002172 12600567720 024343 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/cross-pool-disks-out.xml 0000664 0001751 0001751 00000000650 12625404076 025404 0 ustar crobinso crobinso 0000000 0000000
new1.img
1000000
50000
new2.img
1000000
50000
virt-manager-1.3.2/tests/clone-xml/general-cfg-in.xml 0000664 0001751 0001751 00000002266 12575626735 024163 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/force-out.xml 0000664 0001751 0001751 00000002431 12627132763 023271 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/noclone-storage-out.xml 0000664 0001751 0001751 00000002257 12625404077 025276 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/cross-pool-in.xml 0000664 0001751 0001751 00000002157 12575626735 024110 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/empty-disks-in.xml 0000664 0001751 0001751 00000002443 12572100216 024231 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/skip-in.xml 0000664 0001751 0001751 00000002451 12600567720 022736 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/nostorage-out.xml 0000664 0001751 0001751 00000000634 12625404077 024175 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/clone-xml/readonly-disks-out.xml 0000664 0001751 0001751 00000003005 12575626735 025132 0 ustar crobinso crobinso 0000000 0000000
clone-new
12345678-1234-1234-1234-123456789012
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/readonly-disks-in.xml 0000664 0001751 0001751 00000003015 12572100216 024704 0 ustar crobinso crobinso 0000000 0000000
clone-orig
aaa3ae22-fed2-bfbd-ac02-3bea3bcfad82
262144
262144
1
hvm
destroy
restart
destroy
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/clone-xml/fullpool-in.xml 0000664 0001751 0001751 00000001412 12572100216 023607 0 ustar crobinso crobinso 0000000 0000000
test-full-clone
204800
409600
abcd5678-aaaa-1234-1234-12345678FFFF
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/uriparse.py 0000664 0001751 0001751 00000004701 12627132763 021154 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2015 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import unittest
from virtinst import URI
class TestURI(unittest.TestCase):
"""
Test virtinst URI module
"""
def _compare(self, uri, scheme='',
transport='', port='', username='', path='',
hostname='', query='', fragment='',
is_ipv6=False, host_is_ipv4_string=False):
uriinfo = URI(uri)
self.assertEquals(scheme, uriinfo.scheme)
self.assertEquals(transport, uriinfo.transport)
self.assertEquals(port, uriinfo.port)
self.assertEquals(username, uriinfo.username)
self.assertEquals(path, uriinfo.path)
self.assertEquals(hostname, uriinfo.hostname)
self.assertEquals(query, uriinfo.query)
self.assertEquals(fragment, uriinfo.fragment)
self.assertEquals(is_ipv6, uriinfo.is_ipv6)
self.assertEquals(host_is_ipv4_string, uriinfo.host_is_ipv4_string)
def testURIs(self):
self._compare("lxc://", scheme="lxc")
self._compare("qemu:///session", scheme="qemu", path="/session")
self._compare("http://foobar.com:5901/my/example.path#my-frag",
scheme="http", hostname="foobar.com",
port="5901", path='/my/example.path',
fragment="my-frag")
self._compare(
"gluster+tcp://[1:2:3:4:5:6:7:8]:24007/testvol/dir/a.img",
scheme="gluster", transport="tcp",
hostname="1:2:3:4:5:6:7:8", port="24007",
path="/testvol/dir/a.img", is_ipv6=True)
self._compare(
"qemu+ssh://root@192.168.2.3/system?no_verify=1",
scheme="qemu", transport="ssh", username="root",
hostname="192.168.2.3", path="/system",
query="no_verify=1", host_is_ipv4_string=True)
virt-manager-1.3.2/tests/__init__.py 0000664 0001751 0001751 00000004055 12600567720 021057 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import atexit
import imp
import logging
import os
os.environ["VIRTINST_TEST_SUITE"] = "1"
os.environ["VIRTINST_TEST_URL_DIR"] = os.path.abspath(
"tests/cli-test-xml/fakefedoratree/")
from virtcli import cliconfig
# This sets all the cli bits back to their defaults
reload(cliconfig)
from tests import utils
# Setup logging
rootLogger = logging.getLogger()
for handler in rootLogger.handlers:
rootLogger.removeHandler(handler)
logging.basicConfig(level=logging.DEBUG,
format="%(levelname)-8s %(message)s")
if utils.get_debug():
rootLogger.setLevel(logging.DEBUG)
else:
rootLogger.setLevel(logging.ERROR)
_cleanup_imports = []
def _import(name, path):
_cleanup_imports.append(path + "c")
return imp.load_source(name, path)
def _cleanup_imports_cb():
for f in _cleanup_imports:
if os.path.exists(f):
os.unlink(f)
atexit.register(_cleanup_imports_cb)
virtinstall = _import("virtinstall", "virt-install")
virtclone = _import("virtclone", "virt-clone")
virtconvert = _import("virtconvert", "virt-convert")
virtxml = _import("virtxml", "virt-xml")
# Variable used to store a local iso or dir path to check for a distro
# Specified via 'python setup.py test_urls --path"
URLTEST_LOCAL_MEDIA = []
# Used to implement test_initrd_inject --distro
INITRD_TEST_DISTROS = []
virt-manager-1.3.2/tests/xmlconfig.py 0000664 0001751 0001751 00000027756 12627132763 021327 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import unittest
import os
import virtinst
from virtinst import VirtualDisk
from virtcli import CLIConfig
from tests import utils
_default_conn = utils.open_testdriver()
def _make_guest(installer=None, conn=None):
if conn is None:
conn = _default_conn
g = conn.caps.lookup_virtinst_guest()
g.type = "kvm"
g.name = "TestGuest"
g.memory = int(200 * 1024)
g.maxmemory = int(400 * 1024)
g.uuid = "12345678-1234-1234-1234-123456789012"
gdev = virtinst.VirtualGraphics(conn)
gdev.type = "vnc"
gdev.keymap = "ja"
g.add_device(gdev)
g.features.pae = False
g.vcpus = 5
if not installer:
installer = _make_installer(conn=conn)
g.installer = installer
g.emulator = "/usr/lib/xen/bin/qemu-dm"
g.os.arch = "i686"
g.os.os_type = "hvm"
g.add_default_input_device()
g.add_default_console_device()
g.add_device(virtinst.VirtualAudio(g.conn))
# Floppy disk
path = "/dev/default-pool/testvol1.img"
d = VirtualDisk(conn)
d.path = path
d.device = d.DEVICE_FLOPPY
d.validate()
g.add_device(d)
# File disk
path = "/dev/default-pool/new-test-suite.img"
d = virtinst.VirtualDisk(conn)
d.path = path
if d.wants_storage_creation():
parent_pool = d.get_parent_pool()
vol_install = virtinst.VirtualDisk.build_vol_install(conn,
os.path.basename(path), parent_pool, .0000001, True)
d.set_vol_install(vol_install)
d.validate()
g.add_device(d)
# Block disk
path = "/dev/disk-pool/diskvol1"
d = virtinst.VirtualDisk(conn)
d.path = path
d.validate()
g.add_device(d)
# Network device
dev = virtinst.VirtualNetworkInterface(conn)
dev.macaddr = "22:22:33:44:55:66"
dev.type = virtinst.VirtualNetworkInterface.TYPE_VIRTUAL
dev.source = "default"
g.add_device(dev)
return g
def _make_installer(location=None, conn=None):
conn = conn or _default_conn
inst = virtinst.DistroInstaller(conn)
if location:
inst.location = location
else:
inst.location = "/dev/null"
inst.cdrom = True
return inst
class TestXMLMisc(unittest.TestCase):
"""
Misc tests for various XML special behavior. These should only aim for
testing any particularly tricky bits, general XML generation should
be through virt-install examples in clitest
"""
def _compare(self, guest, filebase, do_install):
filename = os.path.join("tests/xmlconfig-xml", filebase + ".xml")
inst_xml, boot_xml = guest.start_install(return_xml=True, dry=True)
if do_install:
actualXML = inst_xml
else:
actualXML = boot_xml
utils.diff_compare(actualXML, filename)
utils.test_create(guest.conn, actualXML)
def testDefaultBridge(self):
# Test our handling of the default bridge routines
origfunc = None
util = None
try:
util = getattr(virtinst, "util")
origfunc = util.default_bridge
def newbridge(ignore_conn):
return "bzz0"
util.default_bridge = newbridge
dev1 = virtinst.VirtualNetworkInterface(_default_conn)
dev1.macaddr = "22:22:33:44:55:66"
dev2 = virtinst.VirtualNetworkInterface(_default_conn,
parsexml=dev1.get_xml_config())
dev2.source = None
dev2.source = "foobr0"
dev2.macaddr = "22:22:33:44:55:67"
dev3 = virtinst.VirtualNetworkInterface(_default_conn,
parsexml=dev1.get_xml_config())
dev3.source = None
dev3.macaddr = "22:22:33:44:55:68"
utils.diff_compare(dev1.get_xml_config(), None,
"\n"
" \n"
" \n"
"\n")
utils.diff_compare(dev2.get_xml_config(), None,
"\n"
" \n"
" \n"
"\n")
utils.diff_compare(dev3.get_xml_config(), None,
"\n"
" \n"
"\n")
finally:
if util and origfunc:
util.default_bridge = origfunc
def testCpustrToTuple(self):
# Various testing our cpustr handling
conn = _default_conn
base = [False] * 16
expect = base[:]
expect[1] = expect[2] = expect[3] = True
self.assertEquals(tuple(expect),
virtinst.DomainNumatune.cpuset_str_to_tuple(conn, "1-3"))
expect = base[:]
expect[1] = expect[3] = expect[5] = expect[10] = expect[11] = True
self.assertEquals(tuple(expect),
virtinst.DomainNumatune.cpuset_str_to_tuple(conn, "1,3,5,10-11"))
self.assertRaises(ValueError,
virtinst.DomainNumatune.cpuset_str_to_tuple,
conn, "16")
def testDiskNumbers(self):
# Various testing our target generation
self.assertEquals("a", VirtualDisk.num_to_target(1))
self.assertEquals("b", VirtualDisk.num_to_target(2))
self.assertEquals("z", VirtualDisk.num_to_target(26))
self.assertEquals("aa", VirtualDisk.num_to_target(27))
self.assertEquals("ab", VirtualDisk.num_to_target(28))
self.assertEquals("az", VirtualDisk.num_to_target(52))
self.assertEquals("ba", VirtualDisk.num_to_target(53))
self.assertEquals("zz", VirtualDisk.num_to_target(27 * 26))
self.assertEquals("aaa", VirtualDisk.num_to_target(27 * 26 + 1))
self.assertEquals(VirtualDisk.target_to_num("hda"), 0)
self.assertEquals(VirtualDisk.target_to_num("hdb"), 1)
self.assertEquals(VirtualDisk.target_to_num("sdz"), 25)
self.assertEquals(VirtualDisk.target_to_num("sdaa"), 26)
self.assertEquals(VirtualDisk.target_to_num("vdab"), 27)
self.assertEquals(VirtualDisk.target_to_num("vdaz"), 51)
self.assertEquals(VirtualDisk.target_to_num("xvdba"), 52)
self.assertEquals(VirtualDisk.target_to_num("xvdzz"),
26 * (25 + 1) + 25)
self.assertEquals(VirtualDisk.target_to_num("xvdaaa"),
26 * 26 * 1 + 26 * 1 + 0)
disk = virtinst.VirtualDisk(_default_conn)
disk.bus = "ide"
self.assertEquals("hda", disk.generate_target([]))
self.assertEquals("hdb", disk.generate_target(["hda"]))
self.assertEquals("hdc", disk.generate_target(["hdb", "sda"]))
self.assertEquals("hdb", disk.generate_target(["hda", "hdd"]))
disk.bus = "virtio-scsi"
self.assertEquals("sdb",
disk.generate_target(["sda", "sdg", "sdi"], 0))
self.assertEquals("sdh", disk.generate_target(["sda", "sdg"], 1))
def testQuickTreeinfo(self):
# Simple sanity test to make sure detect_distro works. test-urls
# does much more exhaustive testing but it's only run occasionally
i = _make_installer(
location="tests/cli-test-xml/fakefedoratree")
g = _make_guest(i)
v = i.detect_distro(g)
self.assertEquals(v, "fedora17")
i = _make_installer(
location="tests/cli-test-xml/fakerhel6tree")
g = _make_guest(i)
v = i.detect_distro(g)
self.assertEquals(v, "rhel6.0")
def testCPUTopology(self):
# Test CPU topology determining
cpu = virtinst.CPU(_default_conn)
cpu.sockets = "2"
cpu.set_topology_defaults(6)
self.assertEquals([cpu.sockets, cpu.cores, cpu.threads], [2, 3, 1])
cpu = virtinst.CPU(_default_conn)
cpu.cores = "4"
cpu.set_topology_defaults(9)
self.assertEquals([cpu.sockets, cpu.cores, cpu.threads], [2, 4, 1])
cpu = virtinst.CPU(_default_conn)
cpu.threads = "3"
cpu.set_topology_defaults(14)
self.assertEquals([cpu.sockets, cpu.cores, cpu.threads], [4, 1, 3])
cpu = virtinst.CPU(_default_conn)
cpu.sockets = 5
cpu.cores = 2
self.assertEquals(cpu.vcpus_from_topology(), 10)
cpu = virtinst.CPU(_default_conn)
self.assertEquals(cpu.vcpus_from_topology(), 1)
def testAC97(self):
# Test setting ac97 version given various version combos
def has_ac97(conn):
g = _make_guest(conn=conn)
g.os_variant = "fedora11"
# pylint: disable=unpacking-non-sequence
xml, ignore = g.start_install(return_xml=True, dry=True)
return "ac97" in xml
self.assertTrue(has_ac97(utils.open_kvm(connver=11000)))
self.assertFalse(has_ac97(utils.open_kvm(libver=5000)))
self.assertFalse(has_ac97(utils.open_kvm(libver=7000, connver=7000)))
def testOSDeviceDefaultChange(self):
"""
Make sure device defaults are properly changed if we change OS
distro/variant mid process
"""
# Use connver=12005 so that non-rhel displays ac97
conn = utils.open_kvm_rhel(connver=12005)
g = _make_guest(conn=conn)
g.os_variant = "fedora11"
self._compare(g, "install-f11-norheldefaults", False)
try:
CLIConfig.stable_defaults = True
g = _make_guest(conn=conn)
g.os_variant = "fedora11"
origemu = g.emulator
g.emulator = "/usr/libexec/qemu-kvm"
self.assertTrue(g.conn.stable_defaults())
setattr(g.conn, "_support_cache", {})
self._compare(g, "install-f11-rheldefaults", False)
g.emulator = origemu
setattr(g.conn, "_support_cache", {})
finally:
CLIConfig.stable_defaults = False
def test_no_vmvga_RHEL(self):
# Test that vmvga is not used on RHEL
conn = utils.open_kvm_rhel()
def _make():
g = _make_guest(conn=conn)
g.emulator = "/usr/libexec/qemu-kvm"
g.add_default_video_device()
g.os_variant = "ubuntu13.10"
return g
try:
g = _make()
self._compare(g, "install-novmvga-rhel", True)
CLIConfig.stable_defaults = True
g = _make()
self._compare(g, "install-novmvga-rhel", True)
finally:
CLIConfig.stable_defaults = False
def test_hyperv_clock(self):
def _make(connver):
conn = utils.open_kvm(libver=1002002, connver=connver)
g = _make_guest(conn=conn)
g.os_variant = "win7"
g.emulator = "/usr/libexec/qemu-kvm"
return g
try:
g = _make(2000000)
self._compare(g, "install-hyperv-clock", True)
g = _make(1009000)
self._compare(g, "install-hyperv-noclock", True)
CLIConfig.stable_defaults = True
g = _make(1005003)
self._compare(g, "install-hyperv-clock", True)
g = _make(1005002)
self._compare(g, "install-hyperv-noclock", True)
finally:
CLIConfig.stable_defaults = False
virt-manager-1.3.2/tests/storage.py 0000664 0001751 0001751 00000021336 12600567720 020765 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import logging
import os
import unittest
from virtinst import StoragePool, StorageVolume
from tests import utils
# pylint: disable=protected-access
# Access to protected member, needed to unittest stuff
basepath = os.path.join(os.getcwd(), "tests", "storage-xml")
def generate_uuid_from_string(msg):
res = msg.split("-", 1)
if len(res) > 1:
# Split off common prefix
msg = res[1]
numstr = ""
for c in msg:
numstr += str(ord(c))
numstr *= 32
return "-".join([numstr[0:8], numstr[8:12], numstr[12:16], numstr[16:20],
numstr[20:32]])
def _findFreePoolName(conn, namebase):
i = 0
while True:
poolname = namebase + "-%d" % i
try:
conn.storagePoolLookupByName(poolname)
i += 1
except:
return poolname
def createPool(conn, ptype, poolname=None, fmt=None, target_path=None,
source_path=None, source_name=None, uuid=None, iqn=None):
if poolname is None:
poolname = _findFreePoolName(conn, str(ptype) + "-pool")
if uuid is None:
uuid = generate_uuid_from_string(poolname)
pool_inst = StoragePool(conn)
pool_inst.name = poolname
pool_inst.type = ptype
pool_inst.uuid = uuid
if pool_inst.supports_property("hosts"):
pool_inst.add_host("some.random.hostname")
if pool_inst.supports_property("source_path"):
pool_inst.source_path = source_path or "/some/source/path"
if pool_inst.supports_property("target_path"):
pool_inst.target_path = target_path or "/some/target/path"
if fmt and pool_inst.supports_property("format"):
pool_inst.format = fmt
if source_name and pool_inst.supports_property("source_name"):
pool_inst.source_name = source_name
if iqn and pool_inst.supports_property("iqn"):
pool_inst.iqn = iqn
pool_inst.validate()
return poolCompare(pool_inst)
def poolCompare(pool_inst):
filename = os.path.join(basepath, pool_inst.name + ".xml")
out_expect = pool_inst.get_xml_config()
if not os.path.exists(filename):
open(filename, "w").write(out_expect)
utils.diff_compare(out_expect, filename)
return pool_inst.install(build=True, meter=None, create=True)
def createVol(conn, poolobj, volname=None, input_vol=None, clone_vol=None):
if volname is None:
volname = poolobj.name() + "-vol"
# Format here depends on libvirt-1.2.0 and later
if clone_vol and conn.local_libvirt_version() < 1002000:
logging.debug("skip clone compare")
return
alloc = 5 * 1024 * 1024 * 1024
cap = 10 * 1024 * 1024 * 1024
vol_inst = StorageVolume(conn)
vol_inst.pool = poolobj
vol_inst.name = volname
vol_inst.capacity = cap
vol_inst.allocation = alloc
vol_inst.permissions.mode = "0700"
vol_inst.permissions.owner = "10736"
vol_inst.permissions.group = "10736"
if input_vol:
vol_inst.input_vol = input_vol
vol_inst.sync_input_vol()
elif clone_vol:
vol_inst = StorageVolume(conn, parsexml=clone_vol.XMLDesc(0))
vol_inst.input_vol = clone_vol
vol_inst.sync_input_vol()
vol_inst.name = volname
vol_inst.validate()
filename = os.path.join(basepath, vol_inst.name + ".xml")
utils.diff_compare(vol_inst.get_xml_config(), filename)
return vol_inst.install(meter=False)
class TestStorage(unittest.TestCase):
def setUp(self):
self.conn = utils.open_testdefault()
def testDirPool(self):
poolobj = createPool(self.conn,
StoragePool.TYPE_DIR, "pool-dir")
invol = createVol(self.conn, poolobj)
createVol(self.conn, poolobj,
volname=invol.name() + "input", input_vol=invol)
createVol(self.conn, poolobj,
volname=invol.name() + "clone", clone_vol=invol)
def testFSPool(self):
poolobj = createPool(self.conn,
StoragePool.TYPE_FS, "pool-fs")
invol = createVol(self.conn, poolobj)
createVol(self.conn, poolobj,
volname=invol.name() + "input", input_vol=invol)
createVol(self.conn, poolobj,
volname=invol.name() + "clone", clone_vol=invol)
def testNetFSPool(self):
poolobj = createPool(self.conn,
StoragePool.TYPE_NETFS, "pool-netfs")
invol = createVol(self.conn, poolobj)
createVol(self.conn, poolobj,
volname=invol.name() + "input", input_vol=invol)
createVol(self.conn, poolobj,
volname=invol.name() + "clone", clone_vol=invol)
def testLVPool(self):
poolobj = createPool(self.conn,
StoragePool.TYPE_LOGICAL,
"pool-logical",
target_path="/dev/pool-logical")
invol = createVol(self.conn, poolobj)
createVol(self.conn, poolobj,
volname=invol.name() + "input", input_vol=invol)
createVol(self.conn,
poolobj, volname=invol.name() + "clone", clone_vol=invol)
# Test parsing source name for target path
createPool(self.conn, StoragePool.TYPE_LOGICAL,
"pool-logical-target-srcname",
target_path="/dev/vgfoobar")
# Test with source name
createPool(self.conn,
StoragePool.TYPE_LOGICAL, "pool-logical-srcname",
source_name="vgname")
# Test creating with many devices
# XXX: Need to wire this up
# createPool(self.conn,
# StoragePool.TYPE_LOGICAL, "pool-logical-manydev",
# source_path=["/tmp/path1", "/tmp/path2", "/tmp/path3"],
# target_path=None)
def testDiskPool(self):
poolobj = createPool(self.conn,
StoragePool.TYPE_DISK,
"pool-disk", fmt="dos")
invol = createVol(self.conn, poolobj)
createVol(self.conn, poolobj,
volname=invol.name() + "input", input_vol=invol)
createVol(self.conn, poolobj,
volname=invol.name() + "clone", clone_vol=invol)
def testISCSIPool(self):
createPool(self.conn,
StoragePool.TYPE_ISCSI, "pool-iscsi",
iqn="foo.bar.baz.iqn")
def testSCSIPool(self):
createPool(self.conn, StoragePool.TYPE_SCSI, "pool-scsi")
def testMpathPool(self):
createPool(self.conn, StoragePool.TYPE_MPATH, "pool-mpath")
def testGlusterPool(self):
if not self.conn.check_support(self.conn.SUPPORT_CONN_POOL_GLUSTERFS):
raise unittest.SkipTest("Gluster pools not supported with this "
"libvirt version.")
createPool(self.conn, StoragePool.TYPE_GLUSTER, "pool-gluster")
##############################
# Tests for pool-sources API #
##############################
def _enumerateCompare(self, name, pool_list):
for pool in pool_list:
pool.name = name + str(pool_list.index(pool))
pool.uuid = generate_uuid_from_string(pool.name)
poolCompare(pool)
def testEnumerateLogical(self):
name = "pool-logical-list"
lst = StoragePool.pool_list_from_sources(self.conn,
StoragePool.TYPE_LOGICAL)
self._enumerateCompare(name, lst)
def testEnumerateNetFS(self):
name = "pool-netfs-list"
host = "example.com"
lst = StoragePool.pool_list_from_sources(self.conn,
StoragePool.TYPE_NETFS,
host=host)
self._enumerateCompare(name, lst)
def testEnumerateiSCSI(self):
host = "example.com"
lst = StoragePool.pool_list_from_sources(self.conn,
StoragePool.TYPE_ISCSI,
host=host)
self.assertTrue(len(lst) == 0)
if __name__ == "__main__":
unittest.main()
virt-manager-1.3.2/tests/xmlparse-xml/ 0000775 0001751 0001751 00000000000 12637033400 021364 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/xmlparse-xml/change-videos-out.xml 0000664 0001751 0001751 00000001656 12625404104 025437 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-panic-device-out.xml 0000664 0001751 0001751 00000004017 12625404104 026467 0 ustar crobinso crobinso 0000000 0000000
Ftest
9d544d2e-e001-a6b2-4aa7-7768796353ea
1048576
1048576
1
hvm
destroy
restart
restart
/usr/local/bin/qemu-system-x86_64
virt-manager-1.3.2/tests/xmlparse-xml/change-minimal-guest-out.xml 0000664 0001751 0001751 00000001420 12627132763 026721 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
4
/usr/lib/xen/bin/qemu-dm
foobar
virt-manager-1.3.2/tests/xmlparse-xml/change-nics-in.xml 0000664 0001751 0001751 00000003122 12575626735 024713 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/interface-test-bond-mii-out.xml 0000664 0001751 0001751 00000001154 12625404104 027325 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/xmlparse-xml/change-addr-out.xml 0000664 0001751 0001751 00000002404 12625404103 025047 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
destroy
restart
restart
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-watchdogs-out.xml 0000664 0001751 0001751 00000001613 12625404104 026122 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-kernel-out.xml 0000664 0001751 0001751 00000001176 12625404103 026363 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
linux
destroy
destroy
destroy
5
virt-manager-1.3.2/tests/xmlparse-xml/change-addr-in.xml 0000664 0001751 0001751 00000002517 12575626735 024700 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
destroy
restart
restart
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-graphics-in.xml 0000664 0001751 0001751 00000003265 12575626735 025567 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/console-compat-in.xml 0000664 0001751 0001751 00000001162 12575626735 025461 0 ustar crobinso crobinso 0000000 0000000
xenpv-kernel
xen
/var/lib/xen/vmlinuz.2Dn2YT
/var/lib/xen/initrd.img.0u-Vhq
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
430080
2
destroy
destroy
destroy
virt-manager-1.3.2/tests/xmlparse-xml/change-redirdev-in.xml 0000664 0001751 0001751 00000002036 12575626735 025566 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
1
destroy
restart
restart
/usr/local/bin/qemu-kvm
virt-manager-1.3.2/tests/xmlparse-xml/change-rng-random-out.xml 0000664 0001751 0001751 00000003431 12625404104 026203 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
/dev/hwrng
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/interface-test-bond-arp-out.xml 0000664 0001751 0001751 00000001175 12625404104 027334 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/xmlparse-xml/add-devices-in.xml 0000664 0001751 0001751 00000002720 12575626735 024707 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/clear-cpu-unknown-vals-in.xml 0000664 0001751 0001751 00000000720 12575626735 027050 0 ustar crobinso crobinso 0000000 0000000
test-cpu-unknown-clear
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/xmlparse-xml/change-controllers-out.xml 0000664 0001751 0001751 00000001725 12625404103 026510 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-kernel-in.xml 0000664 0001751 0001751 00000001237 12575626735 026205 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
linux
/boot/vmlinuz
/boot/initrd
location
destroy
destroy
destroy
5
virt-manager-1.3.2/tests/xmlparse-xml/change-chars-out.xml 0000664 0001751 0001751 00000003241 12625404103 025235 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-snapshot-in.xml 0000664 0001751 0001751 00000002155 12575626735 025623 0 ustar crobinso crobinso 0000000 0000000
offline-root-child1
shutoff
offline desk
offline-root
1375905916
test-internal-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
virt-manager-1.3.2/tests/xmlparse-xml/change-sounds-in.xml 0000664 0001751 0001751 00000001650 12575626735 025276 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/interface-test-bridge-ip-out.xml 0000664 0001751 0001751 00000001151 12625404104 027466 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/xmlparse-xml/change-disk-in.xml 0000664 0001751 0001751 00000006061 12627132763 024705 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
WD-WMAP9A966149
1
2
3
4
virt-manager-1.3.2/tests/xmlparse-xml/change-controllers-in.xml 0000664 0001751 0001751 00000001743 12575626735 026334 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/add-devices-out.xml 0000664 0001751 0001751 00000003043 12625404103 025062 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/network-multi-out.xml 0000664 0001751 0001751 00000003601 12625404104 025534 0 ustar crobinso crobinso 0000000 0000000
new-foo
41b4afe4-87bb-8087-6724-5e208a2d1111
virt-manager-1.3.2/tests/xmlparse-xml/change-seclabel-in.xml 0000664 0001751 0001751 00000001051 12627132763 025517 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/pool-gluster-out.xml 0000664 0001751 0001751 00000000314 12625404104 025345 0 ustar crobinso crobinso 0000000 0000000
pool-gluster
10310811-7115-1161-0111-410310811711
gv0
virt-manager-1.3.2/tests/xmlparse-xml/interface-test-vlan-out.xml 0000664 0001751 0001751 00000000162 12625404104 026565 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/xmlparse-xml/change-disk-out.xml 0000664 0001751 0001751 00000006531 12627132763 025110 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
frob
0
0
0
0
5
6
virt-manager-1.3.2/tests/xmlparse-xml/pool-iscsi-out.xml 0000664 0001751 0001751 00000000471 12625404104 024776 0 ustar crobinso crobinso 0000000 0000000
pool-iscsi
10511599-1151-0510-5115-991151051051
/some/target/path
virt-manager-1.3.2/tests/xmlparse-xml/change-hostdevs-in.xml 0000664 0001751 0001751 00000002513 12600567720 025604 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-redirdev-out.xml 0000664 0001751 0001751 00000002043 12625404104 025741 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
1
destroy
restart
restart
/usr/local/bin/qemu-kvm
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-uefi-out.xml 0000664 0001751 0001751 00000001372 12625404103 026031 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
linux
OVMF_CODE.fd
/tmp/nvram_store
destroy
destroy
destroy
5
virt-manager-1.3.2/tests/xmlparse-xml/pool-dir-vol-out.xml 0000664 0001751 0001751 00000001504 12625404104 025236 0 ustar crobinso crobinso 0000000 0000000
pool-dir-vol
2000
1000
0744
10000
10000
/foo/bar
/my/backing
0644
107
107
1380391173.646500267
1361141691.649777468
1380037213.225753249
fookey
virt-manager-1.3.2/tests/xmlparse-xml/change-filesystems-in.xml 0000664 0001751 0001751 00000003273 12575626735 026335 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/pool-fs.xml 0000664 0001751 0001751 00000000617 12575626735 023515 0 ustar crobinso crobinso 0000000 0000000
pool-fs
10211510-2115-1021-1510-211510211510
984373075968
756681687040
227691388928
/some/target/path
virt-manager-1.3.2/tests/xmlparse-xml/change-videos-in.xml 0000664 0001751 0001751 00000001623 12575626735 025254 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-inputs-in.xml 0000664 0001751 0001751 00000001254 12572100216 025257 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/clear-cpu-unknown-vals-out.xml 0000664 0001751 0001751 00000000636 12625404104 027233 0 ustar crobinso crobinso 0000000 0000000
test-cpu-unknown-clear
8388608
2097152
2
hvm
destroy
restart
destroy
virt-manager-1.3.2/tests/xmlparse-xml/change-guest-out.xml 0000664 0001751 0001751 00000006270 12627132763 025305 0 ustar crobinso crobinso 0000000 0000000
change_name
1024000
2048000
11111111-2222-3333-4444-555555555555
xen
/foo/loader
/sbin/init
foo
bar baz
frib
qemu64
qemuvendor
restart
destroy
destroy
restart
12
/usr/binnnn/fooemu
Hey title changed!
Hey desc changed&
200
/home/1.img
300
2048
200
400
500
pygrub
/virtualmachines/production
virt-manager-1.3.2/tests/xmlparse-xml/change-rng-random-in.xml 0000664 0001751 0001751 00000003432 12575626735 026027 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
/dev/random
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/network-multi-in.xml 0000664 0001751 0001751 00000003252 12575626735 025361 0 ustar crobinso crobinso 0000000 0000000
ipv6_multirange
41b4afe4-87bb-8087-6724-5e208a2d483a
virt-manager-1.3.2/tests/xmlparse-xml/console-compat-out.xml 0000664 0001751 0001751 00000001162 12625404104 025636 0 ustar crobinso crobinso 0000000 0000000
xenpv-kernel
xen
/var/lib/xen/vmlinuz.2Dn2YT
/var/lib/xen/initrd.img.0u-Vhq
method=http://download.fedora.devel.redhat.com/pub/fedora/linux/core/test/5.91/x86_64/os
430080
2
destroy
destroy
destroy
virt-manager-1.3.2/tests/xmlparse-xml/change-sounds-out.xml 0000664 0001751 0001751 00000001650 12625404104 025453 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/pool-fs-out.xml 0000664 0001751 0001751 00000000613 12625404104 024272 0 ustar crobinso crobinso 0000000 0000000
foo-new
10211510-2115-1021-1510-211510211999
200000
150000
50000
fooname
/mnt/my/foo
virt-manager-1.3.2/tests/xmlparse-xml/change-tpm-out.xml 0000664 0001751 0001751 00000003471 12625404104 024743 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-uefi-in.xml 0000664 0001751 0001751 00000001237 12575626735 025655 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
linux
/boot/vmlinuz
/boot/initrd
location
destroy
destroy
destroy
5
virt-manager-1.3.2/tests/xmlparse-xml/pool-rbd-out.xml 0000664 0001751 0001751 00000000752 12625404104 024435 0 ustar crobinso crobinso 0000000 0000000
rbd-pool
4bcd023e-990e-fcf6-d95c-52dd0cd938c8
47256127143936
5537792235090
35978000121856
rbd
virt-manager-1.3.2/tests/xmlparse-xml/change-hostdevs-out.xml 0000664 0001751 0001751 00000002610 12625404104 025774 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-graphics-out.xml 0000664 0001751 0001751 00000003547 12625404104 025747 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-seclabel-out.xml 0000664 0001751 0001751 00000001061 12627132763 025721 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/bin/qemu-dm
fooimage
baselabel
virt-manager-1.3.2/tests/xmlparse-xml/change-smartcard-out.xml 0000664 0001751 0001751 00000003447 12625404104 026126 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-smartcard-in.xml 0000664 0001751 0001751 00000003463 12575626735 025747 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-multi-in.xml 0000664 0001751 0001751 00000001610 12575626735 026052 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-watchdogs-in.xml 0000664 0001751 0001751 00000001604 12575626735 025745 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-media-in.xml 0000664 0001751 0001751 00000001417 12572100216 025015 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-boot-multi-out.xml 0000664 0001751 0001751 00000001672 12625404103 026236 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
/foo.img
/bar.img
ks=foo.ks
/baz.dtb
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-panic-device-in.xml 0000664 0001751 0001751 00000004017 12575626735 026312 0 ustar crobinso crobinso 0000000 0000000
Ftest
9d544d2e-e001-a6b2-4aa7-7768796353ea
1048576
1048576
1
hvm
destroy
restart
restart
/usr/local/bin/qemu-system-x86_64
virt-manager-1.3.2/tests/xmlparse-xml/pool-dir-vol-in.xml 0000664 0001751 0001751 00000001300 12575626735 025053 0 ustar crobinso crobinso 0000000 0000000
pool-dir-vol
10737418240
5368709120
0700
10736
10736
/foo/bar/baz
0644
107
107
1380391173.646500267
1361141691.649777468
1380037213.225753249
virt-manager-1.3.2/tests/xmlparse-xml/change-minimal-guest-in.xml 0000664 0001751 0001751 00000000704 12572100216 026507 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
4
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-snapshot-out.xml 0000664 0001751 0001751 00000002144 12625404104 025776 0 ustar crobinso crobinso 0000000 0000000
name-foo
somestate
foo
newline
indent
newparent
1234
test-internal-snapshots
12345678-1234-fddf-1234-12345678ffff
409600
409600
1
/tmp/bootfoo
xen
destroy
restart
destroy
0
virt-manager-1.3.2/tests/xmlparse-xml/change-nics-out.xml 0000664 0001751 0001751 00000003315 12625404104 025074 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-tpm-in.xml 0000664 0001751 0001751 00000003476 12575626735 024573 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-chars-in.xml 0000664 0001751 0001751 00000003122 12575626735 025057 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-cpumode-in.xml 0000664 0001751 0001751 00000000745 12572100216 025375 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
4
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-inputs-out.xml 0000664 0001751 0001751 00000001254 12625404104 025462 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-cpumode-out.xml 0000664 0001751 0001751 00000001013 12625404103 025564 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
4
/usr/lib/xen/bin/qemu-dm
qemu64
virt-manager-1.3.2/tests/xmlparse-xml/pool-rbd.xml 0000664 0001751 0001751 00000000722 12600567720 023634 0 ustar crobinso crobinso 0000000 0000000
rbd-pool
4bcd023e-990e-fcf6-d95c-52dd0cd938c8
47256127143936
5537792235090
35978000121856
rbd
virt-manager-1.3.2/tests/xmlparse-xml/change-guest-in.xml 0000664 0001751 0001751 00000004115 12627132763 025100 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
poweroff
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-rng-egd-out.xml 0000664 0001751 0001751 00000003663 12625404104 025471 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-rng-egd-in.xml 0000664 0001751 0001751 00000003663 12575626735 025314 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
footest
Intel
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
imagelabel
virt-manager-1.3.2/tests/xmlparse-xml/change-filesystems-out.xml 0000664 0001751 0001751 00000003311 12625404103 026502 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
foooo barrrr somedesc
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/xmlparse-xml/change-media-out.xml 0000664 0001751 0001751 00000002311 12625404104 025212 0 ustar crobinso crobinso 0000000 0000000
TestGuest
204800
409600
12345678-1234-1234-1234-123456789012
hvm
5
/usr/lib/xen/bin/qemu-dm
virt-manager-1.3.2/tests/inject-data/ 0000775 0001751 0001751 00000000000 12637033400 021116 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/inject-data/new-kickstart.ks 0000664 0001751 0001751 00000000222 12575626735 024263 0 ustar crobinso crobinso 0000000 0000000 # Used for F18 and earlier
keyboard us
lang en_US
network --bootproto=dhcp --onboot=on
url --url http://HEY-THIS-IS-OUR-BAD-KICKSTART-URL.com/
virt-manager-1.3.2/tests/inject-data/old-kickstart.ks 0000664 0001751 0001751 00000000147 12575626735 024256 0 ustar crobinso crobinso 0000000 0000000 # Used for F17 and earlier
keyboard us
lang en_US
network --bootproto=ITREADTHEKICKSTART --onboot=on
virt-manager-1.3.2/tests/nodedev.py 0000664 0001751 0001751 00000024703 12627132763 020752 0 ustar crobinso crobinso 0000000 0000000 # encoding=utf-8
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import os.path
import unittest
from virtinst import NodeDevice
from virtinst import VirtualHostDevice
from tests import utils
conn = utils.open_testdriver()
unknown_xml = """
foodevice
computer
LENOVO
"""
# Requires XML_SANITIZE to parse correctly, see bug 1184131
funky_chars_xml = """
computer
LENOVOá
ThinkPad T61
L3B2616
97e80381-494f-11cb-8e0e-cbc168f7d753
LENOVO
7LET51WW (1.21 )
08/22/2007
"""
class TestNodeDev(unittest.TestCase):
def _nodeDevFromName(self, devname):
node = conn.nodeDeviceLookupByName(devname)
xml = node.XMLDesc(0)
return NodeDevice.parse(conn, xml)
def _testCompare(self, devname, vals, devxml=None):
if devxml:
dev = NodeDevice.parse(conn, devxml)
else:
dev = self._nodeDevFromName(devname)
for attr in vals.keys():
expect = vals[attr]
actual = getattr(dev, attr)
if expect != actual:
raise AssertionError("devname=%s attribute=%s did not match:\n"
"expect=%s\nactual=%s" % (devname, attr, expect, actual))
self.assertEqual(vals[attr], getattr(dev, attr))
def _testNode2DeviceCompare(self, nodename, devfile, nodedev=None):
devfile = os.path.join("tests/nodedev-xml/devxml", devfile)
if not nodedev:
nodedev = self._nodeDevFromName(nodename)
dev = VirtualHostDevice(conn)
dev.set_from_nodedev(nodedev)
utils.diff_compare(dev.get_xml_config() + "\n", devfile)
def testSystemDevice(self):
devname = "computer"
vals = {"hw_vendor": "LENOVO", "hw_version": "ThinkPad T61",
"hw_serial": "L3B2616",
"hw_uuid": "97e80381-494f-11cb-8e0e-cbc168f7d753",
"fw_vendor": "LENOVO", "fw_version": "7LET51WW (1.21 )",
"fw_date": "08/22/2007",
"device_type": NodeDevice.CAPABILITY_TYPE_SYSTEM,
"name": "computer", "parent": None}
self._testCompare(devname, vals)
def testFunkyChars(self):
vals = {"hw_vendor": "LENOVO", "hw_version": "ThinkPad T61",
"hw_serial": "L3B2616",
"hw_uuid": "97e80381-494f-11cb-8e0e-cbc168f7d753",
"fw_vendor": "LENOVO", "fw_version": "7LET51WW (1.21 )",
"fw_date": "08/22/2007",
"device_type": NodeDevice.CAPABILITY_TYPE_SYSTEM,
"name": "computer", "parent": None}
self._testCompare(None, vals, funky_chars_xml)
def testNetDevice1(self):
devname = "net_00_1c_25_10_b1_e4"
vals = {"name": "net_00_1c_25_10_b1_e4", "parent": "pci_8086_1049",
"device_type": NodeDevice.CAPABILITY_TYPE_NET,
"interface": "eth0", "address": "00:1c:25:10:b1:e4",
"capability_type": "80203"}
self._testCompare(devname, vals)
def testNetDevice2(self):
devname = "net_00_1c_bf_04_29_a4"
vals = {"name": "net_00_1c_bf_04_29_a4", "parent": "pci_8086_4227",
"device_type": NodeDevice.CAPABILITY_TYPE_NET,
"interface": "wlan0", "address": "00:1c:bf:04:29:a4",
"capability_type": "80211"}
self._testCompare(devname, vals)
def testPCIDevice1(self):
devname = "pci_1180_592"
vals = {"name": "pci_1180_592", "parent": "pci_8086_2448",
"device_type": NodeDevice.CAPABILITY_TYPE_PCI,
"domain": "0", "bus": "21", "slot": "0", "function": "4",
"product_id": "0x0592", "vendor_id": "0x1180",
"product_name": "R5C592 Memory Stick Bus Host Adapter",
"vendor_name": "Ricoh Co Ltd"}
self._testCompare(devname, vals)
def testPCIDevice2(self):
devname = "pci_8086_1049"
vals = {"name": "pci_8086_1049", "parent": "computer",
"device_type": NodeDevice.CAPABILITY_TYPE_PCI,
"domain": "0", "bus": "0", "slot": "25", "function": "0",
"product_id": "0x1049", "vendor_id": "0x8086",
"product_name": "82566MM Gigabit Network Connection",
"vendor_name": "Intel Corporation"}
self._testCompare(devname, vals)
def testUSBDevDevice1(self):
devname = "usb_device_781_5151_2004453082054CA1BEEE"
vals = {"name": "usb_device_781_5151_2004453082054CA1BEEE",
"parent": "usb_device_1d6b_2_0000_00_1a_7",
"device_type": NodeDevice.CAPABILITY_TYPE_USBDEV,
"bus": "1", "device": "4", "product_id": '0x5151',
"vendor_id": '0x0781',
"vendor_name": "SanDisk Corp.",
"product_name": "Cruzer Micro 256/512MB Flash Drive"}
self._testCompare(devname, vals)
def testUSBDevDevice2(self):
devname = "usb_device_483_2016_noserial"
vals = {"name": "usb_device_483_2016_noserial",
"parent": "usb_device_1d6b_1_0000_00_1a_0",
"device_type": NodeDevice.CAPABILITY_TYPE_USBDEV,
"bus": "3", "device": "2", "product_id": '0x2016',
"vendor_id": '0x0483',
"vendor_name": "SGS Thomson Microelectronics",
"product_name": "Fingerprint Reader"}
self._testCompare(devname, vals)
def testStorageDevice1(self):
devname = "storage_serial_SATA_WDC_WD1600AAJS__WD_WCAP95119685"
vals = {"name": "storage_serial_SATA_WDC_WD1600AAJS__WD_WCAP95119685",
"parent": "pci_8086_27c0_scsi_host_scsi_device_lun0",
"device_type": NodeDevice.CAPABILITY_TYPE_STORAGE,
"block": "/dev/sda", "bus": "scsi", "drive_type": "disk",
"model": "WDC WD1600AAJS-2", "vendor": "ATA",
"size": 160041885696, "removable": False,
"hotpluggable": False, "media_available": None,
"media_size": None, "media_label": None}
self._testCompare(devname, vals)
def testStorageDevice2(self):
devname = "storage_serial_SanDisk_Cruzer_Micro_2004453082054CA1BEEE_0_0"
vals = {"name": "storage_serial_SanDisk_Cruzer_Micro_2004453082054CA1BEEE_0_0",
"parent": "usb_device_781_5151_2004453082054CA1BEEE_if0_scsi_host_0_scsi_device_lun0",
"device_type": NodeDevice.CAPABILITY_TYPE_STORAGE,
"block": "/dev/sdb", "bus": "usb", "drive_type": "disk",
"model": "Cruzer Micro", "vendor": "SanDisk", "size": None,
"removable": True, "hotpluggable": True,
"media_available": True, "media_size": 12345678}
self._testCompare(devname, vals)
def testUSBBus(self):
devname = "usb_device_1d6b_1_0000_00_1d_1_if0"
vals = {"name": "usb_device_1d6b_1_0000_00_1d_1_if0",
"parent": "usb_device_1d6b_1_0000_00_1d_1",
"device_type": NodeDevice.CAPABILITY_TYPE_USBBUS,
"number": "0", "classval": "9", "subclass": "0",
"protocol": "0"}
self._testCompare(devname, vals)
def testSCSIBus(self):
devname = "pci_8086_2829_scsi_host_1"
vals = {"name": "pci_8086_2829_scsi_host_1",
"parent": "pci_8086_2829",
"device_type": NodeDevice.CAPABILITY_TYPE_SCSIBUS,
"host": "2"}
self._testCompare(devname, vals)
def testNPIV(self):
devname = "pci_10df_fe00_0_scsi_host"
vals = {"name": "pci_10df_fe00_0_scsi_host",
"device_type": NodeDevice.CAPABILITY_TYPE_SCSIBUS,
"host": "4", "fc_host": True, "vport_ops" : True,
"wwnn": "20000000c9848141", "wwpn": "10000000c9848141"}
self._testCompare(devname, vals)
def testSCSIDevice(self):
devname = "pci_8086_2829_scsi_host_scsi_device_lun0"
vals = {"name": "pci_8086_2829_scsi_host_scsi_device_lun0",
"parent": "pci_8086_2829_scsi_host",
"host": "0", "bus": "0", "target": "0", "lun": "0",
"type": "disk"}
self._testCompare(devname, vals)
def testUnknownDevice(self):
vals = {"name": "foodevice", "parent": "computer",
"device_type": "frobtype"}
self._testCompare(None, vals, devxml=unknown_xml)
# NodeDevice 2 Device XML tests
def testNodeDev2USB1(self):
nodename = "usb_device_781_5151_2004453082054CA1BEEE"
devfile = "usbdev1.xml"
self._testNode2DeviceCompare(nodename, devfile)
def testNodeDev2USB2(self):
nodename = "usb_device_1d6b_2_0000_00_1d_7"
devfile = "usbdev2.xml"
nodedev = self._nodeDevFromName(nodename)
self._testNode2DeviceCompare(nodename, devfile, nodedev=nodedev)
def testNodeDev2PCI(self):
nodename = "pci_1180_592"
devfile = "pcidev.xml"
self._testNode2DeviceCompare(nodename, devfile)
def testPCIParse(self):
nodename = "pci_1180_476"
obj = self._nodeDevFromName(nodename)
self.assertEqual(obj.iommu_group, 3)
def testNodeDevFail(self):
nodename = "usb_device_1d6b_1_0000_00_1d_1_if0"
devfile = ""
# This should exist, since usbbus is not a valid device to
# pass to a guest.
self.assertRaises(ValueError,
self._testNode2DeviceCompare, nodename, devfile)
if __name__ == "__main__":
unittest.main()
virt-manager-1.3.2/tests/interface-xml/ 0000775 0001751 0001751 00000000000 12637033400 021471 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/interface-xml/test-ethernet-params.xml 0000664 0001751 0001751 00000000164 12625404077 026301 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-ethernet.xml 0000664 0001751 0001751 00000000062 12625404077 025015 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-bridge.xml 0000664 0001751 0001751 00000001527 12625404077 024442 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-bridge-ip.xml 0000664 0001751 0001751 00000002307 12625404077 025045 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-bond-mii.xml 0000664 0001751 0001751 00000001154 12625404077 024700 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-ethernet-copy-proto.xml 0000664 0001751 0001751 00000000202 12625404077 027122 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-bond-arp.xml 0000664 0001751 0001751 00000001157 12625404077 024707 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-bond.xml 0000664 0001751 0001751 00000001043 12625404077 024121 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/interface-xml/test-vlan.xml 0000664 0001751 0001751 00000000160 12625404077 024136 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/checkprops.py 0000664 0001751 0001751 00000002413 12600567720 021455 0 ustar crobinso crobinso 0000000 0000000
import traceback
import unittest
import virtinst
class CheckPropsTest(unittest.TestCase):
maxDiff = None
def testCheckProps(self):
# pylint: disable=protected-access
# Access to protected member, needed to unittest stuff
# If a certain environment variable is set, XMLBuilder tracks
# every property registered and every one of those that is
# actually altered. The test suite sets that env variable.
#
# test000ClearProps resets the 'set' list, and this test
# ensures that every property we know about has been touched
# by one of the above tests.
fail = [p for p in virtinst.xmlbuilder._allprops
if p not in virtinst.xmlbuilder._seenprops]
try:
self.assertEquals([], fail)
except AssertionError:
msg = "".join(traceback.format_exc()) + "\n\n"
msg += ("This means that there are XML properties that are\n"
"untested in the test suite. This could be caused\n"
"by a previous test suite failure, or if you added\n"
"a new property and didn't extend the test suite.\n"
"Look into extending clitest.py and/or xmlparse.py.")
self.fail(msg)
virt-manager-1.3.2/tests/nodedev-xml/ 0000775 0001751 0001751 00000000000 12637033400 021155 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/nodedev-xml/devxml/ 0000775 0001751 0001751 00000000000 12637033400 022454 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/nodedev-xml/devxml/usbdev1.xml 0000664 0001751 0001751 00000000214 12625404077 024555 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/nodedev-xml/devxml/pcidev.xml 0000664 0001751 0001751 00000000220 12625404077 024453 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/nodedev-xml/devxml/usbdev2.xml 0000664 0001751 0001751 00000000256 12627132763 024566 0 ustar crobinso crobinso 0000000 0000000
virt-manager-1.3.2/tests/storage-xml/ 0000775 0001751 0001751 00000000000 12637033400 021175 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/storage-xml/pool-fs-volclone.xml 0000664 0001751 0001751 00000000666 12625404100 025121 0 ustar crobinso crobinso 0000000 0000000
pool-fs-volclone
/some/target/path/pool-fs-vol
10737418240
5368709120
/some/target/path/pool-fs-vol
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-scsi.xml 0000664 0001751 0001751 00000000341 12625404100 023621 0 ustar crobinso crobinso 0000000 0000000
pool-scsi
11599115-1051-1599-1151-051159911510
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-disk-vol.xml 0000664 0001751 0001751 00000000403 12625404077 024424 0 ustar crobinso crobinso 0000000 0000000
pool-disk-vol
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-mpath.xml 0000664 0001751 0001751 00000000244 12625404100 023773 0 ustar crobinso crobinso 0000000 0000000
pool-mpath
10911297-1161-0410-9112-971161041091
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-fs-vol.xml 0000664 0001751 0001751 00000000432 12625404100 024067 0 ustar crobinso crobinso 0000000 0000000
pool-fs-vol
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-disk.xml 0000664 0001751 0001751 00000000371 12625404077 023632 0 ustar crobinso crobinso 0000000 0000000
pool-disk
10010511-5107-1001-0511-510710010511
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-disk-volclone.xml 0000664 0001751 0001751 00000000675 12625404100 025443 0 ustar crobinso crobinso 0000000 0000000
pool-disk-volclone
/some/target/path/pool-disk-vol
10737418240
5368709120
/some/target/path/pool-disk-vol
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-dir-vol.xml 0000664 0001751 0001751 00000000433 12625404077 024253 0 ustar crobinso crobinso 0000000 0000000
pool-dir-vol
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-logical-volclone.xml 0000664 0001751 0001751 00000000655 12625404100 026121 0 ustar crobinso crobinso 0000000 0000000
pool-logical-volclone
/dev/pool-logical/pool-logical-vol
10737418240
10737418240
/dev/pool-logical/pool-logical-vol
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-dir-volclone.xml 0000664 0001751 0001751 00000000671 12625404077 025300 0 ustar crobinso crobinso 0000000 0000000
pool-dir-volclone
/some/target/path/pool-dir-vol
10737418240
5368709120
/some/target/path/pool-dir-vol
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-fs.xml 0000664 0001751 0001751 00000000366 12625404100 023277 0 ustar crobinso crobinso 0000000 0000000
pool-fs
10211510-2115-1021-1510-211510211510
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-logical-vol.xml 0000664 0001751 0001751 00000000407 12625404100 025073 0 ustar crobinso crobinso 0000000 0000000
pool-logical-vol
10737418240
10737418240
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-gluster.xml 0000664 0001751 0001751 00000000346 12625404100 024352 0 ustar crobinso crobinso 0000000 0000000
pool-gluster
10310811-7115-1161-0111-410310811711
gv0
virt-manager-1.3.2/tests/storage-xml/pool-netfs-list0.xml 0000664 0001751 0001751 00000000455 12625404100 025036 0 ustar crobinso crobinso 0000000 0000000
pool-netfs-list0
11010111-6102-1154-5108-105115116481
/var/lib/libvirt/images/pool-netfs-list0
virt-manager-1.3.2/tests/storage-xml/pool-fs-volinput.xml 0000664 0001751 0001751 00000000437 12625404100 025154 0 ustar crobinso crobinso 0000000 0000000
pool-fs-volinput
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-netfs-vol.xml 0000664 0001751 0001751 00000000435 12625404100 024601 0 ustar crobinso crobinso 0000000 0000000
pool-netfs-vol
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-logical-target-srcname.xml 0000664 0001751 0001751 00000000413 12625404100 027204 0 ustar crobinso crobinso 0000000 0000000
pool-logical-target-srcname
10811110-3105-9997-1084-511697114103
vgfoobar
/dev/vgfoobar
virt-manager-1.3.2/tests/storage-xml/pool-iscsi.xml 0000664 0001751 0001751 00000000517 12625404100 023777 0 ustar crobinso crobinso 0000000 0000000
pool-iscsi
10511599-1151-0510-5115-991151051051
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-logical-srcname.xml 0000664 0001751 0001751 00000000406 12625404100 025722 0 ustar crobinso crobinso 0000000 0000000
pool-logical-srcname
10811110-3105-9997-1084-511511499110
vgname
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-disk-volinput.xml 0000664 0001751 0001751 00000000442 12625404100 025472 0 ustar crobinso crobinso 0000000 0000000
pool-disk-volinput
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-logical-list0.xml 0000664 0001751 0001751 00000000423 12625404100 025324 0 ustar crobinso crobinso 0000000 0000000
pool-logical-list0
10811110-3105-9997-1084-510810511511
testvg1
/dev/testvg1
virt-manager-1.3.2/tests/storage-xml/pool-logical-volinput.xml 0000664 0001751 0001751 00000000414 12625404100 026151 0 ustar crobinso crobinso 0000000 0000000
pool-logical-volinput
10737418240
10737418240
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-dir-volinput.xml 0000664 0001751 0001751 00000000440 12625404077 025331 0 ustar crobinso crobinso 0000000 0000000
pool-dir-volinput
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-netfs-volinput.xml 0000664 0001751 0001751 00000000442 12625404100 025657 0 ustar crobinso crobinso 0000000 0000000
pool-netfs-volinput
10737418240
5368709120
0700
10736
10736
virt-manager-1.3.2/tests/storage-xml/pool-dir.xml 0000664 0001751 0001751 00000000240 12625404077 023451 0 ustar crobinso crobinso 0000000 0000000
pool-dir
10010511-4100-1051-1410-010511410010
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-logical.xml 0000664 0001751 0001751 00000000404 12625404100 024272 0 ustar crobinso crobinso 0000000 0000000
pool-logical
10811110-3105-9997-1081-081111031059
pool-logical
/dev/pool-logical
virt-manager-1.3.2/tests/storage-xml/pool-netfs.xml 0000664 0001751 0001751 00000000441 12625404100 024000 0 ustar crobinso crobinso 0000000 0000000
pool-netfs
11010111-6102-1151-1010-111610211511
/some/target/path
virt-manager-1.3.2/tests/storage-xml/pool-logical-list1.xml 0000664 0001751 0001751 00000000423 12625404100 025325 0 ustar crobinso crobinso 0000000 0000000
pool-logical-list1
10811110-3105-9997-1084-510810511511
testvg2
/dev/testvg2
virt-manager-1.3.2/tests/storage-xml/pool-netfs-volclone.xml 0000664 0001751 0001751 00000000677 12625404100 025632 0 ustar crobinso crobinso 0000000 0000000
pool-netfs-volclone
/some/target/path/pool-netfs-vol
10737418240
5368709120
/some/target/path/pool-netfs-vol
0700
10736
10736
virt-manager-1.3.2/tests/utils.py 0000664 0001751 0001751 00000013606 12627132763 020466 0 ustar crobinso crobinso 0000000 0000000 # Copyright (C) 2013, 2014 Red Hat, Inc.
#
# This program 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 of the License, or
# (at your option) any later version.
#
# This program 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 program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
# MA 02110-1301 USA.
import difflib
import os
import logging
import libvirt
import virtinst
import virtinst.cli
import virtinst.uri
# DON'T EDIT THIS. Use 'setup.py test --regenerate-output'
REGENERATE_OUTPUT = False
# pylint: disable=protected-access
# Access to protected member, needed to unittest stuff
_capsprefix = ",caps=%s/tests/capabilities-xml/" % os.getcwd()
_domcapsprefix = ",domcaps=%s/tests/capabilities-xml/" % os.getcwd()
uri_test_default = "__virtinst_test__test:///default,predictable"
uri_test = "__virtinst_test__test:///%s/tests/testdriver.xml,predictable" % os.getcwd()
uri_test_remote = uri_test + ",remote"
_uri_qemu = "%s,qemu" % uri_test
_uri_kvm_domcaps = (_uri_qemu + _domcapsprefix + "kvm-x86_64-domcaps.xml")
uri_kvm_nodomcaps = (_uri_qemu + _capsprefix + "kvm-x86_64.xml")
uri_kvm_rhel = (_uri_kvm_domcaps + _capsprefix + "kvm-x86_64-rhel7.xml")
uri_kvm = (_uri_kvm_domcaps + _capsprefix + "kvm-x86_64.xml")
uri_kvm_session = uri_kvm + ",session"
uri_kvm_armv7l = (_uri_kvm_domcaps + _capsprefix + "kvm-armv7l.xml")
uri_kvm_aarch64 = (_uri_kvm_domcaps + _capsprefix + "kvm-aarch64.xml")
uri_kvm_ppc64le = (_uri_kvm_domcaps + _capsprefix + "kvm-ppc64le.xml")
uri_kvm_s390x = (_uri_kvm_domcaps + _capsprefix + "kvm-s390x.xml")
uri_kvm_s390x_KVMIBM = (_uri_kvm_domcaps + _capsprefix + "kvm-s390x-KVMIBM.xml")
uri_xen = uri_test + _capsprefix + "xen-rhel5.4.xml,xen"
uri_lxc = uri_test + _capsprefix + "lxc.xml,lxc"
def get_debug():
return ("DEBUG_TESTS" in os.environ and
os.environ["DEBUG_TESTS"] == "1")
def _make_uri(base, connver=None, libver=None):
if connver:
base += ",connver=%s" % connver
if libver:
base += ",libver=%s" % libver
return base
_conn_cache = {}
def openconn(uri):
"""
Extra super caching to speed up the test suite. We basically
cache the first guest/pool/vol poll attempt for each URI, and save it
across multiple reopenings of that connection. We aren't caching
libvirt objects, just parsed XML objects. This works fine since
generally every test uses a fresh virConnect, or undoes the
persistent changes it makes.
"""
virtinst.util.register_libvirt_error_handler()
conn = virtinst.cli.getConnection(uri)
if uri not in _conn_cache:
_conn_cache[uri] = {}
_conn_cache[uri]["vms"] = conn._fetch_all_guests_cached()
_conn_cache[uri]["pools"] = conn._fetch_all_pools_cached()
_conn_cache[uri]["vols"] = conn._fetch_all_vols_cached()
_conn_cache[uri]["nodedevs"] = conn._fetch_all_nodedevs_cached()
cache = _conn_cache[uri].copy()
def cb_fetch_all_guests():
return cache["vms"]
def cb_fetch_all_nodedevs():
return cache["nodedevs"]
def cb_fetch_all_pools():
if "pools" not in cache:
cache["pools"] = conn._fetch_all_pools_cached()
return cache["pools"]
def cb_fetch_all_vols():
if "vols" not in cache:
cache["vols"] = conn._fetch_all_vols_cached()
return cache["vols"]
def cb_clear_cache(pools=False):
if pools:
cache.pop("pools", None)
cache.pop("vols", None)
conn.cb_fetch_all_guests = cb_fetch_all_guests
conn.cb_fetch_all_pools = cb_fetch_all_pools
conn.cb_fetch_all_vols = cb_fetch_all_vols
conn.cb_fetch_all_nodedevs = cb_fetch_all_nodedevs
conn.cb_clear_cache = cb_clear_cache
return conn
def open_testdefault():
return openconn(uri_test_default)
def open_testdriver():
return openconn(uri_test)
def open_kvm(connver=None, libver=None):
return openconn(_make_uri(uri_kvm, connver, libver))
def open_kvm_rhel(connver=None):
return openconn(_make_uri(uri_kvm_rhel, connver))
def open_test_remote():
return openconn(uri_test_remote)
def _libvirt_callback(ignore, err):
logging.warn("libvirt errmsg: %s", err[2])
libvirt.registerErrorHandler(f=_libvirt_callback, ctx=None)
def test_create(testconn, xml, define_func="defineXML"):
xml = virtinst.uri.sanitize_xml_for_test_define(xml)
try:
func = getattr(testconn, define_func)
obj = func(xml)
except Exception, e:
raise RuntimeError(str(e) + "\n" + xml)
try:
obj.create()
obj.destroy()
obj.undefine()
except:
try:
obj.destroy()
except:
pass
try:
obj.undefine()
except:
pass
def read_file(filename):
"""Helper function to read a files contents and return them"""
f = open(filename, "r")
out = f.read()
f.close()
return out
def diff_compare(actual_out, filename=None, expect_out=None):
"""Compare passed string output to contents of filename"""
if not expect_out:
if not os.path.exists(filename) or REGENERATE_OUTPUT:
file(filename, "w").write(actual_out)
expect_out = read_file(filename)
diff = "".join(difflib.unified_diff(expect_out.splitlines(1),
actual_out.splitlines(1),
fromfile=filename,
tofile="Generated Output"))
if diff:
raise AssertionError("Conversion outputs did not match.\n%s" % diff)
virt-manager-1.3.2/tests/virtconv-files/ 0000775 0001751 0001751 00000000000 12637033400 021705 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/ovf_input/ 0000775 0001751 0001751 00000000000 12637033400 023716 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/ovf_input/test1.ovf 0000664 0001751 0001751 00000013457 12572100216 025502 0 ustar crobinso crobinso 0000000 0000000
Virtual disk information
The list of logical networks
The VM Network network
A virtual machine
test.ovf
The kind of installed guest operating system
Red Hat Enterprise Linux 5 (64-bit)
Virtual hardware requirements
Virtual Hardware Family
0
test.ovf
vmx-07
-
hertz * 10^6
Number of Virtual CPUs
1 virtual CPU(s)
1
3
3
-
byte * 2^20
Memory Size
512MB of memory
2
4
777
-
0
SCSI Controller
SCSI controller 0
3
lsilogic
6
-
1
IDE Controller
IDE 1
4
5
-
0
IDE Controller
IDE 0
5
5
-
0
false
Floppy Drive
Floppy drive 1
6
14
-
0
false
CD/DVD Drive 1
7
4
15
-
7
true
VM Network
E1000 ethernet adapter on "VM Network"
Network adapter 1
8
E1000
10
-
0
Hard disk 1
ovf:/disk/vmdisk1
9
3
17
-
1
Hard disk 2
ovf:/file/vmfile1
10
4
17
A human-readable annotation
This is the description, created by RWMJ.
A human-readable annotation
This is the description, created by RWMJ.
virt-manager-1.3.2/tests/virtconv-files/ovf_input/test2.ovf 0000664 0001751 0001751 00000012547 12572100216 025502 0 ustar crobinso crobinso 0000000 0000000
Virtual disk information
The list of logical networks
The VM Network network
A virtual machine
w2k3 32bit
The kind of installed guest operating system
Microsoft Windows Server 2003, Enterprise Edition (32-bit)
Virtual hardware requirements
Virtual Hardware Family
0
w2k3 32bit
vmx-07
-
hertz * 10^6
Number of Virtual CPUs
1 virtual CPU(s)
1
3
1
-
byte * 2^20
Memory Size
1024MB of memory
2
4
1024
-
0
SCSI Controller
SCSI controller 0
3
lsilogic
6
-
1
IDE Controller
IDE 1
4
5
-
0
IDE Controller
IDE 0
5
5
-
0
false
Floppy Drive
Floppy drive 1
6
14
-
0
true
CD/DVD Drive 1
7
4
15
-
7
true
VM Network
E1000 ethernet adapter on "VM Network"
Network adapter 1
8
E1000
10
-
0
Hard disk 1
ovf:/disk/vmdisk1
9
3
17
A human-readable annotation
Description added by RWMJ.
virt-manager-1.3.2/tests/virtconv-files/ovf_input/ovf_directory/ 0000775 0001751 0001751 00000000000 12637033400 026574 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/ovf_input/ovf_directory/CentOS-6.4-i386-Gnome-disk1.vmdk 0000664 0001751 0001751 00000024360 12575626735 033713 0 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/ovf_input/ovf_directory/CentOS-6.4-i386-Gnome.ovf 0000664 0001751 0001751 00000030314 12575626735 032527 0 ustar crobinso crobinso 0000000 0000000
List of the virtual disks used in the package
Logical networks used in the package
Logical network used by this appliance.
A virtual machine
The kind of installed guest operating system
RedHat
RedHat
Virtual hardware requirements for a virtual machine
Virtual Hardware Family
0
CentOS-6.4-i386-Gnome
virtualbox-2.2
-
1 virtual CPU
Number of virtual CPUs
1 virtual CPU
1
3
1
-
MegaBytes
512 MB of memory
Memory Size
512 MB of memory
2
4
512
-
0
ideController0
IDE Controller
ideController0
3
PIIX4
5
-
1
ideController1
IDE Controller
ideController1
4
PIIX4
5
-
0
sataController0
SATA Controller
sataController0
5
AHCI
20
-
true
Ethernet adapter on 'NAT'
NAT
Ethernet adapter on 'NAT'
6
E1000
10
-
0
usb
USB Controller
usb
7
23
-
3
false
sound
Sound Card
sound
8
ensoniq1371
35
-
0
true
cdrom1
CD-ROM Drive
cdrom1
9
4
15
-
0
disk1
Disk Image
disk1
/disk/vmdisk1
10
5
17
Complete VirtualBox machine configuration in VirtualBox format
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/ 0000775 0001751 0001751 00000000000 12637033400 025000 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt.disk_raw 0000664 0001751 0001751 00000004124 12627132763 033623 0 ustar crobinso crobinso 0000000 0000000
fedora
00000000-1111-2222-3333-444444444444
524288
524288
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Running /usr/bin/qemu-img convert -O raw fedora.vmdk /var/lib/libvirt/images/fedora.raw
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/vmx2libvirt_vmx-dir.libvirt 0000664 0001751 0001751 00000004173 12627132763 032353 0 ustar crobinso crobinso 0000000 0000000
esx4.0-rhel4.8-i386
00000000-1111-2222-3333-444444444444
524288
524288
2
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Copying ESX4.0-rhel4u8-32b-flat.vmdk to /var/lib/libvirt/images/ESX4.0-rhel4u8-32b-flat
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/ovf2libvirt_test2.libvirt 0000664 0001751 0001751 00000004063 12627132763 032004 0 ustar crobinso crobinso 0000000 0000000
w2k3_32bit
00000000-1111-2222-3333-444444444444
Description added by RWMJ.
1048576
1048576
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Copying w2k3 32bit-disk1.vmdk to /var/lib/libvirt/images/w2k3_32bit-disk1
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/vmx2libvirt_test-nodisks.libvirt 0000664 0001751 0001751 00000003506 12627132763 033413 0 ustar crobinso crobinso 0000000 0000000
fedora
00000000-1111-2222-3333-444444444444
524288
524288
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/vmx2libvirt_test-vmx-zip.libvirt 0000664 0001751 0001751 00000004273 12627132763 033355 0 ustar crobinso crobinso 0000000 0000000
minix
00000000-1111-2222-3333-444444444444
204800
204800
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
test-vmx-zip.zip appears to be an archive, running: unar -o /var/tmp/virt-convert-tmp test-vmx-zip.zip
Copying MS-DOS.vmdk to /var/lib/libvirt/images/MS-DOS
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt 0000664 0001751 0001751 00000004426 12627132763 032006 0 ustar crobinso crobinso 0000000 0000000
test.ovf
00000000-1111-2222-3333-444444444444
This is the description, created by RWMJ.
795648
795648
3
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Copying test.ovf-disk1.vmdk to /var/lib/libvirt/images/test.ovf-disk1
Copying testfile to /var/lib/libvirt/images/testfile
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/ovf2libvirt_ovf_directory.libvirt 0000664 0001751 0001751 00000004050 12627132763 033615 0 ustar crobinso crobinso 0000000 0000000
CentOS-6.4-i386-Gnome.ovf
00000000-1111-2222-3333-444444444444
524288
524288
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Copying CentOS-6.4-i386-Gnome-disk1.vmdk to /var/lib/libvirt/images/CentOS-6.4-i386-Gnome-disk1
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/ovf2libvirt_test1.libvirt.disk_qcow2 0000664 0001751 0001751 00000004610 12627132763 034045 0 ustar crobinso crobinso 0000000 0000000
test.ovf
00000000-1111-2222-3333-444444444444
This is the description, created by RWMJ.
795648
795648
3
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Running /usr/bin/qemu-img convert -O qcow2 test.ovf-disk1.vmdk /var/lib/libvirt/images/test.ovf-disk1.qcow2
Running /usr/bin/qemu-img convert -O qcow2 testfile /var/lib/libvirt/images/testfile.qcow2
virt-manager-1.3.2/tests/virtconv-files/libvirt_output/vmx2libvirt_test1.libvirt 0000664 0001751 0001751 00000004043 12627132763 032021 0 ustar crobinso crobinso 0000000 0000000
fedora
00000000-1111-2222-3333-444444444444
524288
524288
1
hvm
Opteron_G4
destroy
restart
restart
/usr/bin/qemu-kvm
Copying fedora.vmdk to /var/lib/libvirt/images/fedora
virt-manager-1.3.2/tests/virtconv-files/vmx_input/ 0000775 0001751 0001751 00000000000 12637033400 023736 5 ustar crobinso crobinso 0000000 0000000 virt-manager-1.3.2/tests/virtconv-files/vmx_input/test-vmx-zip.zip 0000664 0001751 0001751 00000004122 12575626735 027074 0 ustar crobinso crobinso 0000000 0000000 PK
Ë{GD minix/UT ]BõR’BõRux é é PK Ø{GDö¶–ó ð( minix/MS-DOS.vmdkUT xBõR]BõRux é é íÁ1  õOm
¾
PK ƒ{GD¢Yfm @ minix/MS-DOS.vmxUT ÖAõRÖAõRux é é RËNÃ0¼#ñVï‰ò(}DâQJ%âìÚ›báGd;)åë±Ó¤MQ+$nÉÌìxv´DÉ’m´aJ¢[4𮝦mùãû;Ââ°Ò`@Z¾¾¼Ý;\€0ì<’D‘– rÎÕ6¯*æ°PÛÖå!*ü£eç¬:¢dž±h-—E°Xa#èç^_šŒMb÷<¢`Ø£€BüîªVB¨V"Ðxë%WUµ;ñîó‚ý -Áž{بZÒ‹xWæO‰Ói| ‡aƒ#ìsïcì(3Ç»^.˜d_ÞÔ`ìªðUƲÑXzkÿ~èVUž?YSê0}- ±êDuÍhÈÁ¶;…› S4‰P(ûoBQ4
`Š`‚’5JBP9C˜ ’ök¦ÌÿÆ1¹ò}^ï¹¥H–̳r–a’ý1±*Km¯Q_Š¿Š³•wœ±XÛ;%¥cÏâPK
ƒ{GD minix/MS-DOS.vmsdUT ÖAõRÖAõRux é é PK ƒ{GD÷Ÿ'% Ø! minix/MS-DOS.nvramUT ÖAõRÖAõRux é é í˜ïkGÇ¿³»¹\×Kv51=Là¶V¬H„Óž¿ˆà^îbÔäH ¯
žèµNɳþJ ¥wJ(ž…¾è‹”ü÷¦%à Ò}u/}±T0®ŸÙ½\¢IèI
·$3óìó|ç;3{˜ÓÃ_2 ™ÓC#Ô€c%»5pK~Jç®3L/L[¡EüCP%vâºSùó.°PåÝg©vÂòûS}¶,ÖBè§ú¨Žütk"½¤RÉ^Œe/÷ü’ôRc87–=7†¹ˆIŸê“B,X[ö¢æÌ>Æ.u'd;Ãÿn"Ðh‹ÎŽçß.Ï–âÉ8n²Ñx‡LœâR$ûwîm/׌º‹úxTz»Vòñ³¿„É…?þg>qæîü3«¯½´÷Šôrõâ7iéËéúF2Ùà¦s ”d(½·wd`Nÿ™õê/4¡iFOgNô3í#Ê>ÉB¹œKg†m0±(¸|öÑPóäs›n+
à&lÔ7}ËMÕŠÖÌ'V,ÖÞJéq#V¾÷¨`Û5xØDå ÐݰG
aÏçÃp,êÙ8K>hzfVZhÄšbÇeë=1ʰˎ]tí <o¼=ðºá%á¥àw7r¸}ż_áýo-±UŠÒ**‹´^ÕE:…x0ÌR14Q߈…޲h^Ѓ^†zZÐkFó¨.÷ª+B5·}óÁ§É¨$OÒržS´wÏj¢ÓôÅs]ªÄåÎC3Vdé²|a%#T¶$ÐAÙ“E´‚_ÓÇŒ¿ÒÇ}fåìÀí.)嬒:º5”êikHæé@—$“Tuï¾I+tð“I«ç_À‘_Sdô¥ô[óQXnû:–G›Œß·‡Ýãhkè[”ýC'ɾ`ø‰¼½N9wí“áNáùRÔËã²|‡ÉcôQ»ˆ2·ËìrÅNT×Ó™€³³®Óƒí
ùZM^Bí g½”.·]
7Ãèh”º2ûX˜í®:¢M6ú}&„˜§_5ÆÇÿ¥½KŠŒÁ' K–:~ X6xýÓØN$÷ø