Bug #11708
closed
New status code broke discovery plugin API
Added by Lukas Zapletal about 9 years ago.
Updated about 9 years ago.
Category:
Discovery plugin
|
Description
I see no reason why to have all status-related methods in Host::Managed. This prevents plugins from using this in their owh STI sub-classes (e.g. discovery) and essentially breaks all API operations (patch is required: https://gist.github.com/lzap/2b1f83d2d47836fa9816).
Either move it to Host::Base or at least create a module that can be mixed into subclasses.
- Translation missing: en.field_release set to 63
Regarding your suggested rabl patch, why is Foreman's own host rabl being used for Host::Discovered? It's specifically for Host::Managed, since it's for Foreman's HostsController and shouldn't be used for other things that aren't at least sub-classes.
You could move parts of the status API to base if it'd be useful I guess. Probably the HostStatus subclasses we already have would only be linked to Host::Managed though, and only global status would be on base?
- Assignee deleted (
Marek Hulán)
- Project changed from Foreman to Discovery
- Category changed from Reporting to Discovery plugin
- Translation missing: en.field_release deleted (
63)
I'll move this over to Discovery as I think it should be fixed just in the API controller per my last comment.
If you're interested in having some status support on Host::Base then perhaps file another issue (including to say which bits of it are applicable), but I don't think it's necessary to fix the initial bug report.
I'd like to have DiscoveredStatus of course, it is interesting feature as we have several statuses currently. I will file another one then.
- Status changed from New to Ready For Testing
- Pull request https://github.com/theforeman/foreman_discovery/pull/214 added
- Pull request deleted (
)
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Also available in: Atom
PDF