예제 #1
0
파일: driver.py 프로젝트: wkite/zun
 def attach(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     fileutils.ensure_tree(mountpoint)
     filename = '/'.join([mountpoint, volmap.volume.uuid])
     with open(filename, 'wb') as fd:
         content = utils.decode_file_data(volmap.contents)
         fd.write(content)
예제 #2
0
파일: driver.py 프로젝트: openstack/higgins
 def attach(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     fileutils.ensure_tree(mountpoint)
     filename = '/'.join([mountpoint, volmap.volume.uuid])
     with open(filename, 'wb') as fd:
         content = utils.decode_file_data(volmap.contents)
         fd.write(content)
예제 #3
0
파일: driver.py 프로젝트: wkite/zun
 def _remove_local_file(self, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     shutil.rmtree(mountpoint)
예제 #4
0
파일: driver.py 프로젝트: wkite/zun
 def bind_mount(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     return mountpoint, volmap.container_path
예제 #5
0
파일: driver.py 프로젝트: wkite/zun
 def _unmount_device(self, volmap):
     if hasattr(volmap, 'connection_info'):
         mountpoint = mount.get_mountpoint(volmap.volume.uuid)
         mount.do_unmount(mountpoint)
         shutil.rmtree(mountpoint)
예제 #6
0
파일: driver.py 프로젝트: wkite/zun
 def _mount_device(self, volmap, devpath):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     fileutils.ensure_tree(mountpoint)
     mount.do_mount(devpath, mountpoint, CONF.volume.fstype)
예제 #7
0
파일: driver.py 프로젝트: wkite/zun
 def bind_mount(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     filename = '/'.join([mountpoint, volmap.volume.uuid])
     return filename, volmap.container_path
예제 #8
0
 def attach(self, context, volume):
     mountpoint = mount.get_mountpoint(volume.uuid)
     fileutils.ensure_tree(mountpoint)
     filename = '/'.join([mountpoint, volume.uuid])
     with open(filename, 'wb') as fd:
         fd.write(volume.contents)
예제 #9
0
 def bind_mount(self, volume):
     mountpoint = mount.get_mountpoint(volume.volume_id)
     return mountpoint, volume.container_path
예제 #10
0
 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)
예제 #11
0
파일: driver.py 프로젝트: openstack/higgins
 def bind_mount(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     return mountpoint, volmap.container_path
예제 #12
0
파일: driver.py 프로젝트: openstack/higgins
 def _unmount_device(self, volmap):
     if hasattr(volmap, 'connection_info'):
         mountpoint = mount.get_mountpoint(volmap.volume.uuid)
         mount.do_unmount(mountpoint)
         shutil.rmtree(mountpoint)
예제 #13
0
파일: driver.py 프로젝트: openstack/higgins
 def _mount_device(self, volmap, devpath):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     fileutils.ensure_tree(mountpoint)
     mount.do_mount(devpath, mountpoint, CONF.volume.fstype)
예제 #14
0
파일: driver.py 프로젝트: openstack/higgins
 def bind_mount(self, context, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     filename = '/'.join([mountpoint, volmap.volume.uuid])
     return filename, volmap.container_path
예제 #15
0
파일: driver.py 프로젝트: openstack/higgins
 def _remove_local_file(self, volmap):
     mountpoint = mount.get_mountpoint(volmap.volume.uuid)
     shutil.rmtree(mountpoint)