def vm_info(vm_=None):
 def _info(vm_):
  dom = _get_domain(vm_)
  raw = dom.info()
  return {'cpu': raw[3], 'cputime': int(raw[4]), 'disks': get_disks(vm_), 'graphics': get_graphics(vm_), 'nics': get_nics(vm_), 'maxMem': int(raw[1]), 'mem': int(raw[2]), 'state': VIRT_STATE_NAME_MAP.get(raw[0], 'unknown')}
 info = {}
 if vm_:
  info[vm_] = _info(vm_)
 else:
  for vm_ in list_domains():
   info[vm_] = _info(vm_)
 return info

def vm_info ( vm_ = None ) : def _info ( vm_ ) : dom = _get_domain ( vm_ ) raw = dom . info ( ) return { 'cpu' : raw [ 3 ] , 'cputime' : int ( raw [ 4 ] ) , 'disks' : get_disks ( vm_ ) , 'graphics' : get_graphics ( vm_ ) , 'nics' : get_nics ( vm_ ) , 'maxMem' : int ( raw [ 1 ] ) , 'mem' : int ( raw [ 2 ] ) , 'state' : VIRT_STATE_NAME_MAP . get ( raw [ 0 ] , 'unknown' ) } info = { } if vm_ : info [ vm_ ] = _info ( vm_ ) else : for vm_ in list_domains ( ) : info [ vm_ ] = _info ( vm_ ) return info
return detailed information about the vms on this hyper in a list of dicts: .