Commit Graph

4988 Commits

Author SHA1 Message Date
Cole Robinson
5cd1b57852 create: customize: Fix inadvertent disk removal on install fail
If the first install attempt fails, then the second attempt succeeds,
we were still removing the disk images we created as though the
install never succeeded. We need to clear out the cached failed_guest
value via the customize dialog callback

https://bugzilla.redhat.com/show_bug.cgi?id=1342043
2016-06-16 19:47:49 -04:00
Chen Hanxiao
6c82b9d184 tests: fix a testcase failure by --os-variant
Current libosinfo release on fedora23 and centos7
didn't know fedora23.
Change --os-variant fedora22 as a workaroud.

df1c3e74a introduce this issue.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
2016-06-16 23:10:51 +08:00
Pavel Hrdina
0acdea1dad virtManager.details: show firmware options also for XEN guests 2016-06-16 12:16:53 +02:00
Pavel Hrdina
de9cd87fda virtinst.capabilities: return recommended machine for XEN
This is required in order to ask for correct domcapabilities.  If you don't
specify any machine libvirt will return domcapabilities for default machine
which is xenpv.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-16 12:16:49 +02:00
Pavel Hrdina
5ecc2b440a virtManager.create: don't clear recommended machine if none is selected
This improves loading domcapabilities to get domcapabilities for recommended
machine, not for default machine.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-16 12:00:10 +02:00
Pavel Hrdina
86e11786b5 maint: update all libvirt checks for version from 1.3.6 to 2.0.0
There want be 1.3.6 version, libvirt switched to new release numbering, for more
information see <http://libvirt.org/downloads.html#numbering>.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-15 12:05:11 +02:00
Jovanka Gulicoska
053672764f storagelist: code cleanup
Remove cb() function calling pool.refresh, instead use pool.refresh
in vmmAsyncJob
2016-06-14 19:17:06 -04:00
Cole Robinson
19b4cf026e cli: Support --cpu cellX.id (and cpus, and memory)
This allows configuring <cpu><numa><cell> bits via the command line.
This uses the optional numbering scheme described in the previous
commit.
2016-06-14 19:07:55 -04:00
Cole Robinson
b785f3f594 cli: Support --disk seclabelX.model (and relabel, and label)
This adds support for setting VirtualDisk <seclabel> XML. This
invents a new command line scheme for cases like this where there
are possibly multiple child elements that we want to specify
on the command line. So if you just want to specify one <seclabel>
block, you can do the expected

  --disk ...,seclabel.model=dac,relabel=no

However if you want to specify 2 <seclabel> blocks you need to do:

  --disk ...,seclabel0.model=dac,seclabel0.relabel=no,seclabel1.model=selinux,seclabel1.relabel=no
2016-06-14 19:05:30 -04:00
Cole Robinson
7ec97400a5 cli: Only instantiate VirtCLIArguments at parse time
We register the VirtCLIArgument classes with the static parse
instructions, but instantiate it with the actual key=val pair
from the command line. This fixes some layering violations, and
gives callers access to the actual command line key that we
are parsing, if that's interesting.
2016-06-14 16:26:56 -04:00
Cole Robinson
dc49d46f62 cli: Separate out can_comma handling
Clarify things by taking it out of the main parse loop
2016-06-14 14:08:50 -04:00
Cole Robinson
8532dacde0 cli: Pass virtarg and parser to setter callback
This should provide access to every bit of info we could possibly
want from the setter callbacks
2016-06-14 13:54:17 -04:00
Cole Robinson
984b368725 cli: Rework VirtCLIParser instantiation
Only initialize VirtCLIParser at actual parse time. The data that's
passed to __init__ is the particular data for that parse task, like
the option string, and the Guest object we are editing.

As a result we can drop the whole parsermap handling, since the
parserlist is immutable.

There's a bunch of other reworks mixed in like dropping the
VirtOptionString abstraction...
2016-06-14 10:51:50 -04:00
Cole Robinson
8a0fd7927f cli: Improve comments for _VirtCLIArgument 2016-06-14 07:38:59 -04:00
Cole Robinson
3ce5af712b cli: Drop unused VirtCLIParser.option_variable_name 2016-06-13 19:15:35 -04:00
Cole Robinson
7018904959 cli: Move introspection checking out of Parser class
We can do that at the cli entry point, and only have the parser
print its subargs
2016-06-13 19:15:19 -04:00
Cole Robinson
7cd04a9f86 cli: Register VirtCLIArguments at class definition time
The VirtCLIArguments, (for example, path=, size=, etc. for --disk)
are only registered when a VirtCLIParser is actually initialized.
This seems backwards, since those arguments are really more immutable
factors of the actual command line parsing, so make more sense only
initializing them once, at class definition time.

