virtinst-0.600.4/ 0000775 0001751 0001751 00000000000 12126270224 015223 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/doc/ 0000775 0001751 0001751 00000000000 12126270223 015767 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/doc/example1.xml 0000664 0001751 0001751 00000001625 12123101335 020223 0 ustar crobinso crobinso 0000000 0000000
example-image
i686
pygrub
i686
1
262144
virtinst-0.600.4/doc/image.rng 0000664 0001751 0001751 00000021451 12123101335 017556 0 ustar crobinso crobinso 0000000 0000000
xen
hvm
i686
x86_64
mips
sparc
ppc
hd
cdrom
pygrub
system
user
scratch
raw
iso
sha1
sha256
on
off
[0-9]+
[0-9]+
1
[0-9]+
4000
[A-Za-z0-9_\.\+\-:/]+
[^/]+
[a-zA-Z0-9_\.\+\-%][a-zA-Z0-9_\.\+\-%/]*
[a-zA-Z0-9_\.\-:/]+
[0-9\.]+(-[0-9\.]+)?
virtinst-0.600.4/PKG-INFO 0000664 0001751 0001751 00000000411 12126270224 016314 0 ustar crobinso crobinso 0000000 0000000 Metadata-Version: 1.0
Name: virtinst
Version: 0.600.4
Summary: Virtual machine installation
Home-page: http://virt-manager.org
Author: Jeremy Katz, Daniel Berrange, Cole Robinson
Author-email: crobinso@redhat.com
License: GPL
Description: UNKNOWN
Platform: UNKNOWN
virtinst-0.600.4/tests/ 0000775 0001751 0001751 00000000000 12126270223 016364 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/xmlparse.py 0000664 0001751 0001751 00000067211 12123101335 020572 0 ustar crobinso crobinso 0000000 0000000 #
# 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 glob
import traceback
import virtinst
import utils
conn = utils.open_testdriver()
kvmconn = utils.open_testkvmdriver()
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=conn, parsexml=expectXML)
actualXML = guest.get_config_xml()
utils.diff_compare(actualXML, expect_out=expectXML)
def _alter_compare(self, actualXML, outfile):
utils.test_create(conn, actualXML)
utils.diff_compare(actualXML, outfile)
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 filter(f.endswith, exclude):
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 testAlterGuest(self):
"""
Test changing Guest() parameters after parsing
"""
infile = "tests/xmlparse-xml/change-guest-in.xml"
outfile = "tests/xmlparse-xml/change-guest-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
check = self._make_checker(guest)
check("name", "TestGuest", "change_name")
check("description", None, "Hey desc changed&")
check("maxvcpus", 5, 12)
check("vcpus", 12, 10)
check("cpuset", "1-3", "1-8,^6", "1-5,15")
check("maxmemory", 400, 500)
check("memory", 200, 1000)
check("maxmemory", 1000, 2000)
check("uuid", "12345678-1234-1234-1234-123456789012",
"11111111-2222-3333-4444-555555555555")
check("emulator", "/usr/lib/xen/bin/qemu-dm", "/usr/binnnn/fooemu")
check("hugepage", False, True)
check = self._make_checker(guest.clock)
check("offset", "utc", "localtime")
check = self._make_checker(guest.seclabel)
check("type", "static", "static")
check("model", "selinux", "apparmor")
check("label", "foolabel", "barlabel")
check("imagelabel", "imagelabel", "fooimage")
check = self._make_checker(guest.installer)
check("type", "kvm", "test")
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 = self._make_checker(guest.installer.bootconfig)
check("bootorder", ["hd"], ["fd"])
check("enable_bootmenu", None, False)
check("kernel", None)
check("initrd", None)
check("kernel_args", None)
check = self._make_checker(guest.features)
check("acpi", True, False)
check("apic", True, False)
check("pae", False, True)
def feature_checker(prop, origval, newval):
self.assertEqual(guest.features[prop], origval)
guest.features[prop] = newval
self.assertEqual(guest.features[prop], newval)
feature_checker("acpi", False, False)
feature_checker("apic", False, True)
feature_checker("pae", True, False)
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)
check("sockets", 4, 4)
check = self._make_checker(guest.cpu.features[0])
check("name", "x2apic", "foofeat")
check("policy", "force", "disable")
guest.cpu.remove_feature(guest.cpu.features[1])
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.get_devices("memballoon")[0])
check("model", "virtio", "none")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterMinimalGuest(self):
infile = "tests/xmlparse-xml/change-minimal-guest-in.xml"
outfile = "tests/xmlparse-xml/change-minimal-guest-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
check = self._make_checker(guest.features)
check("acpi", False, True)
check("pae", False)
self.assertTrue(
guest.features.get_xml_config().startswith(""""
"""""")
d = virtinst.VirtualDisk(parsexml=xml)
self._set_and_check(d, "target", "hda", "hdb")
self.assertEquals(xml.replace("hda", "hdb"), d.get_xml_config())
def testAlterChars(self):
infile = "tests/xmlparse-xml/change-chars-in.xml"
outfile = "tests/xmlparse-xml/change-chars-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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]
check = self._make_checker(serial1)
check("char_type", "null")
check = self._make_checker(serial2)
check("char_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("char_type", "unix", "pty")
check = self._make_checker(parallel2)
check("char_type", "udp")
check("bind_port", "1111", "1357")
check("bind_host", "my.bind.host", "my.foo.host")
check("source_mode", "connect")
check("source_port", "2222", "7777")
check("source_host", "my.source.host", "source.foo.host")
check = self._make_checker(console1)
check("char_type", "pty")
check("target_type", None)
check = self._make_checker(console2)
check("char_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("char_type", "pty")
check("target_type", "virtio")
check("target_name", "foo.bar.frob", "test.changed")
check = self._make_checker(channel2)
check("char_type", "unix")
check("target_type", "guestfwd")
check("target_address", "1.2.3.4", "5.6.7.8")
check("target_port", "4567", "1199")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterControllers(self):
infile = "tests/xmlparse-xml/change-controllers-in.xml"
outfile = "tests/xmlparse-xml/change-controllers-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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")
check("index", "3", "9")
check("model", "ich9-uhci3")
check = self._make_checker(dev4.get_master())
check("startport", "4", "2")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterNics(self):
infile = "tests/xmlparse-xml/change-nics-in.xml"
outfile = "tests/xmlparse-xml/change-nics-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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("bridge", None, "br0")
check("network", None, "route")
check("macaddr", "22:11:11:11:11:11", "AA:AA:AA:AA:AA:AA")
self.assertEquals(dev1.get_source(), None)
check = self._make_checker(dev2)
self.assertEquals(dev2.get_source(), "default")
check("network", "default", None)
check("bridge", None, "newbr0")
check("type", "network", "bridge")
check("model", "e1000", "virtio")
check = self._make_checker(dev3)
check("type", "bridge")
check("bridge", "foobr0", "newfoo0")
check("network", None, "default")
check("macaddr", "22:22:22:22:22:22")
check("target_dev", None, "test1")
self.assertEquals(dev3.get_source(), "newfoo0")
check = self._make_checker(dev4)
check("type", "ethernet")
check("source_dev", "eth0", "eth1")
check("target_dev", "nic02", "nic03")
check("target_dev", "nic03", None)
self.assertEquals(dev4.get_source(), "eth1")
check = self._make_checker(dev5)
check("type", "direct")
check("source_dev", "eth0.1")
check("source_mode", "vepa", "bridge")
virtualport = dev5.virtualport
check = self._make_checker(virtualport)
check("type", "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_config_xml(), outfile)
def testAlterInputs(self):
infile = "tests/xmlparse-xml/change-inputs-in.xml"
outfile = "tests/xmlparse-xml/change-inputs-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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_config_xml(), outfile)
def testAlterGraphics(self):
infile = "tests/xmlparse-xml/change-graphics-in.xml"
outfile = "tests/xmlparse-xml/change-graphics-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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]
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 = self._make_checker(dev2)
check("type", "sdl")
check("xauth", "/tmp/.Xauthority", "fooauth")
check("display", "1:2", "6:1")
check = self._make_checker(dev3)
check("type", "rdp")
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("type", "spice")
check("passwd", "foobar", "newpass")
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("passwdValidTo", "2010-04-09T15:51:00", "2011-01-07T19:08:00")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterVideos(self):
infile = "tests/xmlparse-xml/change-videos-in.xml"
outfile = "tests/xmlparse-xml/change-videos-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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_type", "vmvga", "vga")
check("vram", None, "1000")
check("heads", None, "1")
check = self._make_checker(dev2)
check("model_type", "cirrus", "vmvga")
check("vram", "10240", None)
check("heads", "3", "5")
check = self._make_checker(dev3)
check("model_type", "cirrus", "cirrus")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterHostdevs(self):
infile = "tests/xmlparse-xml/change-hostdevs-in.xml"
outfile = "tests/xmlparse-xml/change-hostdevs-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("hostdev")[0]
dev2 = guest.get_devices("hostdev")[1]
dev3 = guest.get_devices("hostdev")[2]
check = self._make_checker(dev1)
check("type", "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", "capabilities")
check("domain", "0x0", "0x4")
check("bus", "0x1", "0x5")
check("slot", "0x2", "0x6")
check("function", "0x3", "0x7")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterWatchdogs(self):
infile = "tests/xmlparse-xml/change-watchdogs-in.xml"
outfile = "tests/xmlparse-xml/change-watchdogs-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("watchdog")[0]
check = self._make_checker(dev1)
check("model", "ib700", "i6300esb")
check("action", "none", "poweroff")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterFilesystems(self):
devtype = "filesystem"
infile = "tests/xmlparse-xml/change-%ss-in.xml" % devtype
outfile = "tests/xmlparse-xml/change-%ss-out.xml" % devtype
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices(devtype)[0]
dev2 = guest.get_devices(devtype)[1]
dev3 = guest.get_devices(devtype)[2]
dev4 = guest.get_devices(devtype)[3]
check = self._make_checker(dev1)
check("type", None, "mount")
check("mode", 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("mode", None, "mapped")
check("source", "template_fedora", "template_new")
check("target", "/bar/baz")
check = self._make_checker(dev3)
check("type", "mount", None)
check("mode", "squash", None)
check("driver", "path", "handle")
check("wrpolicy", "immediate", None)
check("readonly", False, True)
check = self._make_checker(dev4)
check("type", "mount", None)
check("mode", "mapped", None)
check("driver", "path", "handle")
check("wrpolicy", None, "immediate")
check("readonly", False, True)
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterSounds(self):
infile = "tests/xmlparse-xml/change-sounds-in.xml"
outfile = "tests/xmlparse-xml/change-sounds-out.xml"
guest = virtinst.Guest(conn=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_config_xml(), outfile)
def testAlterAddr(self):
infile = "tests/xmlparse-xml/change-addr-in.xml"
outfile = "tests/xmlparse-xml/change-addr-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("disk")[0]
dev2 = guest.get_devices("controller")[0]
dev3 = guest.get_devices("channel")[0]
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)
check("type", "pci")
check("domain", "0x0000", "0x0001")
check("bus", "0x00", "4")
check("slot", "0x04", "10")
check("function", "0x7", "0x6")
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")
self._alter_compare(guest.get_config_xml(), outfile)
def testAlterSmartCard(self):
infile = "tests/xmlparse-xml/change-smartcard-in.xml"
outfile = "tests/xmlparse-xml/change-smartcard-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
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_config_xml(), outfile)
def testAlterRedirdev(self):
infile = "tests/xmlparse-xml/change-redirdev-in.xml"
outfile = "tests/xmlparse-xml/change-redirdev-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("redirdev")[0]
dev2 = guest.get_devices("redirdev")[1]
check = self._make_checker(dev1)
check("host", "foo", "bar")
check("service", "12", "42")
check = self._make_checker(dev2)
check("type", "spicevmc")
self._alter_compare(guest.get_config_xml(), outfile)
def testConsoleCompat(self):
infile = "tests/xmlparse-xml/console-compat-in.xml"
outfile = "tests/xmlparse-xml/console-compat-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
dev1 = guest.get_devices("console")[0]
check = self._make_checker(dev1)
check("source_path", "/dev/pts/4")
self._alter_compare(guest.get_config_xml(), outfile)
def testAddRemoveDevices(self):
infile = "tests/xmlparse-xml/add-devices-in.xml"
outfile = "tests/xmlparse-xml/add-devices-out.xml"
guest = virtinst.Guest(conn=conn,
parsexml=file(infile).read())
rmdev = guest.get_devices("disk")[2]
guest.remove_device(rmdev)
adddev = virtinst.VirtualNetworkInterface(conn=conn, type="network",
network="default",
macaddr="1A:2A:3A:4A:5A:6A")
guest.add_device(virtinst.VirtualWatchdog(conn))
guest.add_device(adddev)
guest.remove_device(adddev)
guest.add_device(adddev)
self._alter_compare(guest.get_config_xml(), outfile)
def testChangeKVMMedia(self):
infile = "tests/xmlparse-xml/change-media-in.xml"
outfile = "tests/xmlparse-xml/change-media-out.xml"
guest = virtinst.Guest(conn=kvmconn,
parsexml=file(infile).read())
disk = guest.get_devices("disk")[0]
check = self._make_checker(disk)
check("path", None, "/default-pool/default-vol")
disk = guest.get_devices("disk")[1]
check = self._make_checker(disk)
check("path", None, "/default-pool/default-vol")
check("path", "/default-pool/default-vol", "/disk-pool/diskvol1")
disk = guest.get_devices("disk")[2]
check = self._make_checker(disk)
check("path", None, "/disk-pool/diskvol1")
disk = guest.get_devices("disk")[3]
check = self._make_checker(disk)
check("path", None, "/default-pool/default-vol")
disk = guest.get_devices("disk")[4]
check = self._make_checker(disk)
check("path", None, "/disk-pool/diskvol1")
self._alter_compare(guest.get_config_xml(), outfile)
if __name__ == "__main__":
unittest.main()
virtinst-0.600.4/tests/scriptimports/ 0000775 0001751 0001751 00000000000 12126270224 021307 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/scriptimports/virtinstall.py 0000777 0001751 0001751 00000000000 12123101335 027221 2../../virt-install ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/scriptimports/virtimage.py 0000777 0001751 0001751 00000000000 12123101335 026251 2../../virt-image ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/scriptimports/__init__.py 0000664 0001751 0001751 00000000000 12123101335 023377 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/scriptimports/virtconvert.py 0000777 0001751 0001751 00000000000 12123101335 027245 2../../virt-convert ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/scriptimports/virtclone.py 0000777 0001751 0001751 00000000000 12123101335 026305 2../../virt-clone ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/testdriver.xml 0000664 0001751 0001751 00000106524 12123101335 021303 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-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
default
715666b7-dbd4-6c78-fa55-94863da09f2d
route
715666b7-aaaa-6c78-fa55-94863da09f2d
default-pool
35bb2ad9-388a-cdfe-461a-b8907f6e53fe
107374182400
0
107374182400
/default-pool
0700
10736
10736
default-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
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
/cross-pool
0700
10736
10736
testvol1.img
1000000
50000
0700
10736
10736
testvol2.img
1000000
50000
0700
10736
10736
disk-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5aaa
107374182400
0
107374182400
/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
full-pool
35bb2ad9-388a-cdfe-461a-b8907f6e5555
1
1
0
/full-pool
0700
10736
10736
testvol1.img
107374182400
107374182400
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
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_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
0
21
0
0
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
0
0
0
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_SATA_WDC_WD1600AAJS__WD_WCAP95119685
pci_8086_27c0_scsi_host_scsi_device_lun0
/dev/sda
scsi
disk
WDC WD1600AAJS-2
ATA
160041885696
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
foobar
storage_model_DVDRAM_GSA_U10N
pci_8086_2850_scsi_host_scsi_device_lun0
/dev/sr0
pci
cdrom
DVDRAM GSA-U10N
HL-DT-ST
0
0
storage_serial_ST910021AS_5MH04L87
pci_8086_2829_scsi_host_scsi_device_lun0
/dev/sda
pci
disk
ST910021AS
ATA
ST910021AS_5MH04L87
100030242816
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_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
virtinst-0.600.4/tests/capabilities.py 0000664 0001751 0001751 00000025353 12123101335 021371 0 ustar crobinso crobinso 0000000 0000000 #
# 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
import virtinst.CapabilitiesParser as capabilities
def build_host_feature_dict(feature_list):
fdict = {}
for f in feature_list:
fdict[f] = capabilities.FEATURE_ON
return fdict
class TestCapabilities(unittest.TestCase):
def _compareGuest(self, (arch, os_type, domains, features), guest):
self.assertEqual(arch, guest.arch)
self.assertEqual(os_type, guest.os_type)
self.assertEqual(len(domains), len(guest.domains))
for n in range(len(domains)):
self.assertEqual(domains[n][0], guest.domains[n].hypervisor_type)
self.assertEqual(domains[n][1], guest.domains[n].emulator)
self.assertEqual(domains[n][2], guest.domains[n].machines)
for n in features:
self.assertEqual(features[n], guest.features[n])
def _buildCaps(self, filename):
path = os.path.join("tests/capabilities-xml", filename)
xml = file(path).read()
return capabilities.parse(xml)
def _testCapabilities(self, path, (host_arch, host_features), guests,
secmodel=None):
caps = self._buildCaps(path)
if host_arch:
self.assertEqual(host_arch, caps.host.arch)
for n in host_features:
self.assertEqual(host_features[n], caps.host.features[n])
if secmodel:
self.assertEqual(secmodel[0], caps.host.secmodel.model)
self.assertEqual(secmodel[1], caps.host.secmodel.doi)
map(self._compareGuest, guests, caps.guests)
def testCapabilities1(self):
host = ( 'x86_64', {'vmx': capabilities.FEATURE_ON})
guests = [
( 'x86_64', 'xen',
[['xen', None, []]], {} ),
( 'i686', 'xen',
[['xen', None, []]], { 'pae': capabilities.FEATURE_ON } ),
( 'i686', 'hvm',
[['xen', "/usr/lib64/xen/bin/qemu-dm", ['pc', 'isapc']]], { 'pae': capabilities.FEATURE_ON | capabilities.FEATURE_OFF } ),
( 'x86_64', 'hvm',
[['xen', "/usr/lib64/xen/bin/qemu-dm", ['pc', 'isapc']]], {} )
]
self._testCapabilities("capabilities-xen.xml", host, guests)
def testCapabilities2(self):
host = ( 'x86_64', {})
secmodel = ('selinux', '0')
guests = [
( 'x86_64', 'hvm',
[['qemu', '/usr/bin/qemu-system-x86_64', ['pc', 'isapc']]], {} ),
( 'i686', 'hvm',
[['qemu', '/usr/bin/qemu', ['pc', 'isapc']]], {} ),
( 'mips', 'hvm',
[['qemu', '/usr/bin/qemu-system-mips', ['mips']]], {} ),
( 'mipsel', 'hvm',
[['qemu', '/usr/bin/qemu-system-mipsel', ['mips']]], {} ),
( 'sparc', 'hvm',
[['qemu', '/usr/bin/qemu-system-sparc', ['sun4m']]], {} ),
( 'ppc', 'hvm',
[['qemu', '/usr/bin/qemu-system-ppc',
['g3bw', 'mac99', 'prep']]], {} ),
]
self._testCapabilities("capabilities-qemu.xml", host, guests, secmodel)
def testCapabilities3(self):
host = ( 'i686', {})
guests = [
( 'i686', 'hvm',
[['qemu', '/usr/bin/qemu', ['pc', 'isapc']],
['kvm', '/usr/bin/qemu-kvm', ['pc', 'isapc']]], {} ),
( 'x86_64', 'hvm',
[['qemu', '/usr/bin/qemu-system-x86_64', ['pc', 'isapc']]], {} ),
( 'mips', 'hvm',
[['qemu', '/usr/bin/qemu-system-mips', ['mips']]], {} ),
( 'mipsel', 'hvm',
[['qemu', '/usr/bin/qemu-system-mipsel', ['mips']]], {} ),
( 'sparc', 'hvm',
[['qemu', '/usr/bin/qemu-system-sparc', ['sun4m']]], {} ),
( 'ppc', 'hvm',
[['qemu', '/usr/bin/qemu-system-ppc',
['g3bw', 'mac99', 'prep']]], {} ),
]
self._testCapabilities("capabilities-kvm.xml", host, guests)
def testCapabilities4(self):
host = ( 'i686',
{ 'pae': capabilities.FEATURE_ON | capabilities.FEATURE_OFF })
guests = [
( 'i686', 'linux',
[['test', None, []]],
{ 'pae': capabilities.FEATURE_ON | capabilities.FEATURE_OFF } ),
]
self._testCapabilities("capabilities-test.xml", host, guests)
def testCapsLXC(self):
guests = [
("x86_64", "exe", [["lxc", "/usr/libexec/libvirt_lxc", []]], {}),
("i686", "exe", [["lxc", "/usr/libexec/libvirt_lxc", []]], {}),
]
self._testCapabilities("capabilities-lxc.xml",
(None, None), guests)
def testCapsTopology(self):
filename = "capabilities-test.xml"
caps = self._buildCaps(filename)
self.assertTrue(bool(caps.host.topology))
self.assertTrue(len(caps.host.topology.cells) == 2)
self.assertTrue(len(caps.host.topology.cells[0].cpus) == 8)
self.assertTrue(len(caps.host.topology.cells[0].cpus) == 8)
def testCapsCPUFeaturesOldSyntax(self):
filename = "rhel5.4-xen-caps-virt-enabled.xml"
host_feature_list = ["vmx"]
feature_dict = build_host_feature_dict(host_feature_list)
caps = self._buildCaps(filename)
for f in feature_dict.keys():
self.assertEquals(caps.host.features[f], feature_dict[f])
def testCapsCPUFeaturesOldSyntaxSVM(self):
filename = "rhel5.4-xen-caps.xml"
host_feature_list = ["svm"]
feature_dict = build_host_feature_dict(host_feature_list)
caps = self._buildCaps(filename)
for f in feature_dict.keys():
self.assertEquals(caps.host.features[f], feature_dict[f])
def testCapsCPUFeaturesNewSyntax(self):
filename = "libvirt-0.7.6-qemu-caps.xml"
host_feature_list = ['lahf_lm', 'xtpr', 'cx16', 'tm2', 'est', 'vmx',
'ds_cpl', 'pbe', 'tm', 'ht', 'ss', 'acpi', 'ds']
feature_dict = build_host_feature_dict(host_feature_list)
caps = self._buildCaps(filename)
for f in feature_dict.keys():
self.assertEquals(caps.host.features[f], feature_dict[f])
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):
new_caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml")
new_caps_no_kvm = self._buildCaps(
"libvirt-0.7.6-qemu-no-kvmcaps.xml")
empty_caps = self._buildCaps("empty-caps.xml")
rhel_xen_enable_hvm_caps = self._buildCaps(
"rhel5.4-xen-caps-virt-enabled.xml")
rhel_xen_caps = self._buildCaps("rhel5.4-xen-caps.xml")
rhel_kvm_caps = self._buildCaps("rhel5.4-kvm-caps.xml")
def test_utils(caps, no_guests, is_hvm, is_kvm, is_bios_disable,
is_xenner):
self.assertEquals(caps.no_install_options(), no_guests)
self.assertEquals(caps.hw_virt_supported(), is_hvm)
self.assertEquals(caps.is_kvm_available(), is_kvm)
self.assertEquals(caps.is_bios_virt_disabled(), is_bios_disable)
self.assertEquals(caps.is_xenner_available(), is_xenner)
test_utils(new_caps, False, True, True, False, True)
test_utils(empty_caps, True, False, False, False, False)
test_utils(rhel_xen_enable_hvm_caps, False, True, False, False, False)
test_utils(rhel_xen_caps, False, True, False, True, False)
test_utils(rhel_kvm_caps, False, True, True, False, False)
test_utils(new_caps_no_kvm, False, True, False, False, False)
def testCPUMap(self):
caps = self._buildCaps("libvirt-0.7.6-qemu-caps.xml")
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, vendors, features, cpus):
cpunames = sorted(map(lambda c: c.model, cpumap.cpus),
key=str.lower)
for v in vendors:
self.assertTrue(v in cpumap.vendors)
for f in features:
self.assertTrue(f in cpumap.features)
for c in cpus:
self.assertTrue(c in cpunames)
def test_single_cpu(cpumap, model, vendor, features):
cpu = cpumap.get_cpu(model)
self.assertEquals(cpu.vendor, vendor)
self.assertEquals(cpu.features, features)
self.assertEquals(cpu_64, cpu_32)
x86_vendors = ["AMD", "Intel"]
x86_features = [
'3dnow', '3dnowext', '3dnowprefetch', 'abm', 'acpi', 'apic',
'cid', 'clflush', 'cmov', 'cmp_legacy', 'cr8legacy', 'cx16',
'cx8', 'dca', 'de', 'ds', 'ds_cpl', 'est', 'extapic', 'fpu',
'fxsr', 'fxsr_opt', 'ht', 'hypervisor', 'ia64', 'lahf_lm', 'lm',
'mca', 'mce', 'misalignsse', 'mmx', 'mmxext', 'monitor', 'msr',
'mtrr', 'nx', 'osvw', 'pae', 'pat', 'pbe', 'pdpe1gb', 'pge', 'pn',
'pni', 'popcnt', 'pse', 'pse36', 'rdtscp', 'sep', 'skinit', 'ss',
'sse', 'sse2', 'sse4.1', 'sse4.2', 'sse4a', 'ssse3', 'svm',
'syscall', 'tm', 'tm2', 'tsc', 'vme', 'vmx', 'wdt', 'x2apic',
'xtpr']
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_vendors, x86_features, x86_cpunames)
test_cpu_map(cpu_random, [], [], [])
athlon_features = [
'3dnow', '3dnowext', 'apic', 'cmov', 'cx8', 'de', 'fpu', 'fxsr',
'mce', 'mmx', 'mmxext', 'msr', 'mtrr', 'pae', 'pat', 'pge', 'pse',
'pse36', 'sep', 'sse', 'sse2', 'tsc', 'vme']
test_single_cpu(cpu_64, "athlon", "AMD", athlon_features)
if __name__ == "__main__":
unittest.main()
virtinst-0.600.4/tests/interface.py 0000664 0001751 0001751 00000016322 12123101335 020674 0 ustar crobinso crobinso 0000000 0000000 #
# 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
import virtinst.Interface
from virtinst.Interface import (Interface, InterfaceProtocol,
InterfaceProtocolIPAddress)
import utils
conn = utils.open_testdriver()
datadir = "tests/interface-xml"
vlan_iface = conn.interfaceLookupByName("vlaneth1")
bond_iface = conn.interfaceLookupByName("bond-brbond")
eth_iface1 = conn.interfaceLookupByName("eth0")
eth_iface2 = conn.interfaceLookupByName("eth1")
eth_iface3 = conn.interfaceLookupByName("eth2")
br_iface = conn.interfaceLookupByName("brempty")
class TestInterfaces(unittest.TestCase):
def setUp(self):
pass
def build_interface(self, interface_type, name):
iclass = Interface.interface_class_for_type(interface_type)
iobj = iclass(name, conn)
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
iface_obj.protocols = [virtinst.Interface.InterfaceProtocolIPv4()]
def add_child_interfaces(self, iface_obj):
if iface_obj.object_type == Interface.INTERFACE_TYPE_BRIDGE:
iface_obj.interfaces.append(vlan_iface)
iface_obj.interfaces.append(bond_iface)
iface_obj.interfaces.append(eth_iface1)
elif iface_obj.object_type == Interface.INTERFACE_TYPE_BOND:
iface_obj.interfaces.append(eth_iface1)
iface_obj.interfaces.append(eth_iface2)
iface_obj.interfaces.append(eth_iface3)
def define_xml(self, obj, compare=True):
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_ip1 = InterfaceProtocolIPAddress("129.63.1.2")
iface_ip2 = InterfaceProtocolIPAddress("255.255.255.0")
iface_proto1 = InterfaceProtocol.protocol_class_for_family(
InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV4)()
iface_proto1.ips = [iface_ip1, iface_ip2]
iface_proto1.gateway = "1.2.3.4"
iface_proto1.dhcp = True
iface_proto1.dhcp_peerdns = True
# IPv6 proto
iface_ip3 = InterfaceProtocolIPAddress("fe99::215:58ff:fe6e:5",
prefix="32")
iface_ip4 = InterfaceProtocolIPAddress("fe80::215:58ff:fe6e:5",
prefix="64")
iface_proto2 = InterfaceProtocol.protocol_class_for_family(
InterfaceProtocol.INTERFACE_PROTOCOL_FAMILY_IPV6)()
iface_proto2.ips = [iface_ip3, iface_ip4]
iface_proto2.gateway = "1.2.3.4"
iface_proto2.dhcp = True
iface_proto2.dhcp_peerdns = True
iface_proto2.autoconf = True
obj.protocols = [iface_proto1, 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.monitor_mode = "arpmon"
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.monitor_mode = "miimon"
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 = eth_iface3
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")
obj.protocol_xml = protoxml
self.define_xml(obj)
if __name__ == "__main__":
unittest.main()
virtinst-0.600.4/tests/support.py 0000664 0001751 0001751 00000003106 12123101335 020444 0 ustar crobinso crobinso 0000000 0000000 #
# 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 support
import utils
conn = utils.open_testdriver()
class TestSupport(unittest.TestCase):
def testSupportCollide(self):
"""
Verify no support.SUPPORT* have the same value
"""
valdict = {}
supportnames = filter(lambda x: x.startswith("SUPPORT"),
dir(support))
for supportname in supportnames:
checkval = int(getattr(support, supportname))
if checkval in valdict.values():
collidename = "unknown?"
for key, val in valdict.items():
if val == checkval:
collidename = key
break
raise AssertionError("%s == %s" % (collidename, supportname))
valdict[supportname] = checkval
if __name__ == "__main__":
unittest.main()
virtinst-0.600.4/tests/cli-test-xml/ 0000775 0001751 0001751 00000000000 12126270224 020707 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/ 0000775 0001751 0001751 00000000000 12126270223 022560 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/vmx/ 0000775 0001751 0001751 00000000000 12126270224 023373 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/vmx/root.raw 0000664 0001751 0001751 00000000000 12123101335 025050 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/vmx/data.raw 0000664 0001751 0001751 00000000000 12123101335 024776 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/vmx/test1.vmx 0000664 0001751 0001751 00000003033 12123101335 025157 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"
virtinst-0.600.4/tests/cli-test-xml/virtconv/vmx/scratch.raw 0000664 0001751 0001751 00000000000 12123101335 025514 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/virtimage/ 0000775 0001751 0001751 00000000000 12126270224 024550 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/virtimage/root.raw 0000664 0001751 0001751 00000000000 12123101335 026225 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/virtimage/data.raw 0000664 0001751 0001751 00000000000 12123101335 026153 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/virtconv/virtimage/test1.virt-image 0000664 0001751 0001751 00000002376 12123101335 027577 0 ustar crobinso crobinso 0000000 0000000
test-image
xen
i386
pygrub
i686
hvm
7
262144
virtinst-0.600.4/tests/cli-test-xml/virtconv/virtimage/scratch.raw 0000664 0001751 0001751 00000000000 12123101335 026671 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/clone-disk-managed.xml 0000664 0001751 0001751 00000001221 12123101335 025040 0 ustar crobinso crobinso 0000000 0000000
origtest
db69fa1f-eef0-e567-3c20-3ef16f10376b
8388608
2097152
2
hvm
destroy
restart
destroy
virtinst-0.600.4/tests/cli-test-xml/clone-disk.xml 0000664 0001751 0001751 00000001677 12123101335 023465 0 ustar crobinso crobinso 0000000 0000000
origtest
db69fa1f-eef0-e567-3c20-3ef16f10376b
8388608
2097152
2
hvm
destroy
restart
destroy
virtinst-0.600.4/tests/cli-test-xml/image.xml 0000664 0001751 0001751 00000001763 12123101335 022513 0 ustar crobinso crobinso 0000000 0000000
xen
i686
pygrub
i686
hvm
7
262144
virtinst-0.600.4/tests/cli-test-xml/clone-disk-noexist.xml 0000664 0001751 0001751 00000001711 12123101335 025141 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
virtinst-0.600.4/tests/cli-test-xml/image-nogfx.xml 0000664 0001751 0001751 00000001740 12123101335 023625 0 ustar crobinso crobinso 0000000 0000000
xen
i686
pygrub
i686
hvm
7
262144
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/ 0000775 0001751 0001751 00000000000 12126270224 023436 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/ 0000775 0001751 0001751 00000000000 12126270224 024703 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/boot.iso 0000664 0001751 0001751 00000000010 12123101335 026342 0 ustar crobinso crobinso 0000000 0000000 testiso
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12126270224 026363 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/pxeboot/initrd.img 0000664 0001751 0001751 00000000013 12123101335 030335 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/pxeboot/vmlinuz 0000664 0001751 0001751 00000000014 12123101335 027776 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/xen/ 0000775 0001751 0001751 00000000000 12126270224 025475 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/xen/initrd.img 0000664 0001751 0001751 00000000013 12123101335 027447 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/images/xen/vmlinuz 0000664 0001751 0001751 00000000014 12123101335 027110 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virtinst-0.600.4/tests/cli-test-xml/fakerhel6tree/.treeinfo 0000664 0001751 0001751 00000003161 12123101335 025244 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
virtinst-0.600.4/tests/cli-test-xml/compare/ 0000775 0001751 0001751 00000000000 12126270224 022335 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/compare/simple-pxe.xml 0000664 0001751 0001751 00000002430 12123101335 025132 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
virtinst-0.600.4/tests/cli-test-xml/compare/image-boot0.xml 0000664 0001751 0001751 00000001603 12123101335 025153 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
7
/usr/bin/pygrub
destroy
restart
restart
virtinst-0.600.4/tests/cli-test-xml/compare/image-boot1.xml 0000664 0001751 0001751 00000001627 12123101335 025162 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
7
hvm
destroy
restart
restart
/usr/bin/test-hv
virtinst-0.600.4/tests/cli-test-xml/compare/qemu-32-on-64.xml 0000664 0001751 0001751 00000001317 12123101335 025104 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
virtinst-0.600.4/tests/cli-test-xml/compare/noargs-fail.xml 0000664 0001751 0001751 00000000257 12123101335 025256 0 ustar crobinso crobinso 0000000 0000000 ERROR
--disk storage must be specified (override with --nodisks)
An install method must be specified
(--location URL, --cdrom CD/ISO, --pxe, --import, --boot hd|cdrom|...) virtinst-0.600.4/tests/cli-test-xml/compare/xen-ia64-pv.xml 0000664 0001751 0001751 00000003226 12123101335 025031 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
linux
./virtinst-vmlinuz.
./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
virtinst-0.600.4/tests/cli-test-xml/compare/kvm-win2k3-cdrom.xml 0000664 0001751 0001751 00000006660 12123101335 026072 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
virtinst-0.600.4/tests/cli-test-xml/compare/kvm-machine.xml 0000664 0001751 0001751 00000001664 12123101335 025256 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-kvm
virtinst-0.600.4/tests/cli-test-xml/compare/xen-hvm.xml 0000664 0001751 0001751 00000002156 12123101335 024436 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
virtinst-0.600.4/tests/cli-test-xml/compare/fs-default.xml 0000664 0001751 0001751 00000001200 12123101335 025073 0 ustar crobinso crobinso 0000000 0000000
foolxc
00000000-1111-2222-3333-444444444444
65536
65536
1
exe
/sbin/init
destroy
restart
restart
/usr/libexec/libvirt_lxc
virtinst-0.600.4/tests/cli-test-xml/compare/convert-default.xml 0000664 0001751 0001751 00000000332 12123101335 026150 0 ustar crobinso crobinso 0000000 0000000 Generating output in 'virt-image' format to /tmp/__virtinst_tests__virtconv-outdir/
Converting disk 'root.raw' to type raw...
Converting disk 'scratch.raw' to type raw...
Converting disk 'data.raw' to type raw...
Done. virtinst-0.600.4/tests/cli-test-xml/compare/xen-ia64-default.xml 0000664 0001751 0001751 00000001400 12123101335 026020 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
/usr/bin/pygrub
destroy
restart
restart
virtinst-0.600.4/tests/cli-test-xml/compare/clone-auto2.xml 0000664 0001751 0001751 00000002016 12123101335 025177 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
virtinst-0.600.4/tests/cli-test-xml/compare/image-nogfx.xml 0000664 0001751 0001751 00000001434 12123101335 025253 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
7
/usr/bin/pygrub
destroy
restart
restart
virtinst-0.600.4/tests/cli-test-xml/compare/many-devices.xml 0000664 0001751 0001751 00000012242 12123101335 025435 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/foo/bar
destroy
destroy
destroy
/usr/bin/test-hv
WD-WMAP9A966149
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/foo/bar
destroy
restart
restart
/usr/bin/test-hv
WD-WMAP9A966149
virtinst-0.600.4/tests/cli-test-xml/compare/qemu-plain.xml 0000664 0001751 0001751 00000001521 12123101335 025117 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
virtinst-0.600.4/tests/cli-test-xml/compare/w2k3-cdrom.xml 0000664 0001751 0001751 00000006006 12123101335 024742 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
virtinst-0.600.4/tests/cli-test-xml/compare/clone-auto1.xml 0000664 0001751 0001751 00000004316 12123101335 025203 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
virtinst-0.600.4/tests/cli-test-xml/compare/qemu-sparc.xml 0000664 0001751 0001751 00000001501 12123101335 025122 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
destroy
restart
restart
/usr/bin/qemu-system-sparc
virtinst-0.600.4/tests/cli-test-xml/compare/xen-ia64-hvm.xml 0000664 0001751 0001751 00000003726 12123101335 025203 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/usr/lib/xen/boot/hvmloader
./virtinst-vmlinuz.
./virtinst-initrd.img.
method=tests/cli-test-xml/faketree
destroy
destroy
destroy
/usr/lib/xen/bin/qemu-dm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
/usr/lib/xen/boot/hvmloader
destroy
restart
restart
/usr/lib/xen/bin/qemu-dm
virtinst-0.600.4/tests/cli-test-xml/compare/kvm-f14-url.xml 0000664 0001751 0001751 00000006500 12123101335 025036 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
./virtinst-vmlinuz.
./virtinst-initrd.img.
method=tests/cli-test-xml/faketree console=ttyS0
core2duo
Intel
destroy
destroy
destroy
/usr/bin/qemu-kvm
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
hvm
core2duo
Intel
destroy
restart
restart
/usr/bin/qemu-kvm
virtinst-0.600.4/tests/cli-test-xml/compare/cpuset-auto.xml 0000664 0001751 0001751 00000002520 12123101335 025320 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
virtinst-0.600.4/tests/cli-test-xml/compare/quiet-url.xml 0000664 0001751 0001751 00000000000 12123101335 024765 0 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/compare/default.xml 0000664 0001751 0001751 00000001044 12123101335 024473 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
virtinst-0.600.4/tests/cli-test-xml/compare/xen-default.xml 0000664 0001751 0001751 00000001400 12123101335 025257 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
/usr/bin/pygrub
destroy
restart
restart
virtinst-0.600.4/tests/cli-test-xml/compare/manual-init.xml 0000664 0001751 0001751 00000001053 12123101335 025265 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
virtinst-0.600.4/tests/cli-test-xml/compare/xen-pv.xml 0000664 0001751 0001751 00000003230 12123101335 024263 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
linux
./virtinst-vmlinuz.
./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
virtinst-0.600.4/tests/cli-test-xml/compare/kvm-xenner.xml 0000664 0001751 0001751 00000001212 12123101335 025136 0 ustar crobinso crobinso 0000000 0000000
foobar
00000000-1111-2222-3333-444444444444
65536
65536
1
/usr/bin/pygrub
destroy
restart
restart
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/ 0000775 0001751 0001751 00000000000 12126270224 023656 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/ 0000775 0001751 0001751 00000000000 12126270224 025123 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/boot.iso 0000664 0001751 0001751 00000000010 12123101335 026562 0 ustar crobinso crobinso 0000000 0000000 testiso
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12126270224 026603 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/pxeboot/initrd.img 0000664 0001751 0001751 00000000013 12123101335 030555 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/pxeboot/vmlinuz 0000664 0001751 0001751 00000000014 12123101335 030216 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/xen/ 0000775 0001751 0001751 00000000000 12126270224 025715 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/xen/initrd.img 0000664 0001751 0001751 00000000013 12123101335 027667 0 ustar crobinso crobinso 0000000 0000000 testinitrd
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/images/xen/vmlinuz 0000664 0001751 0001751 00000000014 12123101335 027330 0 ustar crobinso crobinso 0000000 0000000 testvmlinuz
virtinst-0.600.4/tests/cli-test-xml/fakefedoratree/.treeinfo 0000664 0001751 0001751 00000001635 12123101335 025470 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
virtinst-0.600.4/tests/cli-test-xml/faketree/ 0000775 0001751 0001751 00000000000 12126270223 022474 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/faketree/images/ 0000775 0001751 0001751 00000000000 12126270224 023742 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/faketree/images/boot.iso 0000664 0001751 0001751 00000000010 12123101335 025401 0 ustar crobinso crobinso 0000000 0000000 testiso
virtinst-0.600.4/tests/cli-test-xml/faketree/images/pxeboot/ 0000775 0001751 0001751 00000000000 12126270224 025422 5 ustar crobinso crobinso 0000000 0000000 virtinst-0.600.4/tests/cli-test-xml/faketree/images/pxeboot/initrd.img 0000664 0001751 0001751 00025567763 12123101335 027441 0 ustar crobinso crobinso 0000000 0000000 ‹ KYFÜý\T]×0Ï0ÂÐ( ]*)ÝÝ©RÒ2tçÐ )*¤¤¨„”twIw7ÒÝCÍ|ƒ—^Ï×s?÷ýþ¿÷ù}ßÿÀÞ{uÖÚkíuÖ^k\‚\‚\Ü\|2r\ÒBÜ\¨ƒ[AŽë¯>~aa9>™¿Gÿ·ô¿žß €ëoäIó_ㄸeøþ>î¿—Ç«ðoÊ“ýSž©»½¹«›‰ƒ3 @©!ÈÅÏ#ÈÍÍÅÍá%$ àÃV°0w‚š`þ¬ÝÜœE89MÝ|lìíM8 æÖ&nfNا»ðÿ`+ž?tçýOmõ§-Ü~êüwö’¾ÆKs+(ü{öâ’þ7eòÿlmÜ NWSGÎ?à¿[³Ðÿí5»z»þÚ…øÿ™¼ÿ‡>ù§L7³),ôŸù%Šóß“)ü729M fÖ À/7ü{ùòÈ—þ·äórËòÿ›òþV¾…·ƒ‰³+‡•jù ÚpL€¡=H
´•#^®lOMHî‘øÀôý¹(Þðn™TÍ-¾ýÑIít3:´ûP54%Ì!dËãìùe]-b'ë©¥Rq‡c×Ï™)9â÷ûGµû²ËGËV½,wwêªEYïVÓbR2~8Ûæ=¼Ø=”pW$½ìßjp -;"p˜,#†|,§^[«w˜êçé(w 5œOIÛè×l7œ îÄ80–5›Âⲫí
ÍVS^ƒd›ÏN<ƒ7.¢«Ú˶)NœÆk\vÓž´žÎÍá}¸}ØR¶±»û|f
|.øu»¹MºulùÔs)z±Œà8÷)«gVûJ¼ÚÏxû³s›©AÌ÷¼EÄ(Sy”üTÀG+Z\ û
Ô öæäêX½œš<6¼œz«ÄÍ/Ǩ7ÆÝ¦´GFææª=ØžBó;Ë^Îo—n®D>•Å^•tñ/“÷ƒ•;èDíG²w½‡x¶G,#kh8)õpÐôíÃð`2ö²èœÄðpÏûæ6!|õ-pdil6,2/¸sê~Á3eüÙtÿ×Ô5²W—¢•ÛO¼ú0Êíçj]¦J¯fòüÙ©(ƳËêq€Ç¬þ^0ÏÛÎ~KáÏ篧ž—äØ=©ß#¿äG€¡Ïп»Šõg… ƒHX¬C„ˆRBÞqU.
oŠÌäÒSŸÛÜÃ뿹ýùiÉ˲!|žmbK›VÆDïÆkr…ðkeÌžn¸Í~<ð‘ y^וioðáš.š¢q^ÒT_6nÈÝ
”÷ewÈsͶê9›Ý›<¤~U
G†Ó@ù:ö9‡_Tþ§'|´4Vɧ*n¼O
2¸ÝvoÖëÇÚf9o•à'ãþ¦Ö&gö–»+¾ç\ÖûrÊÌõ`‰7¿~TkDMœ‹´¥þb«þ´Ñÿâ+¢¼!oNI‚4¿‘;g2—6·¡Í'1[hÛÙkÙû´÷cïýÞ,Õªª¯TÃäÌÚÖŽ˜å7?LfeÔ“~yž:tZ÷’ ‘e`p±ÖŒk˜À…cé:Üêiœ1`‰Ù,«ÂšÚžö¦<Ùf3ð®!ˆ"6\熻z²ìøÃ±Hˆñ}IÀê)•óR¤[Û,Ÿ»/Þ‰k2‚÷uhÛÝŒä%§å—’ñá¯ñûàåRßΩ¯Rü÷a¤sjÏâ40óóÍnŠï+ˆË1ûmr˜á«®={ÃÈÕùJ/š”(ÒyBÃÔ^€Œñ¨æŠ[`gÌÓEŽé)ðlP¹©øÁ~TpЩ]tOµGp‰dú•³[~³¸—`~ûŒ¥csëx(람Ûñ½MJ^*lƒç
F*,3!в>Øã…Œ\IŠÈQ9=ØpÄóó4HÖoÊ&»pÁx¤œkÕ€µ*Žâ1lÔɘ÷¹Ë]Õ6Ƥ¦>³ñ/áKô%…÷^膇¸_æÓ/F
q‡h´`(GI*¯FÕkIv.¦ªÕwƒ('A›éŠ#^Æœã)OAžƒ)læºåã4i’] äù!JȧÐb‚’˜§{z[Áá§
Üc ,‚i¬ÏÞómчïÌGñÊÀ‰f¾
Þ\´lv@6SÝüŠ™QûÌûåÀÆI«Íz¡.P}Ó³þN‘ÓæDb‚šWÚMòÊÀJñ½OT4^ܘW÷ÊÀ;ÏÅöô¢³‘6+±í¤4Ïýè¨ò÷Â4‘˜ŸÚh»ÁûQÍ”áH¢}ñÞõÀ÷¾óñ›ÀP°J“-¸¨jEëqÝ‚ˆ\šòá^C$˜«H,íª“j5a‹êºPóóO`æ&P»†Ø¹”¹Ù·X{Ô.‡Ðã ™opö€Ú}½¹\ýÅâÎÞÇíâóëCf952·¿1å©×|òÖ
/9 ÛÀcϰ_µ9¾9×ù#Ú< OhÅ
&î|#ÆXk$£3¨?¬iEˆ|xÂt·éœižD¦‡{3êP™1Œ4lMF÷Æ"#Äà⥇YÈшÙ{ûJœ
³Š“ÍÇ$‚aYö¸ýØÉ ·`lP|¬…7/àâ™]È1ä}#À!ÉŸŸ a¯GèVL¼¤2Ǩ˜[ \srŠ#GÊîÑ·ÎOìÓZ<_+%gNŽbm4ž=Ô1§¹Ä„÷2<óâIÛ-¥¬ï«,h
¿)¬-ŠÓ¦:`5ä གྷ†[.ª/K¼¸¢!‡ Þè.òÝûSQoƒn{}á’$ÙùU˜%9pñnw8Ô™,k,8PÄ/¼(w¹jLÐÛê-D{Q´"—ßúaZƒïÔ0÷»Ä7z=6/1urFPÐÞµg w¨A«Ÿkf%Êå
²Û³¬!vjy´wß0”uÿ.îÑ™šÿ%ikÀ³Ë.òþ£Tàr;,7ÞŽ¦£7+ŒæIs€ˆÜX¨1@m(óG€iÝÌç•Êì¡2nîø‚&»–7YX¿sOæK£<9nc#€ E[0Øåï.ÑÔÝ øHbŸ§VªŽè½nâ^3Ãkº,ÇG`)&