示例#1
0
	def run(cls, info):
		loopback_backup_name = 'volume-{id}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension)
		destination = os.path.join(info.manifest.bootstrapper['workspace'], loopback_backup_name)

		def mk_snapshot():
			copyfile(info.volume.image_path, destination)
		remount(info.volume, mk_snapshot)
		msg = 'A copy of the bootstrapped volume was created. Path: {path}'.format(path=destination)
		log.info(msg)
示例#2
0
	def run(cls, info):
		loopback_backup_name = 'volume-{id}.{ext}.backup'.format(id=info.run_id, ext=info.volume.extension)
		destination = os.path.join(info.manifest.bootstrapper['workspace'], loopback_backup_name)

		def mk_snapshot():
			copyfile(info.volume.image_path, destination)
		remount(info.volume, mk_snapshot)
		msg = 'A copy of the bootstrapped volume was created. Path: ' + destination
		log.info(msg)
示例#3
0
	def run(cls, info):
		def mk_snapshot():
			return info.volume.snapshot()
		snapshot = remount(info.volume, mk_snapshot)
		msg = 'A snapshot of the bootstrapped volume was created. ID: {id}'.format(id=snapshot.id)
		log.info(msg)
示例#4
0
	def run(cls, info):
		def mk_snapshot():
			return info.volume.snapshot()
		snapshot = remount(info.volume, mk_snapshot)
		msg = 'A snapshot of the bootstrapped volume was created. ID: ' + snapshot.id
		log.info(msg)