def _get_vm_by_id(vmid, allDetails=False):
 for (vm_name, vm_details) in six.iteritems(get_resources_vms(includeConfig=allDetails)):
  if (str(vm_details['vmid']) == str(vmid)):
   return vm_details
 log.info('VM with ID "{0}" could not be found.'.format(vmid))
 return False

def _get_vm_by_id ( vmid , allDetails = False ) : for ( vm_name , vm_details ) in six . iteritems ( get_resources_vms ( includeConfig = allDetails ) ) : if ( str ( vm_details [ 'vmid' ] ) == str ( vmid ) ) : return vm_details log . info ( 'VM with ID "{0}" could not be found.' . format ( vmid ) ) return False
retrieve a vm based on the id .