Actions
Refactor #22219
openRefactor validate_media? to be hookable
Status:
New
Priority:
Normal
Assignee:
-
Category:
Host creation
Target version:
-
Description
Katello plugin needs to hook into validate_media? method. When Bootdisk added new provisioning method, there are now two methods which needs media to be present: build (pxe) and boodisk. Katello needs to disable media validation when content source is set, but this can't be done via single hook point, because either build or bootdisk method is always true:
super || (managed && bootdisk_build? && build?)
We need to refactor this in a way that katello can hook it. One idea is to create method for each individual method:
- validate_image_media? (returns always false)
- validate_build_media?
- validate_bootdisk_media? (created by bootdisk plugin)
So Katello can hook individually. But in this case initializers in Katello must be changed - host extensions must be called after boodisk creates the method (perhaps via after_initialize block).
Updated by Lukas Zapletal almost 7 years ago
- Related to Bug #14797: Medium validation wrong with Katello and foreman_bootdisk added
Actions