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

Eric Blake eblake at redhat.com
Thu May 21 14:43:53 UTC 2015


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 <chen.fan.fnst at cn.fujitsu.com>
>> ---

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 604 bytes
Desc: OpenPGP digital signature
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20150521/6b20103b/attachment-0001.sig>


More information about the libvir-list mailing list