2014-03-23 23:12:07 +01:00
|
|
|
from bootstrapvz.base import Task
|
|
|
|
from .. import phases
|
2013-09-15 16:59:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
class CreateWorkspace(Task):
|
2016-06-04 11:35:59 +02:00
|
|
|
description = 'Creating workspace'
|
|
|
|
phase = phases.preparation
|
2013-09-15 16:59:56 +02:00
|
|
|
|
2016-06-04 11:35:59 +02:00
|
|
|
@classmethod
|
|
|
|
def run(cls, info):
|
|
|
|
import os
|
|
|
|
os.makedirs(info.workspace)
|
2013-09-15 16:59:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
class DeleteWorkspace(Task):
|
2016-06-04 11:35:59 +02:00
|
|
|
description = 'Deleting workspace'
|
|
|
|
phase = phases.cleaning
|
2013-09-15 16:59:56 +02:00
|
|
|
|
2016-06-04 11:35:59 +02:00
|
|
|
@classmethod
|
|
|
|
def run(cls, info):
|
|
|
|
import os
|
|
|
|
os.rmdir(info.workspace)
|