Commit Graph

81 Commits

Author SHA1 Message Date
Cole Robinson
2cabc2e386 guest: Don't add default ps2 or xen mouse
libvirt drivers have added these by default for a long time, so
its redudnant here
2017-06-28 16:17:50 -04:00
Cole Robinson
4e7a6ad728 tests: pylint: Silence/fix a bunch of new warnings 2017-06-16 12:54:56 -04:00
Cole Robinson
fcebefd3bb tests: Stop using deprecated assertEquals
The recommended way is assertEqual
2017-05-05 12:40:52 -04:00
Cole Robinson
4c4d31d67d tests: Fix after vmvga change 2017-04-19 14:08:04 -04:00
Cole Robinson
cd2ade9fd7 tests: Fix with latest osinfo-db output 2017-02-22 14:40:49 -05:00
Cole Robinson
4c759ad23d util: Move default_* network bits to deviceinterface 2016-08-24 16:14:33 -04:00
Pavel Hrdina
2d9587c114 support: enable hv_time since qemu-kvm 1.5.3 from RHEL
This feature is available in upstream Qemu since 2.0.0 but it was also
back-ported to downstream Qemu into qemu-kvm-1.5.3 released in RHEL-7.
Add a new check and enable hv_time also in RHEL systems if qemu new
enough.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-21 10:51:41 +02:00
Pavel Hrdina
3ff35898a4 refactor detection of guest type capabilities
Each guest type can have its own capabilities and we should always ask
only for those capabilities.

The old approach was to get capabilities from libvirt and then for
example cycle trough all guests and return True, if any guest type
supports kvm or pae, etc.

Now we check those capabilities only for the correct guest type
according to defaults and input from user.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2015-07-14 13:11:40 -04:00
Cole Robinson
6fd3983f6d tests: Clean up capabilities test data
Make it clear which ones are used for the caps unit tests, and which
are for cli/UI testing and can be updated at will. And drop a bunch
of outdated stuff.
2015-04-22 19:05:06 -04:00
Cole Robinson
86f1133777 guest: Encode defaults into the XML at install time
Previously we made all the default encoding non-permanent by XML objects
before generating the XML, making changes to the copies, and restoring
to the old state after the XML is returned to the user.

This allows us to call start_install multiple times with the same Guest
object and not alter it's original config... but that feature isn't really
useful anymore, and this behavior makes the 'customize before install'
dialog difficult to handle.

So drop most of it, and fix some of the minor fallout.
2015-04-07 18:36:06 -04:00
Cole Robinson
a773a66a3f virtcli: Export config variables in a class object
Makes things easier to extend later
2015-04-06 15:54:35 -04:00
Cole Robinson
7866e291f6 guest: Never use vmvga if host is RHEL (bz 1147662)
We basically need to do this independent of whether the build is configured
for RHEL defaults or not
2015-03-25 09:04:51 -04:00
Cole Robinson
af2aea8bbc tests: xmlconfig: Drop needless version limiting 2015-03-25 08:58:09 -04:00
Cole Robinson
08a72a4aec connection: Clean up stable_defaults, improve test coverage 2015-03-23 16:49:32 -04:00
Cole Robinson
8220e4c60f virtinst: Drop unused stable_defaults field 2015-03-23 16:17:07 -04:00
Giuseppe Scrivano
00aea929ef tests: check that vmvga is not used on RHEL
And fix typo in last commit

Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
2015-02-24 19:03:59 +01:00
Cole Robinson
838d7f015c tests: Drop a bunch of redundant xmlconfig tests
These are mostly covered by clitests. Keep the important ones around
for code coverage.
2014-12-09 13:19:56 -05:00
Cole Robinson
40a5ec75b7 tests: Switch away from set_create_storage 2014-12-05 21:49:10 -05:00
Cole Robinson
baee53fbaa util: Simplify default_bridge to not confuse pylint 2014-10-27 19:53:25 -04:00
Cole Robinson
86417d42ca osxml: Ensure kernel/initrd/dtb are absolute paths 2014-09-23 14:32:01 -04:00
Cole Robinson
a722eeac78 virt-install: Enable libosinfo detection for --cdrom
This streamlines virt-manager and virt-install implementations, requiring
installer.distro_detect to be called if we want distro detection. As
a side effect, we now get CDROM detection for free.
2014-09-07 12:20:26 -04:00
Cole Robinson
196ff823b3 Fix warnings with latest pep8 2014-05-02 10:20:59 -04:00
Cole Robinson
a398d245cb Clean up pylint integration
- Drop no longer needed disable= bits
- Use string names for all skipped pylint messages
2014-04-02 19:00:24 -04:00
Cole Robinson
a5b3c1d2f8 guest: Drop back compat hugepage attribute 2014-03-22 12:25:28 -04:00
Chen Hanxiao
0dceb24b3b virtinst: fix an issue of disk bus caculation
commit 466c2bcf9c
will generate the same index for
'hda' and 'hdaa'.
Also break test cases.

