On 07/30/2012 11:41 PM, Alex Jia wrote:
On 07/31/2012 12:11 AM, Chris Evich wrote:
This is the simpelest of the two options I can think of for moving all
the
libvirt_vm.virsh_*() functions into their own module. This is required
in order to prevent circular dependencies when the planned libvirt_xml
module is implimented later. It's also the least likely to cause
major headaches with third-party tests/code.
The alternative, IMHO is more user-friendly and has a better 'feel'. It
involves removing all the 'virsh_' prefixes from the names. i.e. it
allows callers to use virsh.cmd() instead of virsh.virsh_cmd() or resort
to the less-preferred 'from autotest.client.virt.virsh import *'.
Please give feedback if you like what this patch does, or if you feel
the more
user-friendly alternative is better (or if you have another idea).
Nice job, I like it. The only question is whether we want to organize
all of virsh_*() functions
via a VIRSH class, you know each virsh_*() includes a 'uri' parameter,
maybe, we may instantiate
it in the VIRSH class.
I hope you don't like it! It's horrible, putrid and ugly! This RFC patch
is to show what it looks like (puke!) if the goal is to not break
existing code :D
If others agree (and I like your idea too) let's break existing code,
implement a class and clean up the namespace in one-fell-swoop. A class
would be especially handy if/when one needs to run a bunch of virsh
commands one after the other.
However, I do want to be at least a little sensitive, in case anyone has
a large collection of private tests that would break. If so, please
speak up!
--
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214
_______________________________________________
Autotest-kernel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/autotest-kernel