[libvirt] [PATCH 4/9] Public API Implementation

Jim Fehlig jfehlig at novell.com
Mon Jan 25 23:22:12 UTC 2010


Daniel P. Berrange wrote:
>>>> This looks safe, but there's a subtle problem with changing the existing
>>>> virDomainAttachDevice() entry point to call virDomainAttachDeviceFlags().
>>>> It will break compatability with old libvirtd, even though the old
>>>> libvirtd supports the virDomainAttachDevice() code.
>>>>         
>> Ah, yes - good catch.  Thanks.
>>
>>     
>>>>  So we need to keep
>>>> the distinct paths in the public API & driver definitions. The eventual
>>>> low level hypervisor drivers can of course just turn their existing
>>>> impl into a thin wrapper to the new method..
>>>>     
>>>>         
>>> There's one other option actually - we could put compatability code in
>>> the remote driver client instead. Either, make it always invoke the old
>>> RPC call if flags == VIR_DOMAIN_DEVICE_MODIFY_LIVE, or have it invoke
>>> the new RPC call & fallback to the old RPC call if it gets an error
>>> indicating the new one doesn't exist.
>>>   
>>>       
>> Do you prefer the latter option?  After a quick look, I didn't spot any
>> existing compatibility code in the remote driver client.  The first
>> option might be slightly better wrt maintenance.
>>     
>
> Yes, the first option is certainly simpler / clearer code todo, so lets
> just do that first. We can easily revisit adding compat code in the
> remote driver client at a later date if we find it to be neccessary.
>   

Revised patch below.

Thanks,
Jim

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 04.patch
Type: text/x-patch
Size: 5288 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20100125/ea196177/attachment-0001.bin>


More information about the libvir-list mailing list