logicminds/virt — comment on commit fc50f1880cb50574f59889553a652bc11c3c48c9
File:  line 0
By logicminds:

the to_utf8 function is recommended by libvirt but its not required. Its safer to output to utf8 then not according to libvirt team.

The conversion functions (to_gb, to_mb) are used to output to a human readable format. If there is a ruby core library that handles this maybe we could use that instead. However, I am not sure if it takes longer to load the specific library versus loading two homemade functions.

The modifications done to the document function are required in order to cycle through multiple volumes and interfaces within the same xml code.
At first I pass the entire xml code and then just pass a portion of it through a loop to find all the volumes.