Move _get_storage_xml() to xmlutils/disk.py

It is the first step to have xmlutils/disk.py holding all the disk XML
manipulation.
So we can reuse the same function on vmtemplate.py to build the guest XML.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Move vmdisks.py functions to xmlutils/disk.py

vmdisks.py also had some functions to manipulate the guest disk XML.
So move them to xmlutils/disk.py
Also update the references to it on Kimchi code.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Remove 'bus' paramater from /vms/<name>/storages documentation

While attaching a new disk to a guest, Kimchi will automatically
identify the best bus for it.
So update the documentation to reflect it.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Update get_disk_xml() to get the device same according to bus and index values

When generating the disk XML, the most common information to generate the
device name are: 1) the bus - to identify the right prefix, and 2) the disk
index.
Add this logic to get_disk_xml() so when no 'dev' name is specified the
device name will be automatically generated according to bus and index
value.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Remove ignore_src parameter from get_disk_xml()

The ignore_src parameter can be automatically identified by the disk path
value, ie, when it is an empty string the source can be ignored.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Get disk type according to file path on get_disk_xml()

The disk type can be also be identified by the file path.
So move it to the common place to handle guest disk XML manipulation.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Check QEMU stream DNS capability when attaching new disk to guest

When QEMU is not able to solve hostname for a remote CDROM path, we need
to convert the hostname to IP to avoid problems.
To make xmlutils/ independent of model instances, that verification must
be done prior to the XML generation.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>
Update vmtemplate.py to use get_disk_xml() while generating CDROM XML

It is the first step to have vmtemplate.py using the same functions used
by model/vmstorages.py
The disk generation will also use get_disk_xml() but it will be done in
a separated patch.

Signed-off-by: Aline Manera <alinefm@linux.vnet.ibm.com>