import re


def get_data_parity_number(log, oclass):
    """Return EC Object Data and Parity count.
    Args:
        log: Log object for reporting error
        oclass(string): EC Object type.

    return:
        result[list]: Data and Parity numbers from object type
    """
    if 'EC' not in oclass:
        log.error("Provide EC Object type only and not %s", str(oclass))
        return 0

    tmp = re.findall(r'\d+', oclass)
    return {'data': tmp[0], 'parity': tmp[1]}