[libvirt] [gconfig] gconfig: VIRTIO -> VIRTIO_GPU

Zeeshan Ali (Khattak) zeeshanak at gnome.org
Wed Jul 13 17:16:12 UTC 2016


Hi,

On Wed, Jul 13, 2016 at 4:27 PM, Daniel P. Berrange <berrange at redhat.com> wrote:
> On Wed, Jul 13, 2016 at 04:16:01PM +0100, Zeeshan Ali (Khattak) wrote:
>> Rename GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VIRTIO to
>> GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VIRTIO_GPU to get the naming the same as
>> used by libosinfo. Consistency is good anyway in general but this would
>> also mean that Boxes can start using virgl without any changes.
>> ---
>>  examples/config-demo.py                        | 2 +-
>>  libvirt-gconfig/libvirt-gconfig-domain-video.h | 2 +-
>>  2 files changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/examples/config-demo.py b/examples/config-demo.py
>> index e92aa43..e52996c 100644
>> --- a/examples/config-demo.py
>> +++ b/examples/config-demo.py
>> @@ -62,7 +62,7 @@ graphics.set_gl(True)
>>  domain.add_device(graphics)
>>
>>  video = LibvirtGConfig.DomainVideo.new()
>> -video.set_model(LibvirtGConfig.DomainVideoModel.VIRTIO)
>> +video.set_model(LibvirtGConfig.DomainVideoModel.VIRTIO_GPU)
>>  video.set_accel3d(True)
>>  domain.add_device(video)
>>
>> diff --git a/libvirt-gconfig/libvirt-gconfig-domain-video.h b/libvirt-gconfig/libvirt-gconfig-domain-video.h
>> index 9fb8e4d..dda3088 100644
>> --- a/libvirt-gconfig/libvirt-gconfig-domain-video.h
>> +++ b/libvirt-gconfig/libvirt-gconfig-domain-video.h
>> @@ -63,7 +63,7 @@ typedef enum {
>>      GVIR_CONFIG_DOMAIN_VIDEO_MODEL_XEN,
>>      GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VBOX,
>>      GVIR_CONFIG_DOMAIN_VIDEO_MODEL_QXL,
>> -    GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VIRTIO
>> +    GVIR_CONFIG_DOMAIN_VIDEO_MODEL_VIRTIO_GPU
>>  } GVirConfigDomainVideoModel;
>
> Err, no you can't do this. The constants exposed in libvirt-gconfig
> must match the names expected by libvirt itself in the XML parser.
> Libvirt uses 'virtio' so libvirt-gconfig must do the same, unless
> you want to do name re-mapping in libvirt-gconfig, which I really
> would not want to see, because itmeans libvirt-gconfig diverges from
> libvirt.

Ah, didn't think of that. :)


-- 
Regards,

Zeeshan Ali (Khattak)




More information about the libvir-list mailing list