Cole Robinson
cc366fff7d
cli: Add more code coverage
2019-06-11 17:51:25 -04:00
Cole Robinson
2f89ecf4a9
Remove Author lines from file headers
...
Similar to what was done in libvirt. See these commits:
600462834f
c99e954973
2019-01-08 11:45:35 -05:00
Lin Ma
e7e6f873cc
virt-convert: Add auto complete support for the general options
...
Signed-off-by: Lin Ma <lma@suse.com>
2018-12-18 11:20:35 -05:00
Cole Robinson
42a96cfd59
virt-install: add --destroy-on-exit
...
This makes the console window behave like a raw qemu command line:
when the user closes it, the VM is hard powered off.
2018-10-11 15:24:16 -04:00
Cole Robinson
63b4d1f154
virt-install: Encode guest defaults earlier
...
We need this for determining correct console tool to launch,
and probably other checks later
2018-10-11 12:19:09 -04:00
Cole Robinson
2ac54ac001
guest: Drop self.installer and start_install wrapper
...
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
2018-09-04 14:55:04 -04:00
Cole Robinson
9e05c56397
guest: Drop self.domain
...
The only user is virt-install, make its usage explicit
2018-09-04 14:55:04 -04:00
Daniel P. Berrangé
b1460ba065
Chagne most URIs to use https:// instead of http://
...
All URLs were checked to see if they supported https://, those which did
were converted.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-30 13:35:39 -04:00
Daniel P. Berrangé
48e32b429d
Fix copyright header to specify GPLv2 or later, not GPLv2 only.
...
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>
2018-04-04 16:51:37 -04:00
Cole Robinson
b6dcee8eb7
Use consistent and minimal license header for every file
2018-03-21 07:29:40 -04:00
Cole Robinson
ddba9c1702
Switch to python3 in script shebang
...
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-02-06 18:56:15 -05:00
Radostin Stoyanov
b93cc3bbc9
pycodestyle: Do not use bare 'except:'
...
A bare 'except:' catches all exceptions [1], including SystemExit,
KeyboardInterrupt, and GeneratorExit (which is not an error and should
not normally be caught by user code). In situations where you need to
catch all “normal” errors, you can catch the base class for all normal
exceptions, Exception [2].
[1] https://docs.python.org/2/howto/doanddont.html#except
[2] https://docs.python.org/2/library/exceptions.html#Exception
2017-08-02 13:57:43 -04:00
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