Defined children for get_vm (#15904)
This commit is contained in:
parent
032bd1dacf
commit
1ec9ac4b70
1 changed files with 1 additions and 0 deletions
|
@ -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]
|
||||||
|
|
Loading…
Reference in a new issue