mirror of
https://github.com/virt-manager/virt-manager.git
synced 2025-01-08 07:03:02 -06:00
virt-install: support --input none
Disables adding any default input devices Signed-off-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
c78ec96933
commit
2835c250c7
@ -52,7 +52,6 @@
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<controller type="pci" model="pcie-root-port"/>
|
||||
<input type="tablet" bus="usb"/>
|
||||
<graphics type="spice" port="-1" tlsPort="-1" autoport="yes">
|
||||
<image compression="off"/>
|
||||
</graphics>
|
||||
|
@ -868,6 +868,7 @@ c.add_compare(
|
||||
--smartcard none
|
||||
--tpm none
|
||||
--rng none
|
||||
--input none
|
||||
""", "singleton-config-1")
|
||||
|
||||
|
||||
|
@ -4169,6 +4169,13 @@ class ParserInput(VirtCLIParser):
|
||||
cli_arg_name = "input"
|
||||
guest_propname = "devices.input"
|
||||
remove_first = "type"
|
||||
stub_none = False
|
||||
|
||||
def _parse(self, inst):
|
||||
if self.optstr == "none":
|
||||
self.guest.skip_default_input = True
|
||||
return
|
||||
return super()._parse(inst)
|
||||
|
||||
@classmethod
|
||||
def _virtcli_class_init(cls):
|
||||
|
@ -211,6 +211,7 @@ class Guest(XMLBuilder):
|
||||
self.skip_default_graphics = False
|
||||
self.skip_default_rng = False
|
||||
self.skip_default_tpm = False
|
||||
self.skip_default_input = False
|
||||
self.have_default_tpm = False
|
||||
self.x86_cpu_default = self.cpu.SPECIAL_MODE_APP_DEFAULT
|
||||
|
||||
@ -1064,6 +1065,8 @@ class Guest(XMLBuilder):
|
||||
return all([c.model == "none" for c in controllers])
|
||||
|
||||
def _add_default_input_device(self):
|
||||
if self.skip_default_input:
|
||||
return
|
||||
if self.os.is_container():
|
||||
return
|
||||
if self.devices.input:
|
||||
|
Loading…
Reference in New Issue
Block a user