Project

General

Profile

Feature #10864

Feature #10237: Refactor and clean up the automated test suite

Refactor vm_helper XML parsing code

Added by anonym over 3 years ago. Updated almost 3 years ago.

Status:
Confirmed
Priority:
Normal
Assignee:
Category:
Test suite
Target version:
-
Start date:
01/06/2016
Due date:
% Done:

0%

Feature Branch:
wip/refactor_update_with_rexml_document
Type of work:
Code
Blueprint:
Starter:
Affected tool:

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.

Associated revisions

Revision c6c319ca (diff)
Added by anonym over 3 years ago

Add disk device to disk name mapping.

Sorry for the code duplication. Something will be done about it later:

Refs: #10864

History

#1 Updated by anonym over 3 years ago

  • Parent task set to #10237

#2 Updated by anonym almost 3 years ago

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 almost 3 years ago

  • Feature Branch set to wip/refactor_update_with_rexml_document

Apparently there is a WIP which does just this for VMNet. Nice!

Also available in: Atom PDF