def _get_vm_mdo(vm_ref):
 if (_db_content.get('VirtualMachine', None) is None):
  raise exception.NotFound('There is no VM registered')
 if (vm_ref not in _db_content.get('VirtualMachine')):
  raise exception.NotFound(('Virtual Machine with ref %s is not there' % vm_ref))
 return _db_content.get('VirtualMachine')[vm_ref]

def _get_vm_mdo ( vm_ref ) : if ( _db_content . get ( 'VirtualMachine' , None ) is None ) : raise exception . NotFound ( 'There is no VM registered' ) if ( vm_ref not in _db_content . get ( 'VirtualMachine' ) ) : raise exception . NotFound ( ( 'Virtual Machine with ref %s is not there' % vm_ref ) ) return _db_content . get ( 'VirtualMachine' ) [ vm_ref ]
gets the virtual machine with the ref from the db .