From 7e79e064ea778e2953c9f321a60aae47a08d32cb Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Wed, 28 Aug 2024 11:43:36 -0400 Subject: [PATCH] Revert virt-xml multiple --edit support This reverts b34ae0d0c883972d74deef6cdadb29bdd1bbe487 and 1fef5d8661118a4f00a8689b323d275144b39dbe. Playing with this some more I found some deeper problems. For example ```console [:~/src/virt-manager] (main) $ ./virt-xml test-for-virtxml --connect test://`pwd`/tests/data/testdriver/testsuite.xml --print-diff --edit 1 --video model=FOO --edit 2 --sound model=BAR --- Original XML +++ Altered XML @@ -180,14 +180,14 @@ - + ``` There's other weirdness too, though it's mostly strange plays on previous weird behavior * `--edit --video model=vga --edit --sound model=ich9 --video model=qxl` works * `--add-device --sound model=foo --video model=bar` was previously rejected but now works * `--remove-device --video model=vmvga --sound model=sb16` was previously rejected by now works Fixing all this is not trivial. So I think we need to revert and go back to the drawing board. --- man/virt-xml.rst | 4 - .../virt-xml-change-graphics-and-video.xml | 26 ------ .../cli/compare/virt-xml-multiple-edit.xml | 13 --- tests/test_cli.py | 6 +- virtinst/virtxml.py | 87 +++++++------------ 5 files changed, 32 insertions(+), 104 deletions(-) delete mode 100644 tests/data/cli/compare/virt-xml-change-graphics-and-video.xml delete mode 100644 tests/data/cli/compare/virt-xml-multiple-edit.xml diff --git a/man/virt-xml.rst b/man/virt-xml.rst index db0ca5716..ddd586bb8 100644 --- a/man/virt-xml.rst +++ b/man/virt-xml.rst @@ -71,10 +71,6 @@ XML ACTIONS before applying the requested changes. This allows completely rebuilding an XML block. See EXAMPLES for some usage. - It is possible to edit multiple XML blocks but every XML block needs to - be paired with it's own ``--edit``. So for example you can edit graphics - and video using ``--edit --graphics vnc --edit --video virtio``. - EDIT-OPTIONS examples: * ``--edit`` diff --git a/tests/data/cli/compare/virt-xml-change-graphics-and-video.xml b/tests/data/cli/compare/virt-xml-change-graphics-and-video.xml deleted file mode 100644 index 571c3e690..000000000 --- a/tests/data/cli/compare/virt-xml-change-graphics-and-video.xml +++ /dev/null @@ -1,26 +0,0 @@ - /usr/bin/qemu-system-x86_64 - - -- -- -- -- -+ - - - - --