New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fixes #14036,#16722 - use plugin hook for subnet smart proxy #303
Conversation
6055de4
to
9136b92
Compare
Thanks, was busy today, will take a look and the core patch as well! Huge improvement, was driving me crazy :-) |
@lzap : Just as a fair warning: Expect more PRs here. At work discovery is now part of our production installation. Looks great, so far. Thanks. |
Please do not merge, yet. I still need to add the "api_description" to this. |
9136b92
to
fcd4cb7
Compare
Added the missing api description. Ready for review & testing. 🚢 |
@@ -21,6 +21,4 @@ Gem::Specification.new do |s| | |||
s.homepage = %q{http://github.com/theforeman/foreman_discovery} | |||
s.licenses = ["GPL-3.0"] | |||
s.summary = %q{MaaS Discovery Plugin for Foreman} | |||
|
|||
s.add_dependency 'deface', '< 2.0' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvement, thanks.
[test] |
I get some unit failures locally (Jenkins is busted for now):
|
fcd4cb7
to
809343c
Compare
Ah, yes. Sorry for this. Tests should pass now. |
@@ -1,6 +1,9 @@ | |||
class Host::Discovered < ::Host::Base | |||
include ScopedSearchExtensions | |||
include Foreman::Renderer | |||
include BelongsToProxies | |||
|
|||
self.registered_smart_proxies = {} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't like this, why I don't see it in core? Isn't better to initialize the class member in the BelongsToProxies
concern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I mean by that is - I don't understand why core models do not need this initialization. Anyway, we should either handle that correctly or initialize it in core and not here, what you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I'll write a fix for core. The concern was only meant to be used on a class which actually has smart_proxies. But we need it here because the params filter expect the method to be defined.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just for reference, the core PR is this: theforeman/foreman#3932
809343c
to
d21495b
Compare
Tests are green locally, thanks @timogoebel for this huge improvement! |
This needs theforeman/foreman#3904