def _qemu_image_info(path):
    '''
    Detect information for the image at path
    '''
    ret = {}
    out = __salt__['cmd.run']('qemu-img info {0}'.format(path))

    match_map = {'size': r'virtual size: \w+ \((\d+) byte[s]?\)',
                 'format': r'file format: (\w+)'}

    for info, search in six.iteritems(match_map):
        try:
            ret[info] = re.search(search, out).group(1)
        except __HOLE__:
            continue
    return ret


# TODO: this function is deprecated, should be replaced with
# _qemu_image_info()
dataset/ETHPy150Open saltstack/salt/salt/modules/virt.py/_qemu_image_info