bootstrap-vz/providers/ec2/tasks/ebs.py

21 lines
471 B
Python
Raw Normal View History

from base import Task
from common import phases
from common.tasks import volume
class Create(Task):
description = 'Creating the EBS volume'
phase = phases.volume_creation
before = [volume.Attach]
2013-06-26 20:14:37 +02:00
def run(self, info):
info.volume.create(info.connection, info.host['availabilityZone'])
2013-06-26 20:14:37 +02:00
class Snapshot(Task):
2013-07-07 19:24:52 +02:00
description = 'Creating a snapshot of the EBS volume'
phase = phases.image_registration
def run(self, info):
info.snapshot = info.volume.snapshot()