From 42bb522f0d262b63bcfa99011d35e580c78430fc Mon Sep 17 00:00:00 2001 From: Hugues Fafard Date: Tue, 3 Aug 2021 19:47:54 +0200 Subject: [PATCH] cli: --cpu: make `numa.cell[0-9]*.discard` an on/off type option --- virtinst/cli.py | 2 +- virtinst/domain/cpu.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/virtinst/cli.py b/virtinst/cli.py index 6daea26a6..559ec9f7a 100644 --- a/virtinst/cli.py +++ b/virtinst/cli.py @@ -2335,7 +2335,7 @@ class ParserCPU(VirtCLIParser): cls.add_arg("numa.cell[0-9]*.memAccess", "memAccess", find_inst_cb=cls.cell_find_inst_cb) cls.add_arg("numa.cell[0-9]*.discard", "discard", - find_inst_cb=cls.cell_find_inst_cb) + find_inst_cb=cls.cell_find_inst_cb, is_onoff=True) cls.add_arg("numa.cell[0-9]*.memory", "memory", find_inst_cb=cls.cell_find_inst_cb) cls.add_arg("numa.cell[0-9]*.unit", "unit", diff --git a/virtinst/domain/cpu.py b/virtinst/domain/cpu.py index 1bc4d3fd8..a6a3ab3e7 100644 --- a/virtinst/domain/cpu.py +++ b/virtinst/domain/cpu.py @@ -33,7 +33,7 @@ class _CPUCell(XMLBuilder): memory = XMLProperty("./@memory", is_int=True) unit = XMLProperty("./@unit") memAccess = XMLProperty("./@memAccess") - discard = XMLProperty("./@discard") + discard = XMLProperty("./@discard", is_yesno=True) siblings = XMLChildProperty(_CPUCellSibling, relative_xpath="./distances")