Add brick(s) to an existing volume

    name
        Volume name

    bricks
        List of bricks to add to the volume

    CLI Example:

    .. code-block:: bash

        salt '*' glusterfs.add_volume_bricks <volume> <bricks>

def add_volume_bricks(name, bricks):
    '''
    Add brick(s) to an existing volume

    name
        Volume name

    bricks
        List of bricks to add to the volume

    CLI Example:

    .. code-block:: bash

        salt '*' glusterfs.add_volume_bricks <volume> <bricks>
    '''

    volinfo = info()
    if name not in volinfo:
        log.error('Volume %s does not exist, cannot add bricks', name)
        return False

    new_bricks = []

    cmd = 'volume add-brick {0}'.format(name)

    if isinstance(bricks, six.string_types):
        bricks = [bricks]

    volume_bricks = [x['path'] for x in volinfo[name]['bricks'].values()]

    for brick in bricks:
        if brick in volume_bricks:
            log.debug(
                'Brick %s already in volume %s...excluding from command',
                brick,
                name)
        else:
            new_bricks.append(brick)

    if new_bricks:
        for brick in new_bricks:
            cmd += ' {0}'.format(brick)
        return _gluster(cmd)
    return True