Re: [PATCH] virsh: add check for exclusive options for domstats command

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

 



On Tue, Mar 31, 2015 at 15:34:10 +0200, Pavel Hrdina wrote:
> Option --domain cannot be combined with options --list-*.
> 
> Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1143837
> 
> Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
> ---
>  tools/virsh-domain-monitor.c | 9 +++++++++
>  1 file changed, 9 insertions(+)
> 
> diff --git a/tools/virsh-domain-monitor.c b/tools/virsh-domain-monitor.c
> index 6951db2..e683a6d 100644
> --- a/tools/virsh-domain-monitor.c
> +++ b/tools/virsh-domain-monitor.c
> @@ -2110,6 +2110,15 @@ cmdDomstats(vshControl *ctl, const vshCmd *cmd)
>      const vshCmdOpt *opt = NULL;
>      bool ret = false;
>  
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-active");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-inactive");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-persistent");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-transient");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-running");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-paused");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-shutoff");
> +    VSH_EXCLUSIVE_OPTIONS("domain", "list-other");
> +
>      if (vshCommandOptBool(cmd, "state"))
>          stats |= VIR_DOMAIN_STATS_STATE;

NACK, it was a deliberate design decision to allow users provide filters
along with domain lists with the intention that we might want to filter
the list provided by users.

It was never implemented though.

Peter

Attachment: signature.asc
Description: Digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[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]