Commit Graph

218 Commits

Author SHA1 Message Date
Cole Robinson aaa065d38e createpool: Add more coverage testing 2019-07-03 19:37:01 -04:00
Cole Robinson 2c03ea5c92 hostnets: Remove SR-IOV info listing
This is fairly advanced stuff and it should be fine to get this
info from the XML editor page
2019-06-16 23:48:51 -04:00
Cole Robinson 59873f3876 hostnets: Remove QoS viewing/editing
This is fairly niche, and can be reviewed or edited with the XML
editor
2019-06-16 20:25:42 -04:00
Cole Robinson 54a28485df tests: Use assertRaises more 2019-06-14 13:04:56 -04:00
Cole Robinson 17ac0d017c virt-install: Drop --os-variant suboption parsing
Not sure I want to go down that route if we can avoid it. Instead
just fold the full_id support into the existing option handling.
Streamline the OSVariantData usage throughout the cli tools
2019-06-13 21:25:05 -04:00
Cole Robinson c33eb562c2 devices: graphics: Test remaining code coverage 2019-06-11 17:51:25 -04:00
Cole Robinson ae5e9d9a2c virtinst: Add full test coverage for xml*.py files 2019-06-09 19:00:03 -04:00
Cole Robinson 361657ad15 virtinst: Add a lot of test code coverage
* Delete dead code
* Add tests for various device default code paths
* Rework certain conditions a bit so code coverage always hits them
2019-06-09 18:59:50 -04:00
Cole Robinson 261a0a0482 domain: seclabel: Drop some unneeded logic
* imagelabel is a runtime only XML attribute which we don't use at
  all, so drop parsing
* drop validation checks that libvirt will do for us
2019-06-09 18:34:48 -04:00
Cole Robinson 388850f04e virtinst: Rename util to xmlutil
The only functions left in there are largely for xml handling, so
make it explicit
2019-06-07 18:21:24 -04:00
Cole Robinson f85e6def55 support: Convert callers to the new format 2019-06-07 16:26:03 -04:00
Cole Robinson 08b26e9b1c devices: disk: Add tests for missing _storage_backend 2019-06-05 11:13:33 -04:00
Cole Robinson f22a0ec2e4 xmlbuilder: Add replace_child
This will be used for UI XML editing of devices
2019-06-05 11:13:33 -04:00
Athina Plaskasoviti 35c53fc02c cli: Add --disk rawio
XML mapping:

<disk type=... rawio="yes">
...
</disk>

Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
Reviewed-by: Fabiano Fidêncio <fidencio@redhat.com>
2019-05-20 15:32:04 +02:00
Athina Plaskasoviti d171489f7d cli: Add --disk wwn
XML mapping:

<disk>
  <wwn>...</wwn>
</disk>

Reviewed-by: Cole Robinson <crobinso@redhat.com>
Signed-off-by: Athina Plaskasoviti <athina.plaskasoviti@gmail.com>
2019-05-17 15:29:18 -04:00
Cole Robinson 7c835321be cli: --blkiotune: Convert device.* to device[0-9]*.
Libvirt can represent multiple <device> blocks here, so mirror that
on the command line
2019-05-15 09:59:25 -04:00
Cole Robinson 90f5b29789 cli: --memorybacking: Convert hugepages.page to a list
There can be more than 1 <memoryBacking><hugepages><page> element.
Adjust the cli options to match:

- hugepages.page[0-9]*.size
- hugepages.page[0-9]*.unit
- hugepages.page[0-9]*.nodeset
2019-05-14 15:58:36 -04:00
Cole Robinson 873a35dcee devices: char: move 'protocol' and 'log*' to CharSource
This violates our typical XML hierarchy, but that's how it's modeled
internally in libvirt, and these properties are shared among all
charsource users.
2019-05-14 11:57:50 -04:00
Cole Robinson 43a39dc158 devices: smartcard: Use CharSource
smartcard does the same internally for libvirt, so let's follow that
pattern, and fix the fallout
2019-05-14 11:57:50 -04:00
Cole Robinson 9d78759ac5 devices: redirdev: Use CharSource
redirdev does the same internally for libvirt, so let's follow that
pattern, and fix the fallout
2019-05-14 11:57:50 -04:00
Cole Robinson 6d46e37e09 devices: rng: Use CharSource
Re-use CharSource, just like libvirt does internally. Adjust all
callers to match. Rename type -> backend_model while we are here,
because type is ambiguous
2019-05-14 11:57:50 -04:00
Cole Robinson b2b9d7d366 devices: char: Add CharSource
Move all ./source handling into CharSource, which will be reused by
other device classes as well. This requires us to add ../ handling
into our xmlapi xpath engine
2019-05-14 11:57:50 -04:00
Cole Robinson ba1764943b devices: char: drop tty fallback reading
This is only for ancient rhel5 era libvirt, We don't need it anymore
and it complicates XML handling
2019-05-13 12:36:17 -04:00
Cole Robinson e6eb1d447b devices: char: Rename some properties to better match XML
* bind_port -> bind_service
* source_host -> connect_host
* source_port -> connect_service
2019-05-13 12:35:55 -04:00
Cole Robinson 472cfbc2a7 xmlbuilder: Validate root element of object parsexml
Ensure that for example a DeviceDisk is actually passed <disk> XML
2019-05-13 12:09:39 -04:00
Cole Robinson 58d0d43db1 tests: Drop most interface XML testing
No part of the app requires the <interface> details any more, so
drop testing
2019-05-13 12:08:55 -04:00
Cole Robinson a5ae150201 guest: Rename curvcpus and cpuset to better match XML hierarchy 2019-05-12 17:25:47 -04:00
Cole Robinson 3c57b13322 devices: panic: drop DeviceAddress wrapper opts
Just use regular address handling to represent 'type' and 'iobase'.
Add address handling to the command line
2019-05-12 17:25:47 -04:00
Cole Robinson 913c9de29b domain: features: treat <vmcoreinfo/> as a tristate
When it was initially introduced, vmcoreinfo was a boolean option,
but that was changed a release latest to be a tristate.
2019-05-12 17:25:47 -04:00
Cole Robinson 135b97637e guest: Rename memory properties to match XML values
Right now we have:

