def _gluster_xml(cmd):
    # We will pass the command string as stdin to allow for much longer
    # command strings. This is especially useful for creating large volumes
    # where the list of bricks exceeds 128 characters.
    if _get_minor_version() < 6:
        result = __salt__['cmd.run'](
            'script -q -c "gluster --xml --mode=script"', stdin="{0}\n\004".format(cmd)
        )
    else:
        result = __salt__['cmd.run'](
            'gluster --xml --mode=script', stdin="{0}\n".format(cmd)
        )
    root = ET.fromstring(_gluster_output_cleanup(result))
    if _gluster_ok(root):
        output = root.find('output')
        if output:
            log.info('Gluster call "{0}" succeeded: {1}'.format(cmd, root.find('output').text))
        else:
            log.info('Gluster call "{0}" succeeded'.format(cmd))
    else:
        log.error('Failed gluster call: {0}: {1}'.format(cmd, root.find('opErrstr').text))
    return root
Force op failure in order to test idempotency.
dataset/ETHPy150Open saltstack/salt/salt/modules/glusterfs.py/_gluster_xml--crossover with--dataset/ETHPy150Open viewfinderco/viewfinder/backend/www/test/update_episode_test.py/UpdateEpisodeTestCase.testIdempotency