~ubuntu-branches/ubuntu/quantal/virtinst/quantal-proposed

« back to all changes in this revision

Viewing changes to tests/utils.py

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-07-24 08:52:01 UTC
  • mfrom: (1.6.8 sid)
  • Revision ID: package-import@ubuntu.com-20120724085201-q3h0cbabg4t46gfm
Tags: 0.600.2-1ubuntu1
* Merge from debian unstable. Remaining changes:
  - debian/patches/9003-fix-path-to-hvmloader-in-testsuite.patch: adjust
    testsuite for 0001-fix-path-to-hvmloader.patch and
    0002-Fix-path-to-pygrub.patch.
  - debian/patches/9004_ubuntu_fix_tree_support.patch: Fix tree detection
    for all ISO/HTTP source, to not longer fail with cobbler/koan.
  - debian/patches/0004-Fix-path-to-qemu-dm.patch: fix the path to the
    qemu-dm binary.
  - debian/{control,rules,pyversions}: Build using dh_python2, use
    debhelper v8 instead of cdbs; for some reason the package build an
    empty binary package when using dh_python2.
  - debian/control: added acl package to depends.
  - debian/control: added libvirt-bin to recommends
* Dropped patches:
  - debian/patches/9005_ubuntu_releases.patch: Upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
scratch     = os.path.join(_cwd, "tests", "testscratchdir")
35
35
_testuri    = "test:///%s/tests/testdriver.xml" % _cwd
36
36
_fakeuri    = "__virtinst_test__" + _testuri + ",predictable"
 
37
_remoteuri  = "__virtinst_test__" + _testuri + ",remote"
37
38
_kvmcaps    = "%s/tests/capabilities-xml/libvirt-0.7.6-qemu-caps.xml" % _cwd
38
39
_plainkvm   = "%s,qemu" % _fakeuri
39
40
_plainxen   = "%s,xen" % _fakeuri
58
59
    return virtinst.cli.getConnection(_make_uri(_plainkvm, connver, libver))
59
60
def open_plainxen(connver=None, libver=None):
60
61
    return virtinst.cli.getConnection(_make_uri(_plainxen, connver, libver))
 
62
def open_test_remote():
 
63
    return virtinst.cli.getConnection(_remoteuri)
61
64
 
62
65
_default_conn = open_testdriver()
63
66
_conn = None
215
218
 
216
219
def get_virtual_network():
217
220
    dev = virtinst.VirtualNetworkInterface(conn=_conn)
218
 
    dev.macaddr = "11:22:33:44:55:66"
 
221
    dev.macaddr = "22:22:33:44:55:66"
219
222
    dev.type = virtinst.VirtualNetworkInterface.TYPE_VIRTUAL
220
223
    dev.network = "default"
221
224
    return dev