Commit Graph

6715 Commits

Author SHA1 Message Date
Cole Robinson f986273e17 tests: cli: Cover all --hostdev options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson fa8cbe5628 tests: clitest: Cover all --memorybacking options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson 0da94e25b2 tests: clitest: Cover all --blkiotune and --idmap aliases 2019-05-15 17:34:01 -04:00
Cole Robinson dbb6f338ab tests: clitest: Cover all --vsock options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson 084122dfbe tests: clitest: Cover all --tpm options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson 0b2206be0e tests: clitest: Cover all --pm and --numatune options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson 300400f26c tests: clitest: Cover all --boot options and aliases 2019-05-15 17:34:01 -04:00
Cole Robinson dc0f9632ee tests: Repurpose spice-gl test as a generic singleton test
We need another entrypoint for singleton testing
2019-05-15 17:34:01 -04:00
Cole Robinson 1403815a3f tests: Add a bunch of example devices to the test drivers
Eventually we may want these for virt-xml or UI testing. Fill in
some XML for every top level element libvirt currently supports.
2019-05-15 15:23:59 -04:00
Cole Robinson 61639d9b14 cli: Only use regex matching if the subopt contains [
If we use regex matching all the time, we can erroneously match
certain strings. This already let some cli regressions through
with recent patches.
2019-05-15 14:47:53 -04:00
Cole Robinson 384607e502 cli: Strip find_inst regex from completion results
It doesn't really work with the argcompleter, so show the non-regex
version of the suboption
2019-05-15 13:18:39 -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 9d3ad1ed56 cli: --disk: Convert source.host.* to source.host[0-9]*.
There can be multiple hosts specified. We already have this wired
up in the XML handling, just need to expose it on the command line
2019-05-15 09:47:53 -04:00
Cole Robinson 83e7c95e1b cli: Fix comment typo 2019-05-14 15:59:40 -04:00
Cole Robinson af2182d890 cli: --memorybacking: Add discard= and allocation.mode= 2019-05-14 15:58:36 -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 334d18ab93 cli: --vcpus: add vcpus.vcpu[0-9]* config
This adds the following suboptions to configure the <domain><vcpus>
list:

- vcpus.vcpu[0-9]*.id
- vcpus.vcpu[0-9]*.enabled
- vcpus.vcpu[0-9]*.hotpluggable
- vcpus.vcpu[0-9]*.order
2019-05-14 15:58:36 -04:00
Cole Robinson 908faaffee cli: --cpu: add topology.*
We already expose these via --vcpus, but that's for back compat. New
options are under --cpu at:

topology.sockets
topology.cores
topology.threads
2019-05-14 14:36:40 -04:00
Cole Robinson a6b5f11f13 cli: --metadata: add genid= and genid_enable=
The latter is for triggering <genid/> bool XML, which tells libvirt
to auto-allocate a UUID. The cli isn't really XML conformant but
I can't think of anything better that is self advertising
2019-05-14 14:36:40 -04:00
Cole Robinson 7083294e2c cli: --sysinfo: Add oemStrings.entry[0-9]* 2019-05-14 14:36:40 -04:00
Cole Robinson d16425aa8f cli: --sysinfo: Add chasis suboptions
Add the following --sysinfo suboptions:

- chassis.manufacturer
- chassis.version
- chassis.serial
- chassis.asset
- chassis.sku
2019-05-14 14:36:40 -04:00
Cole Robinson 773625bfab cli: --boot: add initarg[0-9]*=X
We keep the old initargs="string" support as well, but also advertise the
explict XML list support
2019-05-14 14:36:40 -04:00
Cole Robinson e5480829b6 cli: --boot: Add explicit boot[0-9].dev config
We keep the old bootorder support as well, but also advertise the
explict XML list support
2019-05-14 14:36:40 -04:00
Pavel Hrdina c11d6ba4d7 domcapabilities: detect MDS new vulnerability
There is a new security feature 'md-clear' that mitigates recent CPU
Microarchitectural Store Buffer Data vulnerability.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 20:11:39 +02:00
Pavel Hrdina d8789a124f man: improve sysinfo description
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 19:55:18 +02:00
Pavel Hrdina 897578aee2 cli: fix sysinfo type parsing
If the optstr is "host" or "emulate" the optdict['type'] was already set
to the proper value so that condition is useless and we should set the
default optdict['type'] only if there was no type specified by user,
otherwise it is overwrite by our 'smbios' default.

In addition if invalid type is specified let libvirt to do the error
checking.

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

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2019-05-14 19:55:18 +02:00
Cole Robinson c31443a810 cli: Add driver.ats= and driver.iommu for virtio devices
This is shared XML schema used by multiple devices that support virtio
2019-05-14 12:45:57 -04:00
Cole Robinson 2344de6f38 cli: device: Add boot.loadparm= 2019-05-14 12:33:07 -04:00
Cole Robinson 13dbc715be cli: Add common device options for --memdev and chardevices
They both can handle explicit address config and alias config, so
wire it up
2019-05-14 12:25:00 -04:00
Cole Robinson 0e8e3c0bbf cli: device: add alias.name= 2019-05-14 12:23:00 -04:00
Cole Robinson 0eb2b167f9 cli: device: Add address.zpci.uid and address.zpci.fid 2019-05-14 12:20:53 -04:00
Cole Robinson afce300084 cli: Centralize boot.order and address option registering
We will use this as an entry point for future additions.
2019-05-14 12:16:13 -04:00
Cole Robinson ca0f9e18cc cli: Add --serial target.model.name=
This maps to XML like:

  <serial>
    <target>
      <model name='X'/>
    </target>
  </serial>
2019-05-14 11:57:50 -04:00
Cole Robinson bf2fe0790e cli: Add --serial target.port= option
This maps to the XML like:

  <serial>
    <target port='X'/>
  </serial>
2019-05-14 11:57:50 -04:00
Cole Robinson 0f81eff588 clitest: Remove long option newline escaping
Apparently we don't actually need it
2019-05-14 11:57:50 -04:00
Cole Robinson f3fd6d200b cli: --smartcard: support database= and certificate[0-9]*=
For mode=host-certificates config
2019-05-14 11:57:50 -04:00
Cole Robinson c0ddb86918 tests: clitest: define XML generated from compare tests
All our virt-install/virt-clone compare tests aren't actually
attempting to define the XML, meaning we could be generating bogus
output. Enable it, then fix the fallout, mostly some places we are
triggering libvirt XML validation
2019-05-14 11:57:50 -04:00
Cole Robinson 5e98bfba80 tests: clitest: Break up test run() function 2019-05-14 11:57:50 -04:00
Cole Robinson c85bb61559 devices: char: Wire up seclabels in CharSource
And expose the config options on the command line for all CharSource
users
2019-05-14 11:57:50 -04:00
Cole Robinson 569533b187 devices: Add DeviceSeclabel
Hoist it out of DeviceDisk, so we can eventually share it with
CharSource as well
2019-05-14 11:57:50 -04:00
Cole Robinson dc945dc4b9 cli: --disk: alias seclabel* to source.seclabel*
Missed it in the previous conversion
2019-05-14 11:57:50 -04:00
Cole Robinson 423b084e02 cli: Share char source arguments among all CharSource users
Add char source arguments to all users:

--serial
--parallel
--console
--channel
--smartcard
--rng
--redirdev

Not all source options apply to all types, but libvirt doesn't
really discriminate, so we should do the same.
2019-05-14 11:57:50 -04:00
Cole Robinson 354dc4df4a cli: --rng: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* backend_connect_host -> backend.source.connect_host
* backend_connect_service -> backend.source.connect_service
* backend_host -> backend.source.host
* backend_mode -> backend.source.mode
* backend_service -> backend.source.service
* backend_type -> backend.type
* rate_bytes -> rate.bytes
* rate_period -> rate.period

'type', and 'device' are kept as advertised options,
due to them being commonly specified and documented
2019-05-14 11:57:50 -04:00
Cole Robinson fae52f4784 cli: char: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* protocol -> protocol.type
* target_address -> target.address
* name -> target.name
* target_type -> target.type

'host', 'path', 'mode', and 'bind_host' are kept as advertised options,
due to them being commonly specified and documented
2019-05-14 11:57:50 -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 1b3e8e1a32 addhardware: Remove supports_property usage
It's not a pattern I think is worth extending in the future, and
make internal refactorings more difficult. Drop it, and drop it
from tpm and char devices since it is now unused
2019-05-13 14:06:32 -04:00