[virt-tools-list] [PATCH virt-manager 2/2] virt-manager: use libosinfo media detection

Giuseppe Scrivano gscrivan at redhat.com
Wed Mar 26 11:06:35 UTC 2014


Cole Robinson <crobinso at redhat.com> writes:

>> -    def actually_detect(self, media):
>> +    def actually_detect(self, media, only_local):
>> +        # First try with libosinfo detection
>> +        try:
>> +            os = virtinst.osdict.lookup_os_by_media(media)
>> +            if os:
>> +                self.detectedDistro = os
>> +                return
>> +        except:
>> +            pass
>> +
>> +        if only_local:
>> +            self.detectedDistro = DETECT_FAILED
>> +            return
>> +
>>          try:
>>              installer = virtinst.DistroInstaller(self.conn.get_backend())
>>              installer.location = media
>> 
>
> I think we should try and move this into DistroInstaller, since we will want
> to do basically the same thing from virt-install eventually.

I've splitted it into two patches and going to submit v2 soon.

Thanks,
Giuseppe




More information about the virt-tools-list mailing list