This patch set moves common functions related to guest disk XML to
xmlutils/disk.py. That way model/vmstorages.py and vmtemplate.py can make use
of it and we make sure the logic is the same in both cases.
It is the first step and only changes the way vmtemplate.py generated the guest
CDROM XML. But in the next patches all the guest disk generation on vmtemplate.py
will do the same (I prefered to do in parts to avoid huge patch sets)
Aline Manera (8):
Move _get_storage_xml() to xmlutils/disk.py
Move vmdisks.py functions to xmlutils/disk.py
Remove 'bus' paramater from /vms/<name>/storages documentation
Update get_disk_xml() to get the device same according to bus and
index values
Remove ignore_src parameter from get_disk_xml()
Get disk type according to file path on get_disk_xml()
Check QEMU stream DNS capability while generating guest disk XML
Update vmtemplate.py to use get_disk_xml() while generating CDROM XML
docs/API.md | 1 -
src/kimchi/model/storagevolumes.py | 8 +-
src/kimchi/model/vms.py | 1 -
src/kimchi/model/vmstorages.py | 140 ++++++++-----------------------
src/kimchi/vmdisks.py | 75 -----------------
src/kimchi/vmtemplate.py | 78 +++++-------------
src/kimchi/xmlutils/disk.py | 163 +++++++++++++++++++++++++++++++++++++
tests/test_model.py | 11 ++-
8 files changed, 233 insertions(+), 244 deletions(-)
delete mode 100644 src/kimchi/vmdisks.py
create mode 100644 src/kimchi/xmlutils/disk.py
--
1.9.3