Commit Graph

32 Commits

Author SHA1 Message Date
Lin Ma 21fd079eb1 Replace the unar to more common archivers
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)
2016-01-10 18:23:29 -05:00
Pavel Hrdina c7049eb120 pep8 W503: line break before binary operator
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:01:20 -04:00
Pavel Hrdina 0fbe8e7a1f translation: fix wrong usage of _() function
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>
2015-06-05 16:33:51 -04:00
Cole Robinson 45e6cd4cac Remove redundant 'default dir' functions 2015-05-02 19:48:04 -04:00
Cole Robinson 97259c4d9b capabilities: Store results of guest_lookup together
Simplifies API users lives to not have to remember whether caps guest
or caps domain contains a particular value.
2015-04-03 17:37:08 -04:00
Cole Robinson e3de3d8b69 virt-convert: Fix pointing to relative config file 2014-09-20 18:29:20 -04:00
Cole Robinson eb7612356e virtinst: Switch to relative imports, fix cyclic import warnings 2014-09-12 16:28:38 -04:00
Chen Hanxiao 75d43f6a37 fix some missed binary prefixes for units
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-06-17 09:33:14 +08:00
Cole Robinson 506791157e Fix some pylint 2014-05-31 17:37:19 -04:00
Cole Robinson eca6cd9471 virt-convert: Don't print 'convert' output with --print-xml 2014-05-31 16:41:30 -04:00
Cole Robinson ceab99cf7b virtconv: Don't create default pool when in dry mode
We will still need to create pools to probe source storage if doing
--print-xml.
2014-05-31 16:30:00 -04:00
Cole Robinson 876c721d8e virt-convert: Fix use of relative OVF file 2014-05-31 16:05:29 -04:00
Cole Robinson 196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Chen Hanxiao 98a27fc7fd formats: make sure 'unar' is existed
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>
2014-03-06 09:22:03 +08:00
Cole Robinson 0b4a72fd77 virt-convert: Reimplement it
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.
2014-02-07 21:16:09 -05:00
Giuseppe Scrivano 2a040ccd17 mass update: remove double spaces from comments
Updated by this script:

find -name '*.py' -exec sed -i "s|^\(#.*[^.?\!]\)  \(.*[^#]\)$|\1 \2|g" \{\} \;

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2013-10-28 17:22:31 +01:00
Giuseppe Scrivano 0df75c7603 headers: update "Red Hat, Inc." copyright for the year 2013
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>
2013-10-28 17:22:26 +01:00
Cole Robinson a6d92c7001 Drop a lot of usage of utility XML functions 2013-09-22 17:34:53 -04:00
Cole Robinson c426d5a16f Guest: Drop os_type, just use single os_variant
Internally the distinction hasn't been valuable for a long time,
so simplify the API here.
2013-08-11 12:39:36 -04:00
Cole Robinson 1d0695abd2 virtconv: Drop reference to OS_TYPES 2013-08-11 12:39:28 -04:00
Cole Robinson 01629d3f2c virtinst: Combine ImageInstaller and ImageParser code
They aren't touched much these days, so unify the files for clarity.
2013-08-08 21:00:37 -04:00
Cole Robinson 0d5fe93048 Centralize XML helpers in virtinst/util.py 2013-07-12 13:10:23 -04:00
Cole Robinson 94f8d4cfa9 VirtualConnection: cache capabilities XML
This means we can drop passing around the pre-parsed caps info everywhere.
2013-07-06 14:12:13 -04:00
Cole Robinson 4672ed3a0a Drop most explicit SunOS support
We haven't had a patch from Sun/Oracle in over 4 years, nor a libvirt
patch in about as long. I don't think anyone cares.
2013-07-03 12:15:56 -04:00
Cole Robinson 191fff8c0c tests: Make sure virtinst doesn't pull in Gtk
Add an explicit test to warn if it inadvertently happens
2013-04-18 16:41:02 -04:00
Cole Robinson 0d243983d0 Revive pep8 and clean up the code
autopep8 is pretty cool :)
2013-04-13 15:22:43 -04:00
Cole Robinson 3f79fa3919 Fix the last of the pylint messages
If using an older pylint, there are still some complaints about hashlib
and Popen, but those aren't our problems.
2013-04-13 13:45:08 -04:00
Cole Robinson 9359ad2bb6 virtinst: Remove ParaVirt and FullVirtGuest
They were just around for back compat at this point, the tools
have moved on.
2013-04-13 13:40:45 -04:00
Cole Robinson ae471007fc Tons of misc pylint fixes 2013-04-13 13:40:29 -04:00
Cole Robinson a386186c74 Remove most map() and filter() usage
They aren't available on python3 so pylint complains, and list
comprehensions are usually better.
2013-04-12 08:27:44 -04:00
Cole Robinson d6c8ad0297 Wire up python unit tests, unify gettext setup 2013-04-03 18:22:05 -04:00
Cole Robinson 88603e4fad Merge code from python-virtinst.git
As outlined here:

https://www.redhat.com/archives/virt-tools-list/2012-February/msg00040.html

For now this is just a direct import of the code from virtinst commit
dca5a4d6245f21d554f8853197a6a234bfc8e52c. History is not merged, so
please refer to original git for detailed commit histor:

http://git.fedorahosted.org/cgit/python-virtinst.git/
2013-04-03 18:22:05 -04:00