[Engine-devel] Device custom properties
Martin Perina
mperina at redhat.com
Sat May 4 05:13:44 UTC 2013
----- Original Message -----
> From: "Martin Perina" <mperina at redhat.com>
> To: engine-devel at ovirt.org
> Sent: Friday, May 3, 2013 11:06:05 AM
> Subject: [Engine-devel] Device custom properties
>
> Hi,
>
> I'm currently trying to implement device custom properties infrastructure in
> ovirt-engine.
> During discussion with Yair, we found out, that it's not clear, for what type
> of devices
> custom properties should be available? In engine we have the VmDeviceType
> enum which
> contains following values:
>
> FLOPPY("floppy", "14"),
> DISK("disk", "17"),
> CDROM("cdrom", "15"),
> INTERFACE("interface", "10"),
> BRIDGE("bridge", "3"),
> VIDEO("video", "20"),
> USB("usb", "23"),
> CONTROLLER("controller", "23"),
> REDIR("redir", "23"),
> SPICEVMC("spicevmc", "23"),
> QXL("qxl"),
> CIRRUS("cirrus"),
> SOUND("sound"),
> ICH6("ich6"),
> AC97("ac97"),
> MEMBALLOON("memballoon"),
> SMARTCARD("smartcard"),
> BALLOON("balloon"),
> OTHER("other", "0"),
> UNKNOWN("unknown", "-1");
>
> But VmDevice class has two String attributes device and type. So for example
> a disk is a device
> which has device set to disk and type set to disk (according to
> VmDeviceCommonUtils.isDisk method).
>
> So my question is, if I have a custom properties for disk, will they be
> available for all disk
> devices (disk, cdrom, floppy, ...) or only for real disk? So should we
> support custom properties
> for all VmDeviceType enum value separately?
>
> Thanks for suggestions
>
> Martin
I've looked at VDSM code, here are device type even more detailed (please correct me if I'm wrong):
DEVICE TYPE
'disk' 'disk', 'cdrom', 'floppy'
'interface' 'bridge'
'video' 'cirrus', 'std', 'vmware', 'qxl', 'none'
'sound' 'ac97', 'pcspk', 'sb16', 'es1370', 'hda', 'ich6'
'controller' 'ide', 'fdc', 'scsi', 'sata', 'usb', 'ccid', 'virtio-serial'
'balloon' 'memballoon'
'channel' 'unix', 'spicevmc', 'virtio-serial'
'console' 'console'
'smartcard' 'smartcard'
'watchdog' 'watchdog'
So I suggest to refactor engine device type to match VDSM side and engine will support device
custom properties to be set for these devices types:
'disk', 'interface', 'video', 'sound', 'controller', 'balloon', 'channel', 'console', 'smartcard', 'watchdog'
Is it ok?
Martin
More information about the Devel
mailing list