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
This commit is contained in:
Nicolas Braud-Santoni 2016-09-11 22:05:22 +02:00
parent b9d63b701d
commit 8cd0648e27
No known key found for this signature in database
GPG key ID: 9D4F88010CFE19E3

View file

@ -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,