Commit Graph

63 Commits

Author SHA1 Message Date
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
Cole Robinson
012d1cdc52 Installer: Drop all XML handling, just have it setup install info 2013-07-23 17:34:33 -04:00
Cole Robinson
07215853b3 Installer: Drop hard to manage install_bootconfig 2013-07-23 17:34:33 -04:00
Cole Robinson
d9e82f984c VirtualDevice: Raise error if parsing addrstr fails 2013-07-23 17:34:32 -04:00
Cole Robinson
524d1047b1 Guest: Make API users opt in for default console/input devices
We don't need to maintain API back compat anymore
2013-07-23 17:34:32 -04:00
Cole Robinson
326731cfc5 xmlbuilder: Remove order_elements hack 2013-07-23 17:34:32 -04:00
Cole Robinson
510d28e33b Seclabel: Convert to new style XML props. 2013-07-23 17:34:31 -04:00
Cole Robinson
e802eae07b VirtualCharDevice: Convert to new style XML props, rework API 2013-07-23 17:34:31 -04:00
Cole Robinson
4f7f9e2267 VirtualAudio: Convert to new style XML props 2013-07-15 22:00:08 -04:00
Cole Robinson
a9296ec3ae VirtualController: Convert to new style XML props 2013-07-15 21:52:18 -04:00
Cole Robinson
dc58d48a33 VirtualGraphics: Drop non-default __init__ params 2013-07-15 20:43:41 -04:00
Cole Robinson
f079ec36eb VirtualHostDevice: Convert to new style XML props 2013-07-15 17:45:43 -04:00
Cole Robinson
3ae835dc7c VirtualNetworkInterface: Drop all XML __init__ params 2013-07-15 14:14:05 -04:00
Cole Robinson
98a4d86d7f VirtualRedir: Convert to new style XML props 2013-07-15 12:57:37 -04:00
Cole Robinson
e5a7fe6405 VirtualVideo: Convert to new style xml props 2013-07-15 11:19:18 -04:00
Cole Robinson
e04dfdd4ff virtinst: Test rhel defaults, and make sure it doesn't break test suite 2013-07-13 20:01:07 -04:00
Cole Robinson
4ce1774d53 VirtualDisk: Rework provisioning and validation behavior
We separate all the provisioning bits to diskbackend.py. VirtualDisk
users now need to explicitly opt in to storage creation by using
set_create_storage().

validation is no longer done automatically, users must call the
validation() command.

__init__ drops all extra parameters.

This will eventually get us to a point where we can unify the manual
XML building and XML parsing machinery, and get consistent validation
behavior between devices.
2013-07-13 16:37:33 -04:00
Cole Robinson
dcd632da80 XMLBuilder: Provide default fget and fset impls
This is the first step towards unifying the XML handling split between
parsing and creating from scratch. Demonstrate it with VirtualDisk.iotune
bits.
2013-07-12 14:41:29 -04:00
Cole Robinson
f1b55090d2 VirtualDisk: Drop cache and io from __init__
They are barely used and can be specified separately.
2013-07-12 13:10:23 -04:00