mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
31 lines
626 B
Python
31 lines
626 B
Python
from bootstrapvz.base import Task
|
|
from .. import phases
|
|
from . import workspace
|
|
|
|
|
|
class Attach(Task):
|
|
description = 'Attaching the volume'
|
|
phase = phases.volume_creation
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
info.volume.attach()
|
|
|
|
|
|
class Detach(Task):
|
|
description = 'Detaching the volume'
|
|
phase = phases.volume_unmounting
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
info.volume.detach()
|
|
|
|
|
|
class Delete(Task):
|
|
description = 'Deleting the volume'
|
|
phase = phases.cleaning
|
|
successors = [workspace.DeleteWorkspace]
|
|
|
|
@classmethod
|
|
def run(cls, info):
|
|
info.volume.delete()
|