mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Merge pull request #339 from nbraud/validation_phase
Move checking tasks to the validation phase
This commit is contained in:
commit
ad2273a795
15 changed files with 18 additions and 16 deletions
|
@ -1,5 +1,6 @@
|
|||
from bootstrapvz.base.phase import Phase
|
||||
|
||||
validation = Phase('Validation', 'Validating data, files, etc.')
|
||||
preparation = Phase('Preparation', 'Initializing connections, fetching data etc.')
|
||||
volume_creation = Phase('Volume creation', 'Creating the volume to bootstrap onto')
|
||||
volume_preparation = Phase('Volume preparation', 'Formatting the bootstrap volume')
|
||||
|
@ -13,7 +14,8 @@ volume_unmounting = Phase('Volume unmounting', 'Unmounting the bootstrap volume'
|
|||
image_registration = Phase('Image registration', 'Uploading/Registering with the provider')
|
||||
cleaning = Phase('Cleaning', 'Removing temporary files')
|
||||
|
||||
order = [preparation,
|
||||
order = [validation,
|
||||
preparation,
|
||||
volume_creation,
|
||||
volume_preparation,
|
||||
volume_mounting,
|
||||
|
|
|
@ -9,7 +9,7 @@ log = logging.getLogger(__name__)
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for bootstrapping Debian'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -8,7 +8,7 @@ import volume
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for formatting'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -5,7 +5,7 @@ from ..exceptions import TaskError
|
|||
|
||||
class CheckExternalCommands(Task):
|
||||
description = 'Checking availability of external commands'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -6,7 +6,7 @@ import volume
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for creating loopback volumes'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -7,7 +7,7 @@ import volume
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for partitioning the volume'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -5,7 +5,7 @@ import os
|
|||
|
||||
class CheckPlaybookPath(Task):
|
||||
description = 'Checking whether the playbook path exist'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -7,7 +7,7 @@ import urllib2
|
|||
|
||||
class CheckAptProxy(Task):
|
||||
description = 'Checking reachability of APT proxy server'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -5,7 +5,7 @@ import os
|
|||
|
||||
class CheckAssetsPath(Task):
|
||||
description = 'Checking whether the assets path exist'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -10,7 +10,7 @@ import os
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for reducing volume size'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -6,7 +6,7 @@ import os
|
|||
|
||||
class CheckAssetsPath(Task):
|
||||
description = 'Checking whether the assets path exist'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
@ -22,7 +22,7 @@ class CheckAssetsPath(Task):
|
|||
|
||||
class CheckManifestPath(Task):
|
||||
description = 'Checking whether the manifest path exist'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -9,7 +9,7 @@ assets = os.path.normpath(os.path.join(os.path.dirname(__file__), 'assets'))
|
|||
|
||||
class CheckBoxPath(Task):
|
||||
description = 'Checking if the vagrant box file already exists'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
|
@ -5,7 +5,7 @@ from bootstrapvz.common.tasks import host
|
|||
|
||||
class AddRequiredCommands(Task):
|
||||
description = 'Adding commands required for docker'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -5,7 +5,7 @@ from bootstrapvz.common.tasks import host
|
|||
|
||||
class AddExternalCommands(Task):
|
||||
description = 'Determining required external commands for EC2 bootstrapping'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
successors = [host.CheckExternalCommands]
|
||||
|
||||
@classmethod
|
||||
|
|
|
@ -9,7 +9,7 @@ assets = os.path.normpath(os.path.join(os.path.dirname(__file__), '../assets'))
|
|||
|
||||
class CheckGuestAdditionsPath(Task):
|
||||
description = 'Checking whether the VirtualBox Guest Additions image exists'
|
||||
phase = phases.preparation
|
||||
phase = phases.validation
|
||||
|
||||
@classmethod
|
||||
def run(cls, info):
|
||||
|
|
Loading…
Add table
Reference in a new issue