tests: Add recent libvirt capabilities, share URIs better

This commit is contained in:
Cole Robinson 2013-08-18 08:19:58 -04:00
parent 414f6bbd99
commit 8c6149d3f3
3 changed files with 642 additions and 34 deletions

View File

@ -0,0 +1,615 @@
<capabilities>
<host>
<uuid>39303242-3334-3636-3341-3745ffffffff</uuid>
<cpu>
<arch>x86_64</arch>
<model>core2duo</model>
<vendor>Intel</vendor>
<topology sockets='7' cores='5' threads='3'/>
<feature name='lahf_lm'/>
<feature name='xtpr'/>
<feature name='cx16'/>
<feature name='tm2'/>
<feature name='est'/>
<feature name='vmx'/>
<feature name='ds_cpl'/>
<feature name='pbe'/>
<feature name='tm'/>
<feature name='ht'/>
<feature name='ss'/>
<feature name='acpi'/>
<feature name='ds'/>
</cpu>
<power_management>
<suspend_mem/>
<suspend_disk/>
<suspend_hybrid/>
</power_management>
<migration_features>
<live/>
<uri_transports>
<uri_transport>tcp</uri_transport>
</uri_transports>
</migration_features>
<topology>
<cells num='1'>
<cell id='0'>
<memory unit='KiB'>16757988</memory>
<cpus num='8'>
<cpu id='0' socket_id='0' core_id='0' siblings='0-1'/>
<cpu id='1' socket_id='0' core_id='1' siblings='0-1'/>
<cpu id='2' socket_id='0' core_id='5' siblings='2,5'/>
<cpu id='3' socket_id='0' core_id='7' siblings='3-4'/>
<cpu id='4' socket_id='0' core_id='6' siblings='3-4'/>
<cpu id='5' socket_id='0' core_id='4' siblings='2,5'/>
<cpu id='6' socket_id='0' core_id='3' siblings='6-7'/>
<cpu id='7' socket_id='0' core_id='2' siblings='6-7'/>
</cpus>
</cell>
</cells>
</topology>
<secmodel>
<model>selinux</model>
<doi>0</doi>
</secmodel>
<secmodel>
<model>dac</model>
<doi>0</doi>
</secmodel>
</host>
<guest>
<os_type>hvm</os_type>
<arch name='alpha'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-alpha</emulator>
<machine maxCpus='4'>clipper</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='armv7l'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-arm</emulator>
<machine maxCpus='1'>integratorcp</machine>
<machine maxCpus='1'>z2</machine>
<machine maxCpus='1'>xilinx-zynq-a9</machine>
<machine maxCpus='4'>vexpress-a15</machine>
<machine maxCpus='4'>vexpress-a9</machine>
<machine maxCpus='1'>versatileab</machine>
<machine maxCpus='1'>versatilepb</machine>
<machine maxCpus='1'>tosa</machine>
<machine maxCpus='1'>lm3s6965evb</machine>
<machine maxCpus='1'>lm3s811evb</machine>
<machine maxCpus='1'>terrier</machine>
<machine maxCpus='1'>borzoi</machine>
<machine maxCpus='1'>spitz</machine>
<machine maxCpus='1'>akita</machine>
<machine maxCpus='4'>realview-pbx-a9</machine>
<machine maxCpus='1'>realview-pb-a8</machine>
<machine maxCpus='4'>realview-eb-mpcore</machine>
<machine maxCpus='1'>realview-eb</machine>
<machine maxCpus='1'>cheetah</machine>
<machine maxCpus='1'>sx1-v1</machine>
<machine maxCpus='1'>sx1</machine>
<machine maxCpus='1'>n810</machine>
<machine maxCpus='1'>n800</machine>
<machine maxCpus='1'>musicpal</machine>
<machine maxCpus='1'>mainstone</machine>
<machine maxCpus='1'>kzm</machine>
<machine maxCpus='4'>midway</machine>
<machine maxCpus='4'>highbank</machine>
<machine maxCpus='1'>verdex</machine>
<machine maxCpus='1'>connex</machine>
<machine maxCpus='2'>smdkc210</machine>
<machine maxCpus='2'>nuri</machine>
<machine maxCpus='1'>collie</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='cris'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-cris</emulator>
<machine maxCpus='1'>axis-dev88</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-i386</emulator>
<machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
<machine maxCpus='255'>pc-q35-1.4</machine>
<machine maxCpus='255'>pc-q35-1.5</machine>
<machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
<machine maxCpus='1'>isapc</machine>
<machine maxCpus='255'>pc-0.10</machine>
<machine maxCpus='255'>pc-0.11</machine>
<machine maxCpus='255'>pc-0.12</machine>
<machine maxCpus='255'>pc-0.13</machine>
<machine maxCpus='255'>pc-0.14</machine>
<machine maxCpus='255'>pc-0.15</machine>
<machine maxCpus='255'>pc-1.0</machine>
<machine maxCpus='255'>pc-1.1</machine>
<machine maxCpus='255'>pc-1.2</machine>
<machine maxCpus='255'>pc-1.3</machine>
<machine maxCpus='255'>pc-i440fx-1.4</machine>
<machine maxCpus='255'>pc-i440fx-1.5</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
<machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
<machine maxCpus='255'>pc-q35-1.4</machine>
<machine maxCpus='255'>pc-q35-1.5</machine>
<machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
<machine maxCpus='1'>isapc</machine>
<machine maxCpus='255'>pc-0.10</machine>
<machine maxCpus='255'>pc-0.11</machine>
<machine maxCpus='255'>pc-0.12</machine>
<machine maxCpus='255'>pc-0.13</machine>
<machine maxCpus='255'>pc-0.14</machine>
<machine maxCpus='255'>pc-0.15</machine>
<machine maxCpus='255'>pc-1.0</machine>
<machine maxCpus='255'>pc-1.1</machine>
<machine maxCpus='255'>pc-1.2</machine>
<machine maxCpus='255'>pc-1.3</machine>
<machine maxCpus='255'>pc-i440fx-1.4</machine>
<machine maxCpus='255'>pc-i440fx-1.5</machine>
<machine maxCpus='1'>none</machine>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
<pae/>
<nonpae/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='lm32'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-lm32</emulator>
<machine maxCpus='1'>lm32-evr</machine>
<machine maxCpus='1'>milkymist</machine>
<machine maxCpus='1'>lm32-uclinux</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='m68k'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-m68k</emulator>
<machine maxCpus='1'>mcf5208evb</machine>
<machine maxCpus='1'>dummy</machine>
<machine maxCpus='1'>an5206</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='microblaze'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-microblaze</emulator>
<machine maxCpus='1'>petalogix-s3adsp1800</machine>
<machine maxCpus='1'>petalogix-ml605</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='microblazeel'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-microblazeel</emulator>
<machine maxCpus='1'>petalogix-s3adsp1800</machine>
<machine maxCpus='1'>petalogix-ml605</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='mips'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-mips</emulator>
<machine maxCpus='16'>malta</machine>
<machine maxCpus='1'>mips</machine>
<machine maxCpus='1'>mipssim</machine>
<machine maxCpus='1'>pica61</machine>
<machine maxCpus='1'>magnum</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='mipsel'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-mipsel</emulator>
<machine maxCpus='16'>malta</machine>
<machine maxCpus='1'>mips</machine>
<machine maxCpus='1'>mipssim</machine>
<machine maxCpus='1'>pica61</machine>
<machine maxCpus='1'>magnum</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='mips64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-mips64</emulator>
<machine maxCpus='16'>malta</machine>
<machine maxCpus='1'>mips</machine>
<machine maxCpus='1'>mipssim</machine>
<machine maxCpus='1'>pica61</machine>
<machine maxCpus='1'>magnum</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='mips64el'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-mips64el</emulator>
<machine maxCpus='16'>malta</machine>
<machine maxCpus='1'>mips</machine>
<machine maxCpus='1'>mipssim</machine>
<machine maxCpus='1'>pica61</machine>
<machine maxCpus='1'>magnum</machine>
<machine maxCpus='1'>fulong2e</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='ppc'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-ppc</emulator>
<machine maxCpus='1'>g3beige</machine>
<machine maxCpus='1'>virtex-ml507</machine>
<machine maxCpus='1'>prep</machine>
<machine maxCpus='1'>bamboo</machine>
<machine maxCpus='1'>taihu</machine>
<machine maxCpus='1'>ref405ep</machine>
<machine maxCpus='15'>mpc8544ds</machine>
<machine maxCpus='1'>mac99</machine>
<machine maxCpus='32'>ppce500</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='ppc64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-ppc64</emulator>
<machine maxCpus='256'>pseries</machine>
<machine maxCpus='1'>virtex-ml507</machine>
<machine maxCpus='1'>prep</machine>
<machine maxCpus='1'>bamboo</machine>
<machine maxCpus='1'>taihu</machine>
<machine maxCpus='1'>ref405ep</machine>
<machine maxCpus='15'>mpc8544ds</machine>
<machine maxCpus='1'>g3beige</machine>
<machine maxCpus='1'>mac99</machine>
<machine maxCpus='32'>ppce500</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='ppcemb'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-ppcemb</emulator>
<machine maxCpus='1'>g3beige</machine>
<machine maxCpus='1'>virtex-ml507</machine>
<machine maxCpus='1'>prep</machine>
<machine maxCpus='1'>bamboo</machine>
<machine maxCpus='1'>taihu</machine>
<machine maxCpus='1'>ref405ep</machine>
<machine maxCpus='15'>mpc8544ds</machine>
<machine maxCpus='1'>mac99</machine>
<machine maxCpus='32'>ppce500</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='s390x'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-s390x</emulator>
<machine canonical='s390-virtio' maxCpus='255'>s390</machine>
<machine canonical='s390-ccw-virtio' maxCpus='255'>s390-ccw</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='sh4'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-sh4</emulator>
<machine maxCpus='1'>shix</machine>
<machine maxCpus='1'>r2d</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='sh4eb'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-sh4eb</emulator>
<machine maxCpus='1'>shix</machine>
<machine maxCpus='1'>r2d</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='sparc'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-sparc</emulator>
<machine maxCpus='1'>SS-5</machine>
<machine maxCpus='1'>SPARCbook</machine>
<machine maxCpus='1'>SPARCClassic</machine>
<machine maxCpus='1'>SS-4</machine>
<machine maxCpus='1'>LX</machine>
<machine maxCpus='1'>Voyager</machine>
<machine maxCpus='4'>SS-20</machine>
<machine maxCpus='4'>SS-600MP</machine>
<machine maxCpus='4'>SS-10</machine>
<machine maxCpus='1'>leon3_generic</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='sparc64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-sparc64</emulator>
<machine maxCpus='1'>sun4u</machine>
<machine maxCpus='1'>Niagara</machine>
<machine maxCpus='1'>sun4v</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
<features>
<deviceboot/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='unicore32'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-unicore32</emulator>
<machine maxCpus='1'>puv3</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/qemu-system-x86_64</emulator>
<machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
<machine maxCpus='255'>pc-q35-1.4</machine>
<machine maxCpus='255'>pc-q35-1.5</machine>
<machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
<machine maxCpus='1'>isapc</machine>
<machine maxCpus='255'>pc-0.10</machine>
<machine maxCpus='255'>pc-0.11</machine>
<machine maxCpus='255'>pc-0.12</machine>
<machine maxCpus='255'>pc-0.13</machine>
<machine maxCpus='255'>pc-0.14</machine>
<machine maxCpus='255'>pc-0.15</machine>
<machine maxCpus='255'>pc-1.0</machine>
<machine maxCpus='255'>pc-1.1</machine>
<machine maxCpus='255'>pc-1.2</machine>
<machine maxCpus='255'>pc-1.3</machine>
<machine maxCpus='255'>pc-i440fx-1.4</machine>
<machine maxCpus='255'>pc-i440fx-1.5</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
<domain type='kvm'>
<emulator>/usr/bin/qemu-kvm</emulator>
<machine canonical='pc-i440fx-1.6' maxCpus='255'>pc</machine>
<machine maxCpus='255'>pc-q35-1.4</machine>
<machine maxCpus='255'>pc-q35-1.5</machine>
<machine canonical='pc-q35-1.6' maxCpus='255'>q35</machine>
<machine maxCpus='1'>isapc</machine>
<machine maxCpus='255'>pc-0.10</machine>
<machine maxCpus='255'>pc-0.11</machine>
<machine maxCpus='255'>pc-0.12</machine>
<machine maxCpus='255'>pc-0.13</machine>
<machine maxCpus='255'>pc-0.14</machine>
<machine maxCpus='255'>pc-0.15</machine>
<machine maxCpus='255'>pc-1.0</machine>
<machine maxCpus='255'>pc-1.1</machine>
<machine maxCpus='255'>pc-1.2</machine>
<machine maxCpus='255'>pc-1.3</machine>
<machine maxCpus='255'>pc-i440fx-1.4</machine>
<machine maxCpus='255'>pc-i440fx-1.5</machine>
<machine maxCpus='1'>none</machine>
</domain>
</arch>
<features>
<cpuselection/>
<deviceboot/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='xtensa'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-xtensa</emulator>
<machine maxCpus='4'>sim</machine>
<machine maxCpus='4'>lx200</machine>
<machine maxCpus='4'>lx60</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>hvm</os_type>
<arch name='xtensaeb'>
<wordsize>32</wordsize>
<emulator>/usr/bin/qemu-system-xtensaeb</emulator>
<machine maxCpus='4'>sim</machine>
<machine maxCpus='4'>lx200</machine>
<machine maxCpus='4'>lx60</machine>
<machine maxCpus='1'>none</machine>
<domain type='qemu'>
</domain>
</arch>
</guest>
<guest>
<os_type>xen</os_type>
<arch name='i686'>
<wordsize>32</wordsize>
<emulator>/usr/bin/xenner</emulator>
<machine>xenner</machine>
<domain type='kvm'>
</domain>
</arch>
<features>
<pae/>
<nonpae/>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
<guest>
<os_type>xen</os_type>
<arch name='x86_64'>
<wordsize>64</wordsize>
<emulator>/usr/bin/xenner</emulator>
<machine>xenner</machine>
<domain type='kvm'>
</domain>
</arch>
<features>
<acpi default='on' toggle='yes'/>
<apic default='on' toggle='no'/>
</features>
</guest>
</capabilities>