This switches to use that pattern. This makes the parsing flow a bit
cleaner and can be a basis for future improvements.
2016-06-13 18:37:30 -04:00
Cole Robinson
4db0cd2eab cli: Tweak clearxml argument setup
Just unnest the callback to make it a little easier to follow
2016-06-13 18:37:30 -04:00
Cole Robinson
cb6853eea6 cli: More shared 'address.*' handling output VirtCLIParser
Make it a global function rather than complicating VirtCLIParser any
further with irrelevant functions
2016-06-13 18:37:30 -04:00
Cole Robinson
7bee927276 conn: Stop using VirtOptionParser
It only needs a minimal portion of the functionality, so separate
that out and use it explicitly. Clean up some of the surrounding
cli.py bits as well
2016-06-13 18:37:30 -04:00
Cole Robinson
efad67aab2 cli: Separate param parse and lookup
Makes the code a bit easier to follow
2016-06-12 19:48:16 -04:00
Cole Robinson
c9bd9791cf pylint: Skip bad-option-value to make f23 pylint more quiet
f24 pylint seems to have this behavior by default
2016-06-12 18:29:42 -04:00
Cole Robinson
302a84a97d virtinst: rename .seclabel->.seclabels
Since guest and disk can have multiple of these, make it clear
to callers
2016-06-12 11:09:15 -04:00
Cole Robinson
31b8051525 cli: Rename opts.opts -> opts.optdict
To make it more clear to callers what type of structure they are
dealing with
2016-06-12 10:32:23 -04:00
Cole Robinson
e04ce6fc13 Fix some pylint 2016-06-12 10:29:23 -04:00
Cole Robinson
0663e52a62 cli: Use OrderedDict for tracking cli values
Allows us to drop the single 'orderedopts' usage
2016-06-12 10:11:11 -04:00
Cole Robinson
a8914ae1e6 virtinst: disk: Fix seclabel testing
disk devices don't have a full <seclabel> under their <source>
element, just a smaller one with only a few options. Fix things
to match what libvirt does
2016-06-11 17:43:18 -04:00
Cole Robinson
263a35fe7a cli: Wrap setter_cb bits in a class
Will make it less churny if we want to add new bits in the future
2016-06-11 17:22:27 -04:00
Cole Robinson
14fd99255b cli: add --graphics listen=socket support
This is the new style socket support, where we request libvirt to
allocate a socket path for us. Plus this is the only way to enable
socket support for type=spice
2016-06-11 16:56:41 -04:00
Cole Robinson
4c0b761cfb virtinst: graphics: Add listen=none support
Not strictly needed for spice, but now available for vnc if
people want it
2016-06-11 16:48:34 -04:00
Cole Robinson
2b34831b26 cli: Add device address.type/address.bus/... options
This exposes every device <address> option, for each device
cli option. So --disk, --network, --video, etc.

Fill out a few more address XML bits as well
2016-06-11 16:10:31 -04:00
Cole Robinson
927990ad9d tests: clitest: Allow --only matching on output filename
So you can do "python setup.py --only many-devices' to only run the
clitest compare tests that output their results to files with
"many-devices" in the name
2016-06-11 15:58:48 -04:00
Cole Robinson
1330f8c675 cli: Move blkiotune and memorybacking out of the device code area 2016-06-11 13:45:05 -04:00
Cole Robinson
42d4179e1e tests: Fix error with latest libvirt
It caught a duplicate disk definition
2016-06-11 13:08:59 -04:00
Pavel Hrdina
df1c3e74aa virt-install: add a new guest feature GIC for ARM guests
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1334857

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-11 18:41:31 +02:00
Pavel Hrdina
0dbfb399cd virtinst: prepare XML parsers to handle GIC for ARM
GIC is used instead of APIC on ARM and libvirt allows configure specific
version of GIC for guests.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-11 18:41:24 +02:00
Pavel Hrdina
3d73f9cd3b tests: add aarch64 domcapabilities
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-10 18:09:54 +02:00
Pavel Hrdina
9ca3ec8b17 virtinst.cli: remove duplicated line
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-10 18:08:07 +02:00
Pavel Hrdina
2f0b40ac00 virtManager.config: fix pylint warning
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-10 18:05:39 +02:00
Pavel Hrdina
09cc6f3832 console: add support to forget password
If password for console is saved currently there is no way how to tell
virt-manager to forget that password.  This patch improves the authentication
page in order to provide a way how to forget password simply by unchecking the
"Save this password in your keyring".

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 20:03:27 +02:00
Pavel Hrdina
7e1bd1d762 console: fix checkbox to save password if it was loaded from keyring
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1302175

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 20:02:45 +02:00
Pavel Hrdina
7280dcf7df create: report an error if storage doesn't exists for import installation
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1305210

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 19:48:24 +02:00
Cole Robinson
51e8b9df11 tests: test_urls: Add opensuse tumbleweed test 2016-06-07 13:23:14 -04:00
Pavel Hrdina
b327191a20 maint: fix pylint warnings wrong-import-order
standard import "import logging" comes before "from gi.repository import GLib"

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 17:37:06 +02:00
Cole Robinson
bd6badbc40 devicedisk: Fix typo in comment 2016-06-07 11:28:26 -04:00
Cole Robinson
e796efeaf9 domcaps: Add pep8 fix 2016-06-07 11:03:32 -04:00
Charles Arnold
33ae6e51ad virtinst: Fix detection of sle12sp1 media
The installer wrongly detects SLE-12-SP1 media as SLE-12-GA

Signed-off-by: Charles Arnold <carnold@suse.com>
2016-06-07 11:01:09 -04:00
Charles Arnold
2647f699fb virtinst: Fix detection of openSUSE tumbleweed media
With Tumbleweed now part of libosinfo we do not need to default
to openSUSE 13.2 when pointing at the installation media.

Signed-off-by: Charles Arnold <carnold@suse.com>
2016-06-07 11:01:09 -04:00
Shivaprasad G Bhat
94f610465f CD-ROMs should be on scsi bus for pSeries machines
Commit f6322c9e changed the default bus type for disks to virtio.
That changed it for both disks and cdroms. The CD-ROMs dont work
if on virtio on pSeries. So, change the cdrom bus type to scsi as
before.

Signed-off-by: Shivaprasad G Bhat <sbhat@linux.vnet.ibm.com>

Extend virt-install-ppc64-pseries-f20 test to cover this case.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2016-06-07 16:55:46 +02:00
Chen Hanxiao
70299a32c5 test: Fix tests with latest libvirt
libvirt commit
b33c14b342e5c2abeeee91c852ef2032327cb355
introduce this.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>

(crobinso: add proper compare_check annotations to clitest to skip
 changed tests on older libvirt)
2016-06-07 10:31:04 -04:00