
From: Paulo Vital <pvital@linux.vnet.ibm.com> V2 -> V3: - Update model/vmstorages.py to solve issue when using REST API directly. - Changed return of validation to True/False instead of 1/0. - Update tests to reflect REST API changes. - Update MockModel to be correctly used by tests. V1 -> V2: - Add new supported valid Raw content. - Make list of valid Raw content global. Kimchi allows to attach Raw volumes that are not disk images when editing a VM. With this, it's possible attach a XML or PDF file (that qemu-img and libvirt see as raw volumes) as a disk into the guest. This patch-set introduces a check for all 'raw' volumes to see if them are valid disks or not (by using libmagic), and then, pass this information to the front-end to make a correct list of volumes option when attaching a new one into a VM. Paulo Vital (3): Raw volumes validation: update contrib and README Raw volumes validation: back-end and front-end Raw volumes validation: update tests contrib/DEBIAN/control.in | 3 ++- contrib/kimchi.spec.fedora.in | 1 + contrib/kimchi.spec.suse.in | 1 + docs/API.md | 1 + docs/README.md | 11 +++++------ src/kimchi/control/storagevolumes.py | 3 ++- src/kimchi/mockmodel.py | 10 ++++++++-- src/kimchi/model/storagevolumes.py | 21 ++++++++++++++++++++- src/kimchi/model/vmstorages.py | 4 ++++ tests/test_model_storagevolume.py | 2 +- tests/test_rest.py | 2 ++ ui/js/src/kimchi.guest_storage_add.main.js | 2 +- 12 files changed, 48 insertions(+), 13 deletions(-) -- 2.4.3