Skip to content

Commit

Permalink
added loop to check all boot_sets
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanholen-hpe committed Nov 12, 2024
1 parent 2fd3fd4 commit 77a34b2
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions sat/cli/bootprep/input/session_template.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,9 @@ def validate_rootfs_provider_has_value(self, **_):
Raises:
InputItemValidateError: if the rootfs_provider is an empty string
"""
if not self.boot_sets['rootfs_provider']:
return
else:
raise InputItemValidateError(f'The value of rootfs_provider cannot be an empty string')
for boot_set in self.boot_sets.values():
if not boot_set['rootfs_provider']:
raise InputItemValidateError(f'The value of rootfs_provider cannot be an empty string')

@Validatable.validation_method()
def validate_rootfs_provider_passthrough_has_value(self, **_):
Expand All @@ -127,10 +126,9 @@ def validate_rootfs_provider_passthrough_has_value(self, **_):
Raises:
InputItemValidateError: if the rootfs_provider_passthrough is an empty string
"""
if not self.boot_sets['rootfs_provider_passthrough']:
return
else:
raise InputItemValidateError(f'The value of rootfs_provider_passthrough cannot be an empty string')
for boot_set in self.boot_sets.values():
if not boot_set['rootfs_provider_passthrough']:
raise InputItemValidateError(f'The value of rootfs_provider_passthrough cannot be an empty string')

@Validatable.validation_method()
def validate_configuration_exists(self, **_):
Expand Down

0 comments on commit 77a34b2

Please sign in to comment.