def export(*pools, **kwargs):
    ret = {}
    pool_present = []
    if not pools:
        ret['error'] = 'atleast one storage pool must be specified'
        return ret

    for pool in pools:
        if not exists(pool):
            ret[pool] = 'storage pool does not exist'
        else:
            pool_present.append(pool)

    zpool = _check_zpool()
    force = kwargs.get('force', False)
    for pool in pool_present:
        if force is True:
            cmd = '{0} export -f {1}'.format(zpool, pool)
        else:
            cmd = '{0} export {1}'.format(zpool, pool)
        res = __salt__['cmd.run_all'](cmd, ignore_retcode=True)
        if res['retcode'] != 0:
            ret[pool] = res['stderr'] if 'stderr' in res else res['stdout']
        else:
            ret[pool] = 'exported'

    return ret
Parse source into a Python AST, taking care of encoding.
dataset/ETHPy150Open saltstack/salt/salt/modules/zpool.py/export--crossover with--dataset/ETHPy150Open alecthomas/importmagic/importmagic/util.py/parse_ast