qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [libvirt] [RFC 1/3] qemu-agent: add guest-network-set-i


From: Eric Blake
Subject: Re: [Qemu-devel] [libvirt] [RFC 1/3] qemu-agent: add guest-network-set-interface command
Date: Thu, 21 May 2015 08:43:53 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0

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-interface
>> command for creating bond device. so the management can easy to create
>> a bond device dynamically when guest running.
>>
>> Signed-off-by: Chen Fan <address@hidden>
>> ---

>> @@ -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.4.

>> +##
>> +{ '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.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]