[et-mgmt-tools] [patch] virt-image / ImageParser disk signature verification function

Joey Boggs jboggs at redhat.com
Thu Oct 16 13:44:04 UTC 2008


Better integrated into the Disk class and runs when a Disk object is created


Cole Robinson wrote:
> Joey Boggs wrote:
>   
>> Cole Robinson wrote:
>>     
>>> Joey Boggs wrote:
>>>  
>>>       
>>>> This adds a new function to the virtinst.ImageParser.Disk class to
>>>> verify disk signatures and runs by default when using virt-image.
>>>> The next patch will wrap up loose ends in the ImageParser.Disk class
>>>> to weed out unsupported checksum types. For now, if the checksum
>>>> type is not matched it skips the check process.
>>>>
>>>>
>>>>     
>>>>         
>>>  
>>>       
>>>> diff -r db5d9aeca590 virt-image
>>>> --- a/virt-image    Fri Oct 10 10:32:50 2008 -0400
>>>> +++ b/virt-image    Tue Oct 14 22:25:21 2008 -0400
>>>> @@ -197,6 +197,8 @@
>>>>  
>>>>      get_graphics(image.domain, options.vnc, options.vncport,
>>>>                   options.nographics, options.sdl, options.keymap,
>>>> guest)
>>>> +    checksum = virtinst.ImageParser.Disk
>>>> +    checksum.check_disk_signature(image)
>>>>  
>>>>     
>>>>         
>>> I don't really like this interface of having a method
>>> of the Disk class that receives an Image object and
>>> pulls disks from that. Doesn't really fit the whole
>>> class dichotomy.
>>>
>>> The way to do it is to have the Disk method calculate
>>> the checksum for that particular disk. Then you can
>>> add a convenience method to the Image class that will
>>> calculate the checksums for every Disk object associated
>>> with that Image.
>>>
>>>   
>>>       
>> Made all the corrections. I understand calculating for just one disk,
>> which will be more reusable for other code than just this case, but
>> why create separate method to check all the disks as well?
>>
>>     
>
> It's certainly not required, it would just be a convenience
> function. I'm not attached to the idea if you want to skip
> it.
>
> Not sure if you intended to or not, but the patch wasn't
> attached to this email.
>
> Thanks,
> Cole
>   

-------------- next part --------------
A non-text attachment was scrubbed...
Name: virt-imageparser-disk-signature-function-10-16-0941.patch
Type: text/x-patch
Size: 2282 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/et-mgmt-tools/attachments/20081016/e17bfacd/attachment.bin>


More information about the et-mgmt-tools mailing list