mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 09:50:37 +00:00
28 lines
567 B
Python
28 lines
567 B
Python
![]() |
from bootstrapvz.base import Task
|
||
|
from bootstrapvz.common import phases
|
||
|
import volume
|
||
|
import workspace
|
||
|
|
||
|
|
||
|
class Create(Task):
|
||
|
description = 'Creating volume folder'
|
||
|
phase = phases.volume_creation
|
||
|
successors = [volume.Attach]
|
||
|
|
||
|
@classmethod
|
||
|
def run(cls, info):
|
||
|
import os.path
|
||
|
info.root = os.path.join(info.workspace, 'root')
|
||
|
info.volume.create(info.root)
|
||
|
|
||
|
|
||
|
class Delete(Task):
|
||
|
description = 'Deleting volume folder'
|
||
|
phase = phases.cleaning
|
||
|
successors = [workspace.DeleteWorkspace]
|
||
|
|
||
|
@classmethod
|
||
|
def run(cls, info):
|
||
|
info.volume.delete()
|
||
|
del info.root
|