On 05/25/2012 06:26 AM, Alex Jia wrote:
> IMHO, we should reuse virsh_dumpxml() then give a optional 'to_file'
> parameter rather than defining many similar function, for example,
>
> def virsh_dumpxml(name, to_file="", uri="")
> if to_file:
> cmd = "dumpxml %s> %s" % (name, to_file)
> else:
> cmd = "dumpxml %s" % name
>
> return virsh_cmd(cmd, uri)

I like this idea.

>
> And then I saw each virsh cmd need to deal with exception case,
> we should do it in virsh_cmd() to simplify codes.

I don't quite understand your meaning here, could you explain further?

-- 
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + `@' + redhat.com o: 1-888-RED-HAT1 x44214
_______________________________________________
Autotest mailing list
Autotest@test.kernel.org
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to