Commit Graph

6493 Commits

Author SHA1 Message Date
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
Cole Robinson
83e15a3bce cli: --pm: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* suspend_to_disk -> suspend_to_disk.enabled
* suspend_to_mem -> suspend_to_mem.enabled
2019-05-12 18:21:49 -04:00
Cole Robinson
a160fac5e8 cli: --features: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* eoi -> apic.eoi
* gic_version -> gic.version
* hyperv_relaxed -> hyperv.relaxed.state
* hyperv_reset -> hyperv.reset.state
* hyperv_spinlocks_retries -> hyperv.spinlocks.retries
* hyperv_spinlocks -> hyperv.spinlocks.state
* hyperv_synic -> hyperv.synic.state
* hyperv_vapic -> hyperv.vapic.state
* kvm_hidden -> kvm.hidden.state
* pmu -> pmu.state
* smm -> smm.state
* vmcoreinfo -> vmcoreinfo.state
* vmport -> vmport.state
2019-05-12 18:21:49 -04:00
Cole Robinson
6aa9c6eecf cli: --idmap: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* gid_count -> gid.count
* gid_start -> gid.start
* gid_target -> gid.target
* uid_count -> uid.count
* uid_start -> uid.start
* uid_target -> uid.target
2019-05-12 18:21:49 -04:00
Cole Robinson
8d26a08d25 cli: --boot: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* rebootTimeout -> bios.rebootTimeout
* useserial -> bios.useserial
* boot_menu -> bootmenu.enable
* cmdline -> kernel_args
* loader_ro -> loader.readonly
* loader_secure -> loader.secure
* loader_type -> loader.type
* nvram_template -> nvram.template
* smbios_mode -> smbios.mode
2019-05-12 18:21:49 -04:00
Cole Robinson
3d30abf3ac cli: --cpu: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

* cell[0-9]*.cpus -> numa.cell[0-9]*.cpus
* cell[0-9]*.distances.sibling[0-9]*.id -> numa.cell[0-9]*.distances.sibling[0-9]*.id
* cell[0-9]*.distances.sibling[0-9]*.value -> numa.cell[0-9]*.distances.sibling[0-9]*.value
* cell[0-9]*.id -> numa.cell[0-9]*.id
* cell[0-9]*.memory -> numa.cell[0-9]*.memory
2019-05-12 18:21:49 -04:00
Cole Robinson
d2a07cf41a cli: --memorybacking: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

- size -> hugepages.page.size
- unit -> hugepages.page.unit
- nodeset -> hugepages.page.nodeset
- access_mode -> access.mode
- source_type -> source.type
2019-05-12 18:21:49 -04:00
Cole Robinson
536cd64515 cli: --blkiotune: use predictable cli subarg names
To match the XML schema, rename these subarguments and add aliases
to preserve compatibility:

- device_path -> device.path
- device_weight -> device.weight
2019-05-12 18:21:49 -04:00
Cole Robinson
375dd4c563 cli: --numatune: use predictable cli subarg names
To match the XML schema, rename:

- mode -> memory.mode
- nodeset -> memory.nodeset
2019-05-12 18:21:49 -04:00
Cole Robinson
1b38612a64 man: virt-install: Drop finegrained --network virtualport docs
We shouldn't be duplicating libvirt documentation here. If someone
needs <virtualport> config, they are likely working backwards from
working XML and trying to figure out the command line. Drop most
of the details
2019-05-12 18:21:49 -04:00
Cole Robinson
b77d0e2d9f man: virt-install: update --disk section
Clearly separate storage creation and device config options. Lots
of tweaks to various suboption sections.
2019-05-12 18:08:43 -04:00
Cole Robinson
e364ecf69b man: virt-install: tweak --filesystem docs
'mode' is 'accessmode' these days
2019-05-12 17:29:10 -04:00
Cole Robinson
2d80a0b4b9 cli: Add --memory opts to match XML names
Sort out the memory property naming ambiguity on the command line.

* memory -> currentMemory
* maxmemory -> memory
* hotplugmemorymax -> maxMemory
* hotplugmemoryslots -> maxMemory.slots

To maintain back compat, we need to do some funky handling with
memory and maxmemory values. Basically if currentMemory is specfied,
we interpret them as new style, otherwise preserve the old behavior.
2019-05-12 17:25:47 -04:00
Cole Robinson
7f9e21f9b5 cli: Rename boot_order to boot.order
And add a backcompat alias to match
2019-05-12 17:25:47 -04:00
Cole Robinson
cbb7d369ef cpu: Convert 'cache' to a singleton
Libvirt doesn't represent it at as a list, and tracking it as a list
complicates the cli machinery
2019-05-12 17:25:47 -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
ad36657b72 guest: Set vcpus from cpu.topology, if it's specified
We already did this in cli.py, but that's the wrong place to do it
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
12440b00c1 osdict: return _OsResources to callers
Use the class helper routines to save some tedious dict management
2019-05-12 17:25:47 -04:00
Cole Robinson
e76e350a8d osdict: Add _OsResources helper class
It's just an implementation detail for now, but we will use it to
simplify callers interactions with resources data
2019-05-12 17:25:47 -04:00
Cole Robinson
efa8c6f2c0 osdict: Don't limit qemu TCG to vcpus=1
Modern qemu has multithread TCG support for all the arches we
support, so don't limit things
2019-05-12 17:25:47 -04:00
Cole Robinson
4238e3f7d7 osdict: Fix get_recommended_resources minimum logic
If an OS has a <minimum> resources section, and a <recommended>
resources section, but there's a field in the former that isn't in
the latter, currently we throw out the former field entirely. This
is the case for n-cpus for a few OS. Instead we should be using
the <minimum> ncpus value. This changes the default <vcpu> value
for a quite a few test cases.
2019-05-12 17:25:47 -04:00
Cole Robinson
9199c2d157 osdict: Remove "cpus" resources tracking
It's for CPU speed but we don't use it anywhere
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
97d92794bc cli: Make parser aliases a per-class dictionary
Rather than associate them per virt argument. It's less of a clean
fit this way, but I think it will make it less likely that aliases
are cargo culted around and added unnecessarily
2019-05-12 17:25:47 -04:00