* memory -> ./currentMemory
* maxmem -> ./memory
* hotplugmaxmem -> ./maxMemory

Which is just a mess to know what we might be really setting behind
the scenes. Rename the properties to match the XML element name, and
adjust all users to the new names. cli options aren't changed though
2019-05-12 17:25:47 -04:00
Cole Robinson 76d5113941 xmlbuilder: Make is_* handling more future proof
If libvirt changes XML handling in the future, we shouldn't restrict
what we return to the user with the is_yesno/is_onoff convertors
2019-05-12 17:22:13 -04:00
Cole Robinson 764bf1ad29 xmlapi: rename and move get_prop/set_prop to util
Change to set_prop_path and get_prop_path to make it a bit more
clear, and move out of xmlapi since it's not xml specific
2019-05-10 14:02:44 -04:00
Cole Robinson 96beae9ba3 tests: Don't use bogus net model names
Libvirt is rejecting them now
2019-04-17 10:07:35 -04:00
Pavel Hrdina c1ebd6730c DomainCpu: check CPU model name only if model exists
For CPU modes other then "custom" there is no model so we should not
check the suffix of model name.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-04-11 09:38:14 +02:00
Pavel Hrdina fb5136a6a9 domain: cpu: automatically add CPU security features for "custom" mode
If user selects specific CPU model to be configured for guest we will
automatically add CPU security features to make sure that the guest is
not vulnerable to these CPU HW bugs.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1582667

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-19 13:45:49 +01:00
Pavel Hrdina 6423f653fd domain: cpu: introduce set_model function
We will need to pass another variable into the setter so we cannot use
the property setter.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-19 13:45:49 +01:00
Pavel Hrdina 8f870c3fca tests: xmlparse: use set_special_mode function
CPU mode is never set directly using mode attribute, instead we use
setter function with some extra logic that needs to be done.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-03-19 13:41:46 +01:00
Marc Hartmayer 1b53594002 tests: Add test case for reorder_boot_order method
Add a test case for `reorder_boot_order`. It verifies that the OS boot
order is removed and that all other boot order indices are adjusted
accordingly.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2019-03-06 13:15:38 -05:00
Marc Hartmayer ecc0861c89 tests: xmlparse: refactor method for generating out file path
Refactor method for generating out file path. It will be used in a
upcoming patch.

Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2019-03-06 13:15:38 -05:00
Marc Hartmayer 5bad22e837 tests: Use (get|set)_prop
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
2019-03-06 13:13:13 -05:00
Cole Robinson b051b6c95d cpu: Have host-copy use domcaps if qemu is new enough (bz 1637767)
capabilities is known problematic. Use domcaps if libvirt+qemu
reports working host-model

https://bugzilla.redhat.com/show_bug.cgi?id=1637767
2018-10-13 17:48:25 -04:00
Cole Robinson 757910a1bb cli: Add --metadata os_name= and os_full_id=
Allows changing the libosinfo metadata for an existing vm via virt-xml
2018-09-30 20:55:32 -04:00
Cole Robinson b19f94299b details: Add OS name view/edit, + oslist rework
This is just a big nasty commit.

Turn the OS inspection page into an always available page that
shows the libosinfo name from the domain metadata XML. Use oslist.py
and have it absorb more of the common behavior needed by create.py
and details.py. Add UI tests for it all
2018-09-30 20:55:32 -04:00
Cole Robinson bad5eabd93 domain: Add metadata.libosinfo
From the libosinfo discussion here:
https://www.redhat.com/archives/libosinfo/2018-September/msg00003.html

This is a cross-app schema for tracking libosinfo OS ID in the
domain <metadata> XML. Example:

   <metadata>
     <libosinfo:libosinfo xmlns:libosinfo="http://libosinfo.org/xmlns/libvirt/domain/1.0">
       <libosinfo:os id="http://fedoraproject.org/fedora/17"/>
     </libosinfo:libosinfo>
   </metadata>
2018-09-13 12:39:56 -04:00
Cole Robinson 31bda5bbb6 devices: watchdog: Add set_defaults 2018-09-04 14:55:04 -04:00
Povilas Kanapickas e6c7e46a54 details: Add support for disk detect zeroes option 2018-09-04 11:39:50 -04:00
Cole Robinson ad70393ed9 tests: Fix breakage with libvirt.git
https://ci.centos.org/job/virt-manager-master-check/systems=libvirt-fedora-rawhide/409/

Added validation to hugepages nodeset. Just drop the test case, we
test it elsewhere too
2018-09-04 09:21:23 -04:00
Cole Robinson a5ef8a2995 support: Drop a few more support checks only used in tests/ 2018-08-31 18:31:17 -04:00
Cole Robinson ea413be214 xmlbuilder: Rename get_xml_config -> get_xml
The config part is redundant. Should have done this a long time ago
2018-08-31 16:52:02 -04:00
Lin Ma 4484f473cd char: Track/Show the state of virtio channels in channel details
crobinso: Add a test case

Signed-off-by: Lin Ma <lma@suse.com>
2018-07-12 15:25:23 -04:00