Commit Graph

6532 Commits

Author SHA1 Message Date
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
Cole Robinson
e11ed3ce77 devices: char: Remove uncalled supports_property values 2019-05-13 13:43:25 -04:00
Cole Robinson
1bf970627e devices: tpm: Drop unnecessary defaults setting
Libvirt does the same for these two values, so don't bother duplicating
2019-05-13 13:43:25 -04:00
Cole Robinson
bd6f751657 details: Drop char supports_property usage
Whether we show something in the UI should be more dependent on
whether it's actually set in the XML, not some internal hardcoded
list which can go out of date.
2019-05-13 13:38:46 -04:00
Cole Robinson
0ec251dae4 devices: char: Drop default 'protocol' setting
In the cases we were doing this, libvirt already defaults to raw for us
2019-05-13 13:06:46 -04:00
Cole Robinson
68b4236262 devices: rng: Remove unused function supports_property 2019-05-13 13:01:18 -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
a6495bb38f domain: virtinst: custom implement _redefine_xmlobj 2019-05-13 12:09:39 -04:00
Cole Robinson
cfa1a0569b create: Use self._guest less in install path
Pass it around to all the callbacks as needed. Makes the flow easier
to follow
2019-05-13 12:09:39 -04:00
Cole Robinson
a54b83072a addhardware: Remove unused is_customize_dialog 2019-05-13 12:09:39 -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
201dfdb23e netlist: Don't spam logs with errors on app shutdown 2019-05-13 12:08:55 -04:00
Cole Robinson
583dae7af5 details: Clarify config_apply variable names 2019-05-13 12:08:55 -04:00
Cole Robinson
a506e3c108 details: Have a separate hw column for unique key
Right now we overload the DEVICE column for non-device pages
like overview or memory. Add a separate column for KEY, and have
DEVICE==None for non-device pages
2019-05-13 12:08:55 -04:00
Cole Robinson
491da67cbf details: Add _make_hw_list_entry helper 2019-05-13 12:08:55 -04:00
Cole Robinson
03bddaaeb3 details: Hardcode list icon size
We use the same value everywhere, so don't include it in the model
2019-05-13 12:08:55 -04:00
Cole Robinson
f947afc3df details: split out a top level vmwindow
vmmVMWindow handles all the menuing, and coordinating between the
console, snapshots, and details panel. Simplifies the details
code a bit which will help when we add xmlediting
2019-05-13 12:08:55 -04:00
Cole Robinson
ad4f869405 netlist: Don't spam logs with errors on app shutdown 2019-05-13 12:08:55 -04:00
Cole Robinson
1752b22828 createnet: Drop _validate routines
It's a mix of stuff libvirt already catches, UI sanity checking
like if user specified an empty field, and prompting for really
obscure corner cases. This stuff isn't important enough to carry
around all this code IMO
2019-05-13 12:08:55 -04:00
Cole Robinson
4141f5c79b createnet: Shrink to one page
Name and forward mode config are always visible. ipv4, ipv6, and
domain name are under their own expanders which are collapsed by
default.

This will fit better with the XML editor pattern and reduce the
urge to squeeze more UI elements into the now smaller wizard
2019-05-13 12:08:55 -04:00
Cole Robinson
7322d906b4 createnet: Turn forward mode selector into single combo box
Rather than a mix of radio buttons and other combo boxes.
This follows the pattern we more commonly use in other UI, and
makes it easier to hide UI elements that aren't relevant for
specific choices, like the possibly large SR-IOV selector
2019-05-13 12:08:55 -04:00
Cole Robinson
4b414cbcca createnet: Remove explanatory network labels
This wizard is sufficiently obscure that I don't think it's
really valuable to try to explain networking concepts with
UI labels. If users don't know what they are trying to create
by using this wizard, there's no way we are going to adequately
explain to them what they are looking at. The example values
should be self explanatory enough anyways
2019-05-13 12:08:55 -04:00
Cole Robinson
1fa0f7261b createnet: drop the @ipv6 setting
This only applies for inter VM traffic when ipv6 networking is
disabled, which IMO is pretty obscure. If users want ipv6
connectivity, just enabling ipv6 will handle it appropriately
2019-05-13 12:08:55 -04:00
Cole Robinson
7597750a59 virtinst: network: streamline pretty desc output 2019-05-13 12:08:55 -04:00
Cole Robinson
0ae80d84d7 createnet: Remove static route configuration
This is fairly advanced stuff IMO and complicates the UI, and
it's inflexible as it only allows a single route. Drop it
2019-05-13 12:08:55 -04:00
Cole Robinson
1b6b6b10e3 createvol: Always generate a default name
Let's users just quickly click through, gives more testing
to the name_hint path
2019-05-13 12:08:55 -04:00
Cole Robinson
bad894ad8c createvol: Modernize code style
* Have clear UI callbacks
* Group functions
* Privatize internal methods
* Don't carry around _vol internally
2019-05-13 12:08:55 -04:00
Cole Robinson
3694f45939 createpool: Modernize code style
* Have clear UI callbacks
* Group functions
* Don't carry around _pool internally
2019-05-13 12:08:55 -04:00
Cole Robinson
5b0b90c33e createpool: Switch to a single page
Just combine the pages. This simplifies the code and navigation, and
makes it easier to add XML editing
2019-05-13 12:08:55 -04:00
Cole Robinson
fe9001fea1 virtinst: interface: Drop unused bits
Drops most XML parsing and all the creation handling
2019-05-13 12:08:55 -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
85a7b2cd61 virtManager: interface: Remove unused code after UI removal
Removal all the virtManager bits that are no longer used
2019-05-13 12:08:55 -04:00
Cole Robinson
622a363e5b clone: Fix inverted --nonsparse check
I botched 4f66c423f7 and inverted the sparse check, meaning --nonsparse
on the command line would actually request a sparse image. Fix it

https://bugzilla.redhat.com/show_bug.cgi?id=1675743
2019-05-13 09:58:13 -04:00