On 02/23/2012 07:25 AM, tangchen wrote:
> Hi~
>
> I'm sorry, maybe I didn't quite get your opinion.
>
> "uri" is necessary, and it is specific to a VM object.
>
> About class VM, I think an object of it represents a VM. But perhaps you are 
> running Autotest
> on Host A, and some of your VMs are on Host B, and some are on Host C. So I 
> think taking "uri" as an
> attribute of class VM is just fine. And it may be different in different VM 
> object.
>
> As you see, virsh_xxx() is not a method of VM object. It is a helper function 
> called by VM.get_xxx().
> In VM.get_xxx(), you don't need to pass a "uri" parameter, it automatically 
> uses the self.connect_uri attribute.
> So users just set the VM.connect_uri, and call VM.get_xxx(). No more extra 
> parameter needs to be pass.

Tang explained quite well the idea, thanks!
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest

Reply via email to