From 8cd0648e27b43203c1a052270bb1877e222248e3 Mon Sep 17 00:00:00 2001 From: Nicolas Braud-Santoni Date: Sun, 11 Sep 2016 22:05:22 +0200 Subject: [PATCH] common: Add a validation phase As discussed in [#335], the `validate_manifest` method checks the manifest's internal consistency. The validation phase, on the other hand, can be used to check the consistency of the manifest with external ressources, for instance: - Checking if files or directories exist. - Checking if the content of a file is consistent with what was expected. - Checking if a network ressource (an APT proxy?) is reachable. [#335]: https://github.com/andsens/bootstrap-vz/pull/335#issuecomment-239661077 --- bootstrapvz/common/phases.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bootstrapvz/common/phases.py b/bootstrapvz/common/phases.py index 99f39a7..c9895e5 100644 --- a/bootstrapvz/common/phases.py +++ b/bootstrapvz/common/phases.py @@ -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,