Commit Graph

6518 Commits

Author SHA1 Message Date
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
Cole Robinson
721ac4f745 cli: --clock: add timer[0-9]*.{name,present,tickpolicy} 2019-05-12 19:24:36 -04:00
Cole Robinson
20e60603d8 cli: --clock: Make invalid X_tickpolicy options no-ops
tickpolicy is only handled in libvirt for pit and rtc timers. Accept
the other options but make them silent no-ops
2019-05-12 19:14:05 -04:00
Cole Robinson
a1165b2981 cli: --clock: Explicitly register options
Rather than do so based off the TIMER_NAMES list. Makes it less
easy to accidentally break cli API
2019-05-12 19:14:05 -04:00
Cole Robinson
167bae862b cli: --sysinfo: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* baseBoard_asset -> baseBoard.asset
* baseBoard_location -> baseBoard.location
* baseBoard_manufacturer -> baseBoard.manufacturer
* baseBoard_product -> baseBoard.product
* baseBoard_serial -> baseBoard.serial
* baseBoard_version -> baseBoard.version
* bios_date -> bios.date
* bios_release -> bios.release
* bios_vendor -> bios.vendor
* bios_version -> bios.version
* system_family -> system.family
* system_manufacturer -> system.manufacturer
* system_product -> system.product
* system_serial -> system.serial
* system_sku -> system.sku
* system_uuid -> system.uuid
* system_version -> system.version

In truth this does not accurately represent the XML either, which
uses a generic <entry name='FOO'>BAR</entry> syntax. We should
expose that raw config on the cli, but also provide these convenience
options too, so using '.' here is still useful to be consistent
with new style opt names.
2019-05-12 18:35:37 -04:00
Cole Robinson
f39af8b054 cli: --network: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* driver_name -> driver.name
* driver_queues -> driver.queues
* filterref -> filterref.filter
* link_state -> link.state
* mac -> mac.address
* model -> model.type
* rom_bar -> rom.bar
* rom_file -> rom.file
* source_mode -> source.mode
* source_path -> source.path
* portgroup -> source.portgroup
* source_type -> source.type
* target -> target.dev
* virtualport.instanceid -> virtualport.parameters.instanceid
* virtualport_interfaceid -> virtualport.parameters.interfaceid
* virtualport_managerid -> virtualport.parameters.managerid
* virtualport.profileid -> virtualport.parameters.profileid
* virtualport.typeid -> virtualport.parameters.typeid
* virtualport.typeidversion -> virtualport.parameters.typeidversion
* virtualport_type -> virtualport.type

'model' and 'mac' are kept as advertised options, due to them being
commonly specified
2019-05-12 18:21:49 -04:00
Cole Robinson
f67384608c cli: --disk: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* logical_block_size -> blockio.logical_block_size
* physical_block_size -> blockio.physical_block_size
* cache -> driver.cache
* detect_zeroes -> driver.detect_zeroes
* discard -> driver.discard
* error_policy -> driver.error_policy
* io -> driver.io
* driver_name -> driver.name
* driver_type -> driver.type
* read_bytes_sec -> iotune.read_bytes_sec
* read_iops_sec -> iotune.read_iops_sec
* total_bytes_sec -> iotune.total_bytes_sec
* total_iops_sec -> iotune.total_iops_sec
* write_bytes_sec -> iotune.write_bytes_sec
* write_iops_sec -> iotune.write_iops_sec
* snapshot_policy -> snapshot
* source_host_name -> source.host.name
* source_host_port -> source.host.port
* source_host_socket -> source.host.socket
* source_host_transport -> source.host.transport
* source_name -> source.name
* source_pool -> source.pool
* source_protocol -> source.protocol
* reservations.managed -> source.reservations.managed
* reservations.source.mode -> source.reservations.source.mode
* reservations.source.path -> source.reservations.source.path
* reservations.source.type -> source.reservations.source.type
* startup_policy -> source.startupPolicy
* source_volume -> source.volume
* bus -> target.bus
* target -> target.dev
* removable -> target.removable

'bus' and 'cache' are kept as advertised options, due to them being
commonly specified
2019-05-12 18:21:49 -04:00
Cole Robinson
919d08cdcd cli: --vcpus: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* placement -> vcpu.placement
* cpuset -> vcpu.cpuset
* vcpu -> vcpus

Change the ambiguous maxvcpus handling to match how we fixed
it for the --memory case, which is similar

'cpuset', 'vcpus', and 'maxvcpus' are preserved in --vcpus=help output
because they are mentioned several times in the docs, and they are
historically more commonly used (at least the first two)
2019-05-12 18:21:49 -04:00
Cole Robinson
e81e2b16b9 cli: --video: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* accel3d -> model.acceleration.accel3d
* heads -> model.heads
* ram -> model.ram
* model -> model.type
* vgamem -> model.vgamem
* vram -> model.vram
* vram64 -> model.vram64
2019-05-12 18:21:49 -04:00
Cole Robinson
6e18fba24c cli: --hostdev: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* driver_name -> driver.name
* rom_bar -> rom.bar
2019-05-12 18:21:49 -04:00
Cole Robinson
d1c6c6e758 cli: --vsock: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* cid -> cid.address
* auto_cid -> cid.auto

Add man docs for --vsock while we are at it, since they are missing
2019-05-12 18:21:49 -04:00
Cole Robinson
b92f1595a8 cli: --panic: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* iobase -> address.iobase

Simplify model back compat handling as a result
2019-05-12 18:21:49 -04:00
Cole Robinson
b0c3c8e12e cli: --tpm: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* path -> backend.device.path
* type -> backend.type
* version -> backend.version
2019-05-12 18:21:49 -04:00
Cole Robinson
8e1cdf2cd7 cli: --controller: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* driver_queues -> driver.queues
* master -> master.startport
2019-05-12 18:21:49 -04:00
Cole Robinson
ea63141fca cli: --graphics: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* clipboard_copypaste -> clipboard.copypaste
* filetransfer_enable -> filetransfer.enable
* gl -> gl.enable
* rendernode -> gl.rendernode
* image_compression -> image.compression
* mouse_mode -> mouse.mode
* passwd -> password
* passwdValidTo -> passwordValidTo
* streaming_mode -> streaming.mode
* tlsport -> tlsPort
2019-05-12 18:21:49 -04:00