]> xenbits.xensource.com Git - libvirt.git/commit
virsh: Require --xpath for *dumpxml
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 8 Jul 2022 10:45:42 +0000 (12:45 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 25 Jul 2022 07:50:21 +0000 (09:50 +0200)
commite90d48ae6e22eaf1650f920abc0a6b87d2daa82b
tree95e6c689f720e65b9fc3f5e011f3164561933836
parent8874d585d21333f62dc4801c1d4f6e5ead591ff8
virsh: Require --xpath for *dumpxml

Historically, the dumpxml command reject any unknown arguments,
for instance:

    virsh dumpxml fedora xxx

However, after v8.5.0-rc1~31 the second argument ('xxx') is
treated as an XPath, but it's not that clearly visible.
Therefore, require the --xpath switch, like this:

    virsh dumpxml fedora --xpath xxx

Yes, this breaks already released virsh, but I think we can argue
that the pool of users of this particular function is very small.
We also document the argument being mandatory:

   dumpxml [--inactive] [--security-info] [--update-cpu] [--migratable]
           [--xpath EXPRESSION] [--wrap] domain

The sooner we do this change, the better.

The same applies for other *dumpxml functions (net-dumpxml,
pool-dumpxml, vol-dumpxl to name a few).

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2103524
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
tools/virsh-backup.c
tools/virsh-checkpoint.c
tools/virsh-domain.c
tools/virsh-interface.c
tools/virsh-network.c
tools/virsh-nodedev.c
tools/virsh-nwfilter.c
tools/virsh-pool.c
tools/virsh-secret.c
tools/virsh-snapshot.c
tools/virsh-volume.c