.. versionadded:: 2019.2.0

    Returns the glusterfs volume op-version

    name
        Name of the glusterfs volume

    CLI Example:

    .. code-block:: bash

        salt '*' glusterfs.get_op_version <volume>

def get_op_version(name):
    '''
    .. versionadded:: 2019.2.0

    Returns the glusterfs volume op-version

    name
        Name of the glusterfs volume

    CLI Example:

    .. code-block:: bash

        salt '*' glusterfs.get_op_version <volume>
    '''

    cmd = 'volume get {0} cluster.op-version'.format(name)
    root = _gluster_xml(cmd)

    if not _gluster_ok(root):
        return False, root.find('opErrstr').text

    result = {}
    for op_version in _iter(root, 'volGetopts'):
        for item in op_version:
            if item.tag == 'Value':
                result = item.text
            elif item.tag == 'Opt':
                for child in item:
                    if child.tag == 'Value':
                        result = child.text

    return result