]> git.ipfire.org Git - thirdparty/libvirt.git/commit
virsh: Extract common code from cmdCPU{Compare,Baseline}
authorJiri Denemark <jdenemar@redhat.com>
Mon, 30 Apr 2018 12:47:54 +0000 (14:47 +0200)
committerJiri Denemark <jdenemar@redhat.com>
Mon, 28 May 2018 13:54:10 +0000 (15:54 +0200)
commitc84726fbddef079a22b073f3fdefbf970cf43254
tree8be03577c3249695f98c2919ed723f7696fc5204
parent361989bd1897543f684b84d37e7d0affedfb4371
virsh: Extract common code from cmdCPU{Compare,Baseline}

Both cpu-compare and cpu-baseline commands accept more that just CPU
definition XML(s). For users' convenience they are able to extract the
CPU definition(s) even from domain XML or capabilities XML. The main
differences between the two commands is in the number of CPU definitions
they expect: cpu-compare wants only one CPU definition while
cpu-baseline expects one or more CPUs.

The extracted code forms a new vshExtractCPUDefXML function.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-host.c