diff --git a/bootstrapvz/base/__init__.py b/bootstrapvz/base/__init__.py index a448245..44e8bb1 100644 --- a/bootstrapvz/base/__init__.py +++ b/bootstrapvz/base/__init__.py @@ -15,3 +15,8 @@ def validate_manifest(data, validator, error): import os.path schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) validator(data, schema_path) + + # Check the bootloader/partitioning configuration. + # Doing this via the schema is a pain and does not output a useful error message. + if data['system']['bootloader'] == 'grub' and data['volume']['partitions']['type'] == 'none': + error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader']) diff --git a/bootstrapvz/base/manifest.py b/bootstrapvz/base/manifest.py index f577b7a..fcc6ee4 100644 --- a/bootstrapvz/base/manifest.py +++ b/bootstrapvz/base/manifest.py @@ -71,11 +71,6 @@ class Manifest(object): from . import validate_manifest # Validate the manifest with the base validation function in __init__ validate_manifest(self.data, self.schema_validator, self.validation_error) - # Check the bootloader/partitioning configuration. - # Doing this via the schema is a pain and does not output a useful error message. - # This should be put into a separat function if there is more that should be checked like this. - if self.data['system']['bootloader'] == 'grub' and self.data['volume']['partitions']['type'] == 'none': - self.validation_error('Grub cannot boot from unpartitioned disks', ['system', 'bootloader']) # Run the provider validation self.modules['provider'].validate_manifest(self.data, self.schema_validator, self.validation_error)