[Engine-devel] Disk BE very small refactoring

Mike Kolesnik mkolesni at redhat.com
Tue May 28 07:09:12 UTC 2013


----- Original Message -----
> 
> 
> ----- Original Message -----
> > From: "Yair Zaslavsky" <yzaslavs at redhat.com>
> > To: "Vered Volansky" <vered at redhat.com>
> > Cc: engine-devel at ovirt.org
> > Sent: Monday, May 27, 2013 6:22:58 PM
> > Subject: Re: [Engine-devel] Disk BE very small refactoring
> > 
> > Vered,
> > VmDevice has "isPlugged" field,
> > Why not have somehow in your inheritence (either Disk or a subclass) a
> > field
> > : "VmDevice device"
> > and have isPlugged method called "device.isPlugged()" ?
> > 
> > Then you can also add the readOnly property which is not represented at
> > VmDevice.
> > 
> > 
> > Does this sound logical to you?
> 
> Vered, I forgot sharable disk may be associated with two VMs, hence having a
> field of VmDevice may be problematic.

In this case there will be 2 VmDevice entities for the same disk, IIUC.
Why not just rely on the field there? Why does it need to be "flattened" on the Disk BE?

> However, maybe we need some interface (i.e - Device) which BothVmDevice and
> your class (or maybe an object of some class that will be contained in your
> class) will implement?
> 
> > 
> > ----- Original Message -----
> > > From: "Vered Volansky" <vered at redhat.com>
> > > To: engine-devel at ovirt.org
> > > Sent: Monday, May 27, 2013 6:18:58 PM
> > > Subject: [Engine-devel] Disk BE very small refactoring
> > > 
> > > Hi All,
> > > 
> > > Please express your opinion if you have any -
> > > 
> > > Currently Disk BE has a plugged property, which should be a property of
> > > the
> > > relationship between vm(or template) and a disk.
> > > I plan to remove this property from the Disk entity, and add new entity,
> > > called DeviceDisk.
> > > This should inherit from Disk and contain the vm/template guid and the
> > > plugged property at first round.
> > > At second round it'll also contain the readOnly property, for RO disks,
> > > TBD
> > > right after.
> > > 
> > > Appreciate any input,
> > > Vered
> > > _______________________________________________
> > > Engine-devel mailing list
> > > Engine-devel at ovirt.org
> > > http://lists.ovirt.org/mailman/listinfo/engine-devel
> > > 
> > _______________________________________________
> > Engine-devel mailing list
> > Engine-devel at ovirt.org
> > http://lists.ovirt.org/mailman/listinfo/engine-devel
> > 
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
> 



More information about the Engine-devel mailing list