[Engine-devel] Getting the storage domain of a LunDisk

Greg Padgett gpadgett at redhat.com
Tue Aug 7 14:41:27 UTC 2012


On 08/07/2012 10:06 AM, Hopper, Ricky wrote:
> Hi all,
>
> Does anyone know the best way to get the storage domain of a LunDisk object?
> I don't know if there's some query or anything I'm failing to find, but I
> can't find anything within the class itself that's definitive.
>
> Thanks,
>
> - Ricky
>
>
> _______________________________________________
> Engine-devel mailing list
> Engine-devel at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/engine-devel
>

Hi Ricky,

As far as I can see, the DiskImage class can give this--but AFAIK there is 
no way to convert a LunDisk to a DiskImage.

I am curious if the storage domain info should be moved into the Disk class, 
which is a superclass of both LunDisk and DiskImage, or if perhaps there is 
a better place for it?  Here's a partial class hierarchy that I mapped out 
when looking into this for a bug I'm working on:

BaseDisk
'- Disk
    |- LunDisk
    '- DiskImageBase
       '- DiskImage

Thanks,
Greg



More information about the Engine-devel mailing list