mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Put task class properties in identical order
This commit is contained in:
parent
1acd86a85a
commit
4e2503ad9c
2 changed files with 5 additions and 10 deletions
|
@ -6,12 +6,11 @@ import time
|
||||||
|
|
||||||
|
|
||||||
class CreateVolumeFromSnapshot(Task):
|
class CreateVolumeFromSnapshot(Task):
|
||||||
|
description = 'Creating EBS volume from a snapshot'
|
||||||
phase = phases.volume_creation
|
phase = phases.volume_creation
|
||||||
after = [connection.Connect]
|
after = [connection.Connect]
|
||||||
before = [ebs.AttachVolume]
|
before = [ebs.AttachVolume]
|
||||||
|
|
||||||
description = 'Creating EBS volume from a snapshot'
|
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
volume_size = int(info.manifest.volume['size']/1024)
|
volume_size = int(info.manifest.volume['size']/1024)
|
||||||
snapshot = info.manifest.plugins['prebootstrapped']['snapshot']
|
snapshot = info.manifest.plugins['prebootstrapped']['snapshot']
|
||||||
|
|
|
@ -6,9 +6,8 @@ import time
|
||||||
|
|
||||||
|
|
||||||
class CreateVolume(Task):
|
class CreateVolume(Task):
|
||||||
phase = phases.volume_creation
|
|
||||||
|
|
||||||
description = 'Creating an EBS volume for bootstrapping'
|
description = 'Creating an EBS volume for bootstrapping'
|
||||||
|
phase = phases.volume_creation
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
volume_size = int(info.manifest.volume['size']/1024)
|
volume_size = int(info.manifest.volume['size']/1024)
|
||||||
|
@ -20,11 +19,10 @@ class CreateVolume(Task):
|
||||||
|
|
||||||
|
|
||||||
class AttachVolume(Task):
|
class AttachVolume(Task):
|
||||||
|
description = 'Attaching the EBS volume'
|
||||||
phase = phases.volume_creation
|
phase = phases.volume_creation
|
||||||
after = [CreateVolume]
|
after = [CreateVolume]
|
||||||
|
|
||||||
description = 'Attaching the EBS volume'
|
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
def char_range(c1, c2):
|
def char_range(c1, c2):
|
||||||
"""Generates the characters from `c1` to `c2`, inclusive."""
|
"""Generates the characters from `c1` to `c2`, inclusive."""
|
||||||
|
@ -49,11 +47,10 @@ class AttachVolume(Task):
|
||||||
|
|
||||||
|
|
||||||
class DetachVolume(Task):
|
class DetachVolume(Task):
|
||||||
|
description = 'Detaching the EBS volume'
|
||||||
phase = phases.volume_unmounting
|
phase = phases.volume_unmounting
|
||||||
after = [UnmountVolume]
|
after = [UnmountVolume]
|
||||||
|
|
||||||
description = 'Detaching the EBS volume'
|
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
info.volume.detach()
|
info.volume.detach()
|
||||||
while info.volume.attachment_state() is not None:
|
while info.volume.attachment_state() is not None:
|
||||||
|
@ -73,11 +70,10 @@ class CreateSnapshot(Task):
|
||||||
|
|
||||||
|
|
||||||
class DeleteVolume(Task):
|
class DeleteVolume(Task):
|
||||||
|
description = 'Deleting the EBS volume'
|
||||||
phase = phases.cleaning
|
phase = phases.cleaning
|
||||||
after = []
|
after = []
|
||||||
|
|
||||||
description = 'Deleting the EBS volume'
|
|
||||||
|
|
||||||
def run(self, info):
|
def run(self, info):
|
||||||
info.volume.delete()
|
info.volume.delete()
|
||||||
del info.volume
|
del info.volume
|
||||||
|
|
Loading…
Add table
Reference in a new issue