From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:59490) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvRhe-0007cP-5e for qemu-devel@nongnu.org; Thu, 21 May 2015 10:44:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YvRha-0003Dw-1a for qemu-devel@nongnu.org; Thu, 21 May 2015 10:44:06 -0400 Received: from mx1.redhat.com ([209.132.183.28]:40795) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YvRhZ-0003Dq-QN for qemu-devel@nongnu.org; Thu, 21 May 2015 10:44:01 -0400 Message-ID: <555DEF29.4010003@redhat.com> Date: Thu, 21 May 2015 08:43:53 -0600 From: Eric Blake MIME-Version: 1.0 References: <97201fc4eb0dacc2480382ff75e3170fdc24ce7a.1429257498.git.chen.fan.fnst@cn.fujitsu.com> <555DE326.9010903@parallels.com> In-Reply-To: <555DE326.9010903@parallels.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="TVXB9WgAFxLmT0ioU0v7JVL1iDNNunnsp" Subject: Re: [Qemu-devel] [libvirt] [RFC 1/3] qemu-agent: add guest-network-set-interface command List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Olga Krishtal , Chen Fan , libvir-list@redhat.com Cc: qemu-devel@nongnu.org This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --TVXB9WgAFxLmT0ioU0v7JVL1iDNNunnsp Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 05/21/2015 07:52 AM, Olga Krishtal wrote: > On 17/04/15 11:53, Chen Fan wrote: >> Nowadays, qemu has supported physical NIC hotplug for high network >> throughput. but it's in conflict with live migration feature, to keep >> network connectivity, we could to create bond device interface which >> provides a mechanism for enslaving multiple network interfaces into a >> single "bond" interface. the active-backup mode can be used for an >> automatic switch. so this patch is adding a guest-network-set-interfac= e >> command for creating bond device. so the management can easy to create= >> a bond device dynamically when guest running. >> >> Signed-off-by: Chen Fan >> --- >> @@ -588,6 +626,22 @@ >> 'returns': ['GuestNetworkInterface'] } >> ## >> +# @guest-network-set-interface: >> +# >> +# Set guest network interface >> +# >> +# return: 0: call successful. >> +# >> +# -1: call failed. >> +# >> +# >> +# Since: 2.3 You've missed 2.3; if we still want this, it will need to be updated to 2= =2E4. >> +## >> +{ 'command': 'guest-network-set-interface', >> + 'data' : {'interface': 'GuestNetworkInterface2' }, >> + 'returns': 'int' } > I thought that usage of built-in types as the returning value is > deprecated. > Lets return dictionary in guest-network-set (get)-interface Correct. Returning a non-dictionary now causes the generator to barf if you don't update a whitelist. But you don't even need a return value - QGA is already set up to return {} on success and an error message on failure, if you have nothing further to add. Just omit 'returns' from your 'command' definition. --=20 Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --TVXB9WgAFxLmT0ioU0v7JVL1iDNNunnsp Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQEcBAEBCAAGBQJVXe8pAAoJEKeha0olJ0NqvhcH/3Np8XiqGunQrrmm2eyVrWOs UKqHi+vljP1ydk1shRdKx0f2r+Ii/eHERKrwlJBpeI/g5o9tly4Yrdo94wrRMOwy MqojJR9DOrLPhqalLw1N/NtJ3otncj2SmZUcSTBHDGTuYMZXZXVoRP6F8Mibs9Xf 7nWGOu/xc/mwJ/KTkzvfzvvIx0vqzrYGPFQ/qS6OTWUKvVD6UolOhgtqT75yK4RD TLMhCz6GoLZXRf5FQGcwK1CwFlp72NKz52uN8q3ipsUjaaj2hQmmRmdZsFKPDFQg +NCSeTA86DzYM/JO/VyWArMu1xAQxSR3keLhjjj7C/PtPgPfeZOgv/DgSLCcgNg= =yTr1 -----END PGP SIGNATURE----- --TVXB9WgAFxLmT0ioU0v7JVL1iDNNunnsp--