Init a shared log instance in virtinst/logger.py, and use that
throughout the code base, so we aren't calling directly into
'logging'. This helps protect our logging output from being
cluttered with other library output, as happens with some
'requests' usage
Right now we have:
* memory -> ./currentMemory
* maxmem -> ./memory
* hotplugmaxmem -> ./maxMemory
Which is just a mess to know what we might be really setting behind
the scenes. Rename the properties to match the XML element name, and
adjust all users to the new names. cli options aren't changed though
This changes all the callers to invoke start_install directly on the
Installer object. We still stash the installer instance inside the
guest object in create.py, just for simplicity
The copyright headers in every file were chjanged in this previous commit
commit b6dcee8eb7
Author: Cole Robinson <crobinso@redhat.com>
Date: Tue Mar 20 15:00:02 2018 -0400
Use consistent and minimal license header for every file
Where before this they said "
"either version 2 of the License, or (at your option) any later version."
Now they just say
"GNU GPLv2"
This fixes it to say "GNU GPLv2 or later" again.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
The way we enumerate devices doesn't conform with the way all
other XMLBuilder instances expose child objects. Move more towards
that direction.
This requires some virt-xml and cli.py hacks but we will remove those
in future patches
The OVF specification v1.1.0(page 15) indicates that "Each file
referenced by a File element may be compressed using gzip
(see RFC1952)."
In this case the .gz files should be decompressed first before
converting through qemu-img.
Signed-off-by: Lin Ma <lma@suse.com>
We have this option --dry-run that should run through the
installation process but don't actually touch anything. Just
pretend the installation. And we have a test that uses it
heavily. However, the test is failing:
Traceback (most recent call last):
File "/home/zippy/work/virt-manager.git/tests/clitest.py", line 161, in _launch_command
ret = virtconvert.main(conn=conn)
File "virt-convert", line 111, in main
destdir=options.destination, dry=options.dry)
File "/home/zippy/work/virt-manager.git/virtconv/formats.py", line 314, in convert_disks
newpath)
RuntimeError: New path name '/var/lib/libvirt/images/fedora.qcow2' already exists
Problem is, even in test suite we really touch the host paths.
This in general will spit unpredictable results. Resolution
consists of making this specific part of the code fault tolerant
if ran under test suite.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Because some of distributions dont provide the unar (universal archiver),
Using more common archivers to replace it.
Signed-off-by: Lin Ma <lma@suse.com>
(crobinso: adjust test suite)
All the strings have to be at first translated and then we can fill the
formated and translated string.
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Commit 0b4a72fd77
need unar command to do something.
But if we haven't installed it, the error message
told us nothing valuable as:
"OSError: [Errno 2] No such file or directory"
This patch will impove the error message.
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
We totally break CLI compat here, but the previous tool wasn't sustainable.
Instead, repurpose the tool as strictly converting external formats
like ovf/vmx to native libvirt XML, and launch the guest.
So we drop vmx/virt-image output, and virt-image input, and a slew of
command line options. I don't think anyone was depending on this in a
scripted fashion, so in practice I don't think anyone will care.
Add much more comprehensive unit tests while we are at it.
Updated by this script:
find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\) \(.*[^#]\)$|\1 \2|g" \{\} \;
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
Ensure that any file touched by a @redhat.com author in 2013 has an
updated copyright header.
The files were updated using the build-aux/update-copyright gnulib
script and manually added where the copyright line wasn't present.
Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>