def _unmount_device(self, volume): conn_info = jsonutils.loads(volume.connection_info) devpath = conn_info['data']['device_path'] mountpoint = mount.get_mountpoint(volume.volume_id) mount.do_unmount(devpath, mountpoint)
def _unmount_device(self, volmap): if hasattr(volmap, 'connection_info'): mountpoint = mount.get_mountpoint(volmap.volume.uuid) mount.do_unmount(mountpoint) shutil.rmtree(mountpoint)