libvirt/tools
Peter Krempa 642261a866 virsh-domain: Refactor cmdVcpucount and fix output on inactive domains
This patch factors out the vCPU count retrieval including fallback means
into vshCPUCountCollect() and removes the duplicated code to retrieve
individual counts.

The --current flag (this flag is assumed by default) now works also with
--maximum or --active without the need to explicitly specify the state
of the domain that is requested.

This patch also fixes the output of "virsh vcpucount domain" on inactive
domains:

Before:
$ virsh vcpucount domain
maximum      config         4
error: Requested operation is not valid: domain is not running
current      config         4
error: Requested operation is not valid: domain is not running

After:
$virsh vcpucount domain
maximum      config         4
current      config         4

.. and for transient domains too:

Before:
$ virsh vcpucount transient-domain
error: Requested operation is not valid: cannot change persistent config of a transient domain
maximum      live           3
error: Requested operation is not valid: cannot change persistent config of a transient domain
current      live           1

After:
$ virsh vcpucount transient-domain
maximum      live           3
current      live           1
2013-04-19 14:02:10 +02:00
..
console.c virCondDestroy: Lose attribute RETURN_CHECK 2013-02-08 09:12:11 +01:00
console.h virsh: Fix usage of header termios.h 2012-12-07 14:21:25 +01:00
libvirt_win_icon_16x16.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_32x32.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_48x48.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt_win_icon_64x64.ico Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
libvirt-guests.init.in tools: Only install guests init script if --with-init=script=redhat 2012-12-11 19:54:37 -05:00
libvirt-guests.service.in tools: Only install guests init script if --with-init=script=redhat 2012-12-11 19:54:37 -05:00
libvirt-guests.sh.in libvirt-guests: newline between output sentences 2013-03-25 08:38:35 -06:00
libvirt-guests.sysconf libvirt-guests: Add parallel startup and shutdown of guests 2012-03-05 13:18:24 +01:00
Makefile.am Enable full RELRO mode 2013-04-03 16:19:35 +01:00
virsh_win_icon.rc Move virsh into tools/ directory 2009-09-21 14:41:45 +01:00
virsh-domain-monitor.c virsh-domain-monitor: Refactor cmdDomIfGetLink 2013-04-02 15:53:43 +02:00
virsh-domain-monitor.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-domain.c virsh-domain: Refactor cmdVcpucount and fix output on inactive domains 2013-04-19 14:02:10 +02:00
virsh-domain.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-edit.c Remove spurious whitespace between function name & open brackets 2012-11-02 13:36:49 +00:00
virsh-host.c virsh: Move cmdConnect from virsh-host.c to virsh.c 2013-04-05 10:36:03 +02:00
virsh-host.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-interface.c Cleanup useless flags specifications 2013-03-15 15:05:45 +01:00
virsh-interface.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-network.c Cleanup useless flags specifications 2013-03-15 15:05:45 +01:00
virsh-network.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nodedev.c nodedev: Introduce two new flags for listAll API 2013-03-25 20:46:05 +08:00
virsh-nodedev.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-nwfilter.c virsh-nwfilter.c: Switch to c99 initialization of vshCmdInfo 2013-02-12 17:50:22 +01:00
virsh-nwfilter.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-pool.c Cleanup useless flags specifications 2013-03-15 15:05:45 +01:00
virsh-pool.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-secret.c virsh: don't call virSecretFree on NULL 2013-03-29 13:00:49 +01:00
virsh-secret.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-snapshot.c virsh-snapshot: Simplify cleanup path in cmdSnapshotEdit 2013-03-21 12:32:04 +01:00
virsh-snapshot.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh-volume.c virsh: don't print --(null) in vol-name and vol-pool 2013-03-22 13:05:46 +01:00
virsh-volume.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virsh.c syntax-check: Only allows to include public headers in external tools 2013-04-18 11:31:19 +08:00
virsh.h virsh: Introduce macros to reject mutually exclusive arguments 2013-03-21 12:32:03 +01:00
virsh.pod virsh: Document that using incomplete XML files may have unexpected results 2013-04-11 16:44:38 +02:00
virt-host-validate-common.c Rename util.{c,h} to virutil.{c,h} 2012-12-21 11:19:49 +00:00
virt-host-validate-common.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-lxc.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-lxc.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate-qemu.h maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-host-validate.c maint: fix up copyright notice inconsistencies 2012-09-20 16:30:55 -06:00
virt-pki-validate.in build: use common .in replacement mechanism 2013-01-07 08:56:36 -07:00
virt-sanlock-cleanup.in sanlock: add missing test command in virt-sanlock-cleanup.in 2013-04-09 13:01:33 +08:00
virt-xml-validate.in build: use common .in replacement mechanism 2013-01-07 08:56:36 -07:00