def _get_metrics_record(xapi, rectype, record):
    '''
    Internal, returns metrics record for a rectype
    '''
    metrics_id = record['metrics']
    return getattr(xapi, '{0}_metrics'.format(rectype)).get_record(metrics_id)