Feature #10864
Refactor vm_helper XML parsing code
Start date:
2016-01-06
Due date:
% Done:
0%
Description
There’s a lot of code duplication, and awkwardness going on there. Some helper(s) in the spirit of iptables_chains_parse()
from features/step_definitions/tor.rb
would be nice.
Subtasks
History
#1 Updated by anonym 2016-01-06 18:05:01
- Parent task set to Feature #10237
#2 Updated by anonym 2016-10-27 14:03:58
what about something like:
update_domain_xml do |doman_xml|
domain_xml.do_something_to_it
end
and when the block finishes it tells libvirt to update the domain with the resulting XML. We could have a domain_xml
method would just returns the REXML object — I don’t really see the point of a context manager with a block.
Also, in general I think we should switch to using Xpath instead of .elements[...].each
-loops.
#3 Updated by anonym 2016-10-27 14:05:53
- Feature Branch set to wip/refactor_update_with_rexml_document
Apparently there is a WIP which does just this for VMNet. Nice!