This patch will fix this.

Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-02-23 13:31:48 +08:00
Martin Kletzander
55d5b35e50 Fix generate_target once more
Passing a zero to the generate_target() function's as pref_ctrl
parameter makes the 'if pref_ctrl' conditions obviously false.  Also
the range created was starting from 0 and not from 1.  Apart from
fixing this, also fix tests so they actually test something this time.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-18 08:14:32 +01:00
Martin Kletzander
a9c791b5b8 Add target_to_num method
Opposite to num_to_target.  It will be used in future patch.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-02-12 21:55:32 +01:00
Cole Robinson
98ea4cdad2 Reduce test suites clear_cache calls 2014-02-08 19:28:56 -05:00
Cole Robinson
c5f6c6852a VirtualDisk: Always use storage APIs for provisioning
This means if we are passed an unmanaged path, we try to create a
storage pool for the parent directory.

We skip directories like /dev where doing this might be problematic.

This makes things much friendlier to use for remote connections, and
means we can always rely on having libvirt's storage APIs to use
for format probing.
2014-02-08 19:24:14 -05:00
Cole Robinson
02402fcc0a Fix some pylint 2014-02-03 16:00:03 -05:00
Martin Kletzander
dc0b9bbaaf Rename hide_unsupported_rhel_options to stable_defaults and clean-up its usage
There were multiple problems with the setting and usage of
hide_unsupported_rhel_options.  Due to the fact that the option has
several diferent namings throughout the code, this patch is renaming
it to stable_defaults, which basically says what the option does and
makes it possible to use it without need for more than one negation
(where the old code had up to 4 of them in some places), which also
helps understanding it.

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2014-01-21 17:13:18 +01:00
Chen Hanxiao
8419835b1d virtinst: add support for panic notifier device
Signed-off-by: Chen Hanxiao <chenhanxiao@cn.fujitsu.com>
2014-01-11 14:32:18 -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
4911cb990e tests: Fix a rogue failure after last commits 2013-10-06 08:23:22 -04:00
Cole Robinson
0bd2f97bda VirtualDisk: Try to append targets, not just use first free (bz #905439)
This used to happen:

- create VM with cdrom, cdrom gets hdc
- customize before install
- add new cdrom, gets target hda or hdb (first free target)
- new cdrom now has priority in the boot order

Change the logic to try to append targets first, and if there isn't
any space left, use the first free one. This may cause other issues
but we'll just have to wait and see.
2013-10-03 08:48:15 -04:00
Cole Robinson
5860b132dc tests: Add focused unit test for device numbering 2013-10-03 08:48:11 -04:00
Cole Robinson
4f59c24b40 tests: Add test_initrd_inject command
This is a standalone test like test_urls, and requires interraction. It
pulls down a bunch of kernels from public URL trees, inject known
kickstarts that induce quick failure. User inspects the output to
ensure initrd inject is working as expected.
2013-09-28 16:50:08 -04:00
Cole Robinson
382a24d08d Fix tests on f20, /dev/loop0 isn't available 2013-09-25 19:35:05 -04:00
Cole Robinson
a2e5206730 deviceinterface: Fix creating direct interfaces (bz 1006324)
And take the opportunity to standarize on setting net.source,
rather than have API users have to do net.bridge/network/source_dev
2013-09-24 10:00:01 -04:00
Cole Robinson
cc75bc9311 guest: Remove needless functions
And simplify some test infrastructure as a result
2013-08-14 19:43:02 -04:00
Cole Robinson
81ce0a1085 osdict: Clean up 'default' handling usage
- Unify looking up osdict values
- Have Guest.py pass in its defaults, not encoding them in osdict
- Explicitly specify every device parameter that osdict handles, rather
    than have some psuedo magic dictionary format to handle it
2013-08-12 13:31:47 -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
3e158b80bf guest: Move cpuset static functions to DomainNumatune 2013-08-11 12:39:28 -04:00
Cole Robinson
87789548ba guest: Drop consolecb and wait parameters from start_install 2013-08-11 12:39:28 -04:00
Giuseppe Scrivano
4f63458050 tests: move the storage pool under /dev.
The commit efab27afbf02743a3a2582e9a111eb1b7d985b26 in libvirt uses
/dev/%s for logical pools, change the tests to accommodate it.

(crobinso: additional fix to work with older libvirt)
2013-07-29 10:01:18 -04:00
Cole Robinson
bba3c93508 xmlbuilder: Always keep around an xml node, even if building from scratch
This further unifies the 'parse existing' vs. 'build new' case.
2013-07-25 10:59:23 -04:00
Cole Robinson
3cf7679beb Guest: Add get_install_xml for install handling 2013-07-24 11:32:30 -04:00
Cole Robinson
2ba3ec2684 Guest: Convert to new style XML prop, drop a bunch of XML infrastructure
Now every XML property is new style, without explicit local get/set
handlers. Drop a bunch of XML infrastructure that was helping with the
transition.
2013-07-24 07:54:04 -04:00
Cole Robinson
6af0848fb8 osxml: Convert to new style XML props 2013-07-23 17:34:33 -04:00