def umount_all(root_path):
    def is_under_root(path):
        try:
            FilePath(path).segmentsFrom(root_path)
        except ValueError:
            return False
        return True

    partitions_under_root = list(p for p in psutil.disk_partitions()
                                 if is_under_root(p.mountpoint))
    for partition in partitions_under_root:
        umount(FilePath(partition.mountpoint))
Unmount all devices with mount points contained in ``root_path``.
dataset/ETHPy150Open ClusterHQ/flocker/flocker/node/agents/testtools/_blockdevice.py/umount_all