def add(zpool, *vdevs, **kwargs):
    ret = {}
    dlist = []

    # check for pool
    if not exists(zpool):
        ret[zpool] = 'storage pool does not exist'
        return ret

    if not vdevs:
        ret[zpool] = 'no devices specified'
        return ret

    force = kwargs.get('force', False)

    # make sure files are present on filesystem
    ret[zpool] = {}
    for vdev in vdevs:
        if vdev not in ['mirror', 'log', 'cache', 'raidz1', 'raidz2', 'raidz3', 'spare']:
            if not os.path.exists(vdev):
                ret[zpool][vdev] = 'not present on filesystem'
                continue
            mode = os.stat(vdev).st_mode
            if not stat.S_ISBLK(mode) and not stat.S_ISREG(mode):
                ret[zpool][vdev] = 'not a block device, a file vdev or character special device'
                continue
        dlist.append(vdev)

    if len(ret[zpool]) > 0:
        return ret

    devs = ' '.join(dlist)

    # try and add watch out for mismatched replication levels
    zpool_cmd = _check_zpool()
    cmd = '{zpool_cmd} add {force}{zpool} {devs}'.format(
        zpool_cmd=zpool_cmd,
        force='-f ' if force else '',
        zpool=zpool,
        devs=devs
    )
    res = __salt__['cmd.run_all'](cmd, python_shell=False)
    if res['retcode'] != 0:
        ret[zpool] = res['stderr'] if 'stderr' in res else res['stdout']
    else:
        ret[zpool] = {}
        for device in dlist:
            if device not in ['mirror', 'log', 'cache', 'raidz1', 'raidz2', 'raidz3', 'spare']:
                ret[zpool][device] = 'added'

    return ret
Error 401 -- authentication required.
dataset/ETHPy150Open saltstack/salt/salt/modules/zpool.py/add--crossover with--dataset/ETHPy150Open ofermend/medicare-demo/socialite/jython/Lib/urllib.py/FancyURLopener.http_error_401