[PATCH 00/16] virsh: Add support for network disks to --attach-disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This version refactors cmdAttachDisk first so that we can use a much
simpler logic to format the XML.

With the simpler logic and tests the code now doesn't misformat the XML
in certain situations as it was with the previous posting:

virsh attach-disk --print-xml --domain ble --source "asdfsource" --target "tgt"
 >
   <source dev='asdfsource'/>
   <target dev='tgt'/>
 </disk>

I've rather rewrote how we do things than trying to investigate why the
original version [1] failed.

The new version also adds tests so it's simpler to see that things
actually work.

[1] https://www.redhat.com/archives/libvir-list/2020-November/msg01071.html

Peter Krempa (15):
  tests: virsh: Add simple testsuite for using --print-xml of various
    commands
  virsh: cmdAttachDisk: Declare one variable per line
  virsh: cmdAttachDisk: Use automatic memory clearing for 'xml' and
    'dom'
  virsh: cmdAttachDisk: Refactor control flow
  virsh: cmdAttachDisk: Don't assume type='block' if file can't be
    examined
  virsh: cmdAttachDisk: Split out formatting of disk address
  virsh: Extract address formatting from cmdAttachDiskFormatAddress
  virsh: Unify code for <address type='drive'
  virsh: Refactor str2DiskAddress
  virsh: Rename 'struct DiskAddress' and friends
  virsh: virshAddress*: Move out of cmdAttachDisk block
  virsh: cmdAttachDisk: Use enum for disk source type
  virsh: cmdAttachDisk: Use virXMLFormatElement
  tests: virsh-output: Mark as expensive
  tests: virsh-checkpoint/snapshot: Mark as expensive

Ryan Gahagan (1):
  virsh: Added attach-disk support for network disk

 docs/manpages/virsh.rst     |  31 +-
 tests/meson.build           |   1 +
 tests/virsh-checkpoint      |   2 +
 tests/virsh-output          |  29 ++
 tests/virsh-output-commands |  94 +++++
 tests/virsh-output.out      | 496 ++++++++++++++++++++++++
 tests/virsh-snapshot        |   2 +
 tools/virsh-domain.c        | 748 ++++++++++++++++++------------------
 8 files changed, 1017 insertions(+), 386 deletions(-)
 create mode 100755 tests/virsh-output
 create mode 100755 tests/virsh-output-commands
 create mode 100644 tests/virsh-output.out

-- 
2.28.0




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux