Thanks for pointing out the mistake.I will move the check in
qemuConnectGetAllDomainStats, this won't make a old client
cannot use the future server and will give a good error when
use future client to connect to old server.
Thanks,
Luyao Huang
----- Original Message -----
From: "Eric Blake" <eblake(a)redhat.com>
To: "Luyao Huang" <lhuang(a)redhat.com>, libvir-list(a)redhat.com
Sent: Tuesday, November 4, 2014 7:19:41 PM
Subject: Re: [libvirt] [PATCH] domain: Improve error output for virDomainListGetStats
On 11/04/2014 07:51 AM, Luyao Huang wrote:
When pass flags --domain and --list-* to cmdDomstats,
a unsupport error will output from qemuConnectGetAllDomainStats.
error: unsupported flags (0x1) in function qemuConnectGetAllDomainStats
>From manual of virsh: The approaches can't be combined.
NACK. While they cannot be combined in the current implementation, I
see nothing that would prohibit a future implementation from allowing
the combination (for example, show me all stats for a given domain, but
only if the domain is running). Prohibiting in libvirt-domian.c would
prevent an older RPC client from talking to a newer server that supports
the combination. We should only prohibit combinations in libvirt-*.c if
there is no chance we will ever extend things to allow the combination.
--
Eric Blake eblake redhat com +1-919-301-3266
Libvirt virtualization library
http://libvirt.org