How to call method on suds in python?
Particularly, I'm working with python and vmware vsphere to make virtual machine creation/power on and stuff like that automated. I know how to print attributes of virtual machines, however, I still can't call any methods because I don't know how.

this is code snippet I'm having trouble with:

    for vm in virtual_machines:
	print "VM: "+vm['name']+"  ("+vm['runtime.powerState']+") ",
	if hasattr(vm['guest'],'ipAddress'):
		print vm['guest'].ipAddress,
	if vm['runtime.powerState'] == 'poweredOn':
		print 'RAM: '+str(vm['summary.quickStats'].distributedMemoryEntitlement)+'MB, CPU: '+str(vm['summary.quickStats'].distributedCpuEntitlement)+'MHz',
	if vm['name'] == 'VIRT_VZ_114':
		# This is the trouble maker, it says types mismatch "suds.TypeNotFound: Type not found: 'guest'"
		client.service.PowerOnVM_Task(mo_VirtualMachine,vm)
	print

How do I call methods correctly?
How to call method on suds in python?
===

Particularly, I'm working with python and vmware vsphere to make virtual machine creation/power on and stuff like that automated. I know how to print attributes of virtual machines, however, I still can't call any methods because I don't know how.

this is code snippet I'm having trouble with:

    for vm in virtual_machines:
	print "VM: "+vm['name']+"  ("+vm['runtime.powerState']+") ",
	if hasattr(vm['guest'],'ipAddress'):
		print vm['guest'].ipAddress,
	if vm['runtime.powerState'] == 'poweredOn':
		print 'RAM: '+str(vm['summary.quickStats'].distributedMemoryEntitlement)+'MB, CPU: '+str(vm['summary.quickStats'].distributedCpuEntitlement)+'MHz',
	if vm['name'] == 'VIRT_VZ_114':
		# This is the trouble maker, it says types mismatch "suds.TypeNotFound: Type not found: 'guest'"
		client.service.PowerOnVM_Task(mo_VirtualMachine,vm)
	print

How do I call methods correctly?