Defined children for get_vm (#15904)

This commit is contained in:
Edward Marshall 2016-09-08 16:41:32 +01:00 committed by Matt Davis
parent 032bd1dacf
commit 1ec9ac4b70

View file

@ -103,6 +103,7 @@ class VcaAnsibleModule(AnsibleModule):
def get_vm(self, vapp_name, vm_name): def get_vm(self, vapp_name, vm_name):
vapp = self.get_vapp(vapp_name) vapp = self.get_vapp(vapp_name)
children = vapp.me.get_Children()
vms = [vm for vm in children.get_Vm() if vm.name == vm_name] vms = [vm for vm in children.get_Vm() if vm.name == vm_name]
try: try:
return vms[0] return vms[0]