View File

@ -26,6 +26,7 @@ import unittest
import StringIO
import virtinst.cli
from virtinst import support
from tests import virtinstall, virtimage, virtclone, virtconvert
from tests import utils
@ -34,17 +35,6 @@ os.environ["VIRTCONV_TEST_NO_DISK_CONVERSION"] = "1"
os.environ["LANG"] = "en_US.UTF-8"
_defaultconn = utils.open_testdefault()
testuri = "test:///%s/tests/testdriver.xml" % os.getcwd()
# There is a hack in virtinst/cli.py to find this magic string and
# convince virtinst we are using a remote connection.
fakeuri = "__virtinst_test__" + testuri + ",predictable"
capsprefix = ",caps=%s/tests/capabilities-xml/" % os.getcwd()
remoteuri = fakeuri + ",remote"
kvmuri = fakeuri + capsprefix + "libvirt-0.7.6-qemu-caps.xml,qemu"
xenuri = fakeuri + capsprefix + "rhel5.4-xen-caps-virt-enabled.xml,xen"
xenia64uri = fakeuri + capsprefix + "xen-ia64-hvm.xml,xen"
lxcuri = fakeuri + capsprefix + "capabilities-lxc.xml,lxc"
# Location
image_prefix = "/tmp/__virtinst_cli_"
@ -91,13 +81,13 @@ clean_files = (new_images + exist_images +
promptlist = []
test_files = {
'TESTURI' : testuri,
'DEFAULTURI' : "__virtinst_test__test:///default,predictable",
'REMOTEURI' : remoteuri,
'KVMURI' : kvmuri,
'XENURI' : xenuri,
'XENIA64URI' : xenia64uri,
'LXCURI' : lxcuri,
'TESTURI' : utils.testuri,
'DEFAULTURI' : utils.defaulturi,
'REMOTEURI' : utils.uriremote,
'KVMURI' : utils.urikvm,
'XENURI' : utils.urixencaps,
'XENIA64URI' : utils.urixenia64,
'LXCURI' : utils.urilxc,
'CLONE_DISK_XML' : "%s/clone-disk.xml" % xmldir,
'CLONE_STORAGE_XML' : "%s/clone-disk-managed.xml" % xmldir,
'CLONE_NOEXIST_XML' : "%s/clone-disk-noexist.xml" % xmldir,
@ -212,7 +202,7 @@ class Command(object):
def skip_msg(self):
if self.support_check is None:
return
if _defaultconn.check_support(self.support_check):
if _defaultconn.check_conn_support(self.support_check):
return
return "skipped"
@ -359,7 +349,7 @@ class App(object):
args += " --print-xml"
if self.appname != "virt-convert" and not "--connect " in cli:
args += " --connect %s" % fakeuri
args += " --connect %s" % utils.fakeuri
return args

View File

@ -34,16 +34,19 @@ from virtinst import VirtualVideoDevice
os.environ["HOME"] = "/tmp"
os.environ["DISPLAY"] = ":3.4"
_cwd = os.getcwd()
_testuri = "test:///%s/tests/testdriver.xml" % _cwd
_fakeuri = "__virtinst_test__" + _testuri + ",predictable"
_remoteuri = "__virtinst_test__" + _testuri + ",remote"
_kvmcaps = "%s/tests/capabilities-xml/libvirt-0.7.6-qemu-caps.xml" % _cwd
_plainkvm = "%s,qemu" % _fakeuri
_plainxen = "%s,xen" % _fakeuri
_kvmuri = "%s,caps=%s" % (_plainkvm, _kvmcaps)
_capsprefix = ",caps=%s/tests/capabilities-xml/" % os.getcwd()
defaulturi = "__virtinst_test__test:///default,predictable"
testuri = "test:///%s/tests/testdriver.xml" % os.getcwd()
fakeuri = "__virtinst_test__" + testuri + ",predictable"
uriremote = fakeuri + ",remote"
uriqemu = "%s,qemu" % fakeuri
urixen = "%s,xen" % fakeuri
urixencaps = fakeuri + _capsprefix + "rhel5.4-xen-caps-virt-enabled.xml,xen"
urixenia64 = fakeuri + _capsprefix + "xen-ia64-hvm.xml,xen"
urikvm = uriqemu + _capsprefix + "libvirt-1.1.2-qemu-caps.xml"
urilxc = fakeuri + _capsprefix + "capabilities-lxc.xml,lxc"
os.environ["VIRTINST_TEST_SCRATCHDIR"] = _cwd
os.environ["VIRTINST_TEST_SCRATCHDIR"] = os.getcwd()
def get_debug():
@ -64,23 +67,23 @@ def open_testdefault():
def open_testdriver():
return virtinst.cli.getConnection(_testuri)
return virtinst.cli.getConnection(testuri)
def open_testkvmdriver():
return virtinst.cli.getConnection(_kvmuri)
return virtinst.cli.getConnection(urikvm)
def open_plainkvm(connver=None, libver=None):
return virtinst.cli.getConnection(_make_uri(_plainkvm, connver, libver))
return virtinst.cli.getConnection(_make_uri(uriqemu, connver, libver))
def open_plainxen(connver=None, libver=None):
return virtinst.cli.getConnection(_make_uri(_plainxen, connver, libver))
return virtinst.cli.getConnection(_make_uri(urixen, connver, libver))
def open_test_remote():
return virtinst.cli.getConnection(_remoteuri)
return virtinst.cli.getConnection(uriremote)
_default_conn = open_testdriver()
_conn = None