-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Il 23/04/2013 18:49, Eric Blake ha scritto: > Based on today's phone call, it sounds like this would mean adding > optional parameters to the QMP command. We already did that for > drive-mirror (1.4 has more parameters than 1.3), but without a way > to introspect when those parameters are available, the new > parameters aren't quite as useful. So we don't repeat that > mistake, we need to decide whether this should still go into 1.5 > with a plan of adding parameters for 1.6, or whether we should add > a counterpart query-* command that makes it easy to determine how > much of block-backup is supported, or [your suggestion here]....
... libvirt can omit the optional parameters if they match the default and just try executing the command. If it gets an error, it just reports it. That is, instead of dictionary = json_object_new() if (has_capability) add argument to JSON dictionary else if (argument != default) return error send JSON dictionary via QMP do this dictionary = json_object_new() if (argument != default) add argument to JSON dictionary send JSON dictionary via QMP Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJRdr2AAAoJEBvWZb6bTYbydkAP/0EegweCJX37/XIJ9vtYy4c1 RdS1Jkg/t+KNfsmUp/Qs0JpYbbxhLbbsM9pboKc1LU2Mv5HZd2koibIYNOwTTN3q y2A/4Ecr8A+Q9pv8mblTb8HFea3FDNwtBugTQG7LM/CywYdAk6tg4qZ/0NEXVAPA XEmR0RXRP0ln52f/fByFuq2czg4VvXqygKeBtRJ20ROeUCNpNxYDjiBX03I/4OE8 B1iTkMy7fJwKoc34tOPZ04IzNIRI/Zxtl2my5j3wx7iheYUXNAYPrKpSKXwqYj3g x+jRe7A/QxUZpBTmIynBmDvOxut8ZaLqeWAHYWlcNZameWGSZJgsav5hMjaOVlS3 Kk0Tkm4rrgSYuzC+vhttvGaj9iacnRaG6IMmwyfq1TFcETXLH6ILt8sCxoO5dpHp XetKnEF4m1zmQDXceMbFLRZ3eOKMjwObf6QQIjLkrs/0Xc+T+GfsqUdN6ylY17Rk s6Jsx5ICbS4IUJlktkVv/U9n4VD7y9IBwRlglKgj86noHPFFkb/Z+C0cW8Zkwej/ ZsrjXTNB1abI6/X11PvoaqEnFauaradbtMfRbEmDMhBi+CoBZ9ps578OSn9+x1rn j+WYup9Z5qnDO+BvG+tDElaY6qQUR4ZaGOKo05ODjXkPd83Jn/pOjD2ioaa1dybY KP+0EDFS6SwiSX5jsoei =C9uD -----END PGP SIGNATURE-----