-
Notifications
You must be signed in to change notification settings - Fork 222
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 #34205 - External IPAM Integration #810
base: develop
Are you sure you want to change the base?
Conversation
# 1. phpIPAM: externalipam_phpipam | ||
# 2. Netbox: externalipam_netbox | ||
|
||
:use_provider: externalipam_netbox |
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.
Note for myself / @ekohl - I am fine with bringing this feature into core, after all External IPAM is already in Foreman core, however, I would suggest to ship providers as RPM/DEB subpackages so products owners can decide what to ship and what not. Opinion?
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.
It does not introduce additional dependencies and the Smart Proxy is already quite smart in not loading the module if it's inactive so I'd just ship it in the same RPM/deb. Subpackages only make sense to reduce additional dependencies or reducing runtime overhead at the cost of more complex installation. In this case I think it's not worth it but I appreciate the consideration.
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.
Okay let me rephrase it this way - I do not want to support this in Red Hat Satellite at this moment. Perhaps we can disable it via the installer scenario?
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.
Currently we don't have good facilities for that. It would need some thought.
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.
Ok this is an internal discussion, I do not want block this effort.
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 went through it, but there's a bunch of repeated patterns. It may feel a bit like an inconsistent review and I think we may have a long back and forth on this for a while. That said, I am in favor of getting this into the Smart Proxy so please don't take it as being against it. Quite the opposite: Foreman itself has the functionality in core so the Smart Proxy should too.
modules/externalipam/ip_cache.rb
Outdated
end | ||
|
||
def ip_exists(ip, cidr, group_name) | ||
cidr_key = @ip_cache[group_name.to_sym][cidr.to_sym]&.to_s |
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.
Why &.to_s
? Would it be better to use IPAddr instance and check if the IP is present in the subnet?
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.
We are checking if the IP is in the cache, not in the subnet
Pushed most of these changes, and still working through the last few. I will squash the commits once everything is in alignment |
I have no further comments, @ekohl ? |
I think this is close to merging, please rebase and we can move forward with this. |
@lzap Almost finished with most of the recommended changes. Will try to rebase and push at some point next week |
38a0532
to
60bad6e
Compare
Overall I am okay with the patch, Ewoud had more comments than I anyway I will let him to finish the review. Thanks for this feature! |
60bad6e
to
8172241
Compare
@ekohl Just did a fresh rebase and also wanted to follow-up on this PR. Changes are done and tested. Let me know if you need anything else. Will be great to have this as part of the Foreman/Proxy core! |
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 think this is looking pretty good. Some minor comments inline.
8172241
to
d60bbbe
Compare
@ekohl - Changes are done and tested. Sorry I squashed the commit already but probably should have done that after your review |
@ekohl Just a friendly ping on this. I hoping the plan is still to merge this into core. I have completed the requested changes - Let me know if there is anything else needed to move this forward |
@ekohl Where are things regarding the integration of External IPAM? It would be great to finally have this integrated. |
@lzap
This long overdue PR is for merging the External IPAM features from the smart_proxy_ipam plugin (https://github.com/grizzthedj/smart_proxy_ipam) into Smart Proxy Core.
This currently adds support for the below IPAM providers:
Tests for the External IPAM module have been written and are green. Please note that I am unable to run the entire test suite due to some mac install issues with the
rkerberos
gem.Looking forward to feedback!