Cole Robinson
62feeb02a8
Switch to python3 style 'except X as Y' notation
...
Which also works with python2.7
2017-05-05 14:52:11 -04:00
Cole Robinson
118bf85cba
Apparently -tt doesn't work with #!/usr/bin/env ...
2016-06-17 16:38:57 -04:00
Cole Robinson
47dd38eb3e
Use #!/usr/bin/env for python scripts
...
This is recommended for upstream, but not for downstream, like Fedora.
So change /usr/bin/env to /usr/bin/python2 at RPM install time to
match the ideal Fedora config.
https://fedoraproject.org/wiki/Features/SystemPythonExecutablesUseSystemPython
https://bugzilla.redhat.com/show_bug.cgi?id=1303282
2016-06-17 12:56:14 -04:00
Cole Robinson
e1678df8f2
virt-convert: Make --printxml imply --noautoconsole
...
Makes test suite work regardless of whether virt-viewer is installed
2015-03-23 13:37:24 -04:00
Cole Robinson
e3de3d8b69
virt-convert: Fix pointing to relative config file
2014-09-20 18:29:20 -04:00
Cole Robinson
1f3f3fa4fc
virt-install: If virt-viewer will fail, default to --wait -1
...
This can happen if user requests explicit --graphics, but they are on
a headless display. We had a few reports of this recently.
2014-09-20 18:28:43 -04:00
Cole Robinson
eca6cd9471
virt-convert: Don't print 'convert' output with --print-xml
2014-05-31 16:41:30 -04:00
Martin Kletzander
4196f4287b
Use proper python version
...
since we work with python2 only, mentioning it in all shebangs make
the commands from git work even when python3 is set as default.
This also fixes one test where command being ran is 'virt-xml' through
subprocess.Popen().
While at that, add '-tt' where possible in order to make everyone use
same indentation characters.
Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Chen Hanxiao
de21747dbb
virt-convert: fix a small pylint
...
s/desc =_/desc = _/
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-08 23:30:53 +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
Cole Robinson
d1edce1ca5
cli: Drop dest= from most arguments, it was redundant
2014-01-22 10:36:14 -05:00
Cole Robinson
c426a30511
Convert all command line handling to argparse
...
Allows us to drop some hacks, and we may need it for a new upcoming
tool.
2014-01-19 11:32:08 -05:00
Cole Robinson
4c15da439b
cli: Combine registering a bunch of common options
2013-09-28 11:27:26 -04:00
Cole Robinson
b3a72bcb95
cli: Remove unneeded parameter to optparse.add_option
2013-09-28 10:03:08 -04:00
Cole Robinson
eca87838fb
virt-install: Add --features option
...
And hide docs about old --noacpi/--noacpi options. I don't think
anyone really uses them anyways, but if anyone complains we should
just implement --features for the other CLI commands.
2013-09-28 09:58:57 -04:00
Cole Robinson
45d2db887d
virt-*: Unify handling of --os-variant
...
And hide --os-type from the cli since it is long since redundant.
2013-08-11 12:39:28 -04:00
Cole Robinson
4c967118d4
VirtualDisk: Remove vdisk provisioning
...
Since we haven't had any patches from Sun/Oracle for 4 years, and this
stuff should really go through libvirt storage APIs anyways.
2013-07-03 11:53:17 -04:00
Cole Robinson
b6fa7d16e5
Add epilog and description for virt-* --help
2013-06-30 15:03:53 -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
ae471007fc
Tons of misc pylint fixes
2013-04-13 13:40:29 -04:00
Cole Robinson
a07c81e92a
util: Remove a bunch of unused methods
...
And move some to the only files they are used in.
2013-04-11 12:15:37 -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