Detach specified device to zpool

    zpool : string
        Name of storage pool

    device : string
        Device to detach

    CLI Example:

    .. code-block:: bash

        salt '*' zpool.detach myzpool /path/to/vdev1

def detach(zpool, device):
    '''
    Detach specified device to zpool

    zpool : string
        Name of storage pool

    device : string
        Device to detach

    CLI Example:

    .. code-block:: bash

        salt '*' zpool.detach myzpool /path/to/vdev1

    '''
    ## Update storage pool
    res = __salt__['cmd.run_all'](
        __utils__['zfs.zpool_command'](
            command='detach',
            target=[zpool, device],
        ),
        python_shell=False,
    )

    ret = __utils__['zfs.parse_command_result'](res, 'detatched')
    if ret['detatched']:
        ## NOTE: lookup zpool status for vdev config
        ret['vdevs'] = _clean_vdev_config(
            __salt__['zpool.status'](zpool=zpool)[zpool]['config'][zpool],
        )

    return ret