[RFC] Problems with iso names while create new template

Hi, There is a problem while creating a new template with local isos. If some iso is stored inside an active storagepool, then kimchi is going to show it for selection. Kimchi looks for any file, with any name, but of type "iso" - IsoVolumesModel:get_list() in src/kimchi/model/storagevolumes.py. So, isos rename like ubuntu.iso.1 or even teste.exe will be shown to user. Error happens if user selects one of them, because the JSON schema restricts file names to ends with ".iso". According to my tests, Libvirt accepts any name, since the file is ISO type. So, I would like to propose to remove the ".iso" checking in the JSON schema. This is not going to break anything in UI. Problems would happen if user tries to create a template using the API directly and gives a file that is not an ISO. In this case, a error will be returned by libvirt and triggered to user. Patch is quite simple. Any objection ? Rodrigo Trujillo

Well, I am sending the patch. On 05/22/2014 05:08 PM, Rodrigo Trujillo wrote:
Hi,
There is a problem while creating a new template with local isos. If some iso is stored inside an active storagepool, then kimchi is going to show it for selection.
Kimchi looks for any file, with any name, but of type "iso" - IsoVolumesModel:get_list() in src/kimchi/model/storagevolumes.py.
So, isos rename like ubuntu.iso.1 or even teste.exe will be shown to user. Error happens if user selects one of them, because the JSON schema restricts file names to ends with ".iso".
According to my tests, Libvirt accepts any name, since the file is ISO type. So, I would like to propose to remove the ".iso" checking in the JSON schema.
This is not going to break anything in UI. Problems would happen if user tries to create a template using the API directly and gives a file that is not an ISO. In this case, a error will be returned by libvirt and triggered to user.
Patch is quite simple. Any objection ?
Rodrigo Trujillo
_______________________________________________ Kimchi-devel mailing list Kimchi-devel@ovirt.org http://lists.ovirt.org/mailman/listinfo/kimchi-devel
participants (1)
-
Rodrigo Trujillo