Skip to content
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

Replace the IPAddress gem with the built-in IPAddr class #290

Merged
merged 5 commits into from
Dec 1, 2022

Conversation

imp-
Copy link
Contributor

@imp- imp- commented Nov 23, 2022

Pull Request (PR) description

The module relies on the IPAddress gem to perform certain validations.
It can be replaced by the IPAddr class, which does not require custom gem installation as it's part of the standard ruby distribution.

This pull request removes traces to the IPAddress gem in favour of the IPAddr class.

This Pull Request (PR) fixes the following issues

This should also fix #267

@imp-
Copy link
Contributor Author

imp- commented Nov 23, 2022

In hindsight, maybe it's better to leave the ipaddress parameters in the network class to not break compatibility.
It could also be used to clean up the unused gem (new default).

@bastelfreak
Copy link
Member

@imp- thanks for the PR. I fixed the puppet-lint warnings in #291. can you please rebase? Also if you can implement this in a non-breaking way, that would be awesome, but that's not a requirement.

@imp-
Copy link
Contributor Author

imp- commented Dec 1, 2022

@bastelfreak there should be no more breaking changes now. The ipaddress gem is removed by default, in a future (major) release the code managing the gem can eventually be dropped.

Remaining code warnings are fixed as well.

@bastelfreak bastelfreak added enhancement New feature or request and removed backwards-incompatible labels Dec 1, 2022
@bastelfreak
Copy link
Member

Thanks for the work!

@bastelfreak bastelfreak merged commit cc036b7 into voxpupuli:master Dec 1, 2022
starlingx-github pushed a commit to starlingx/integ that referenced this pull request Jun 19, 2023
During bootstrap, puppet throws a warning message that 'ipaddress gem
was not found'.
The puppet-network module uses the IPAddress gem to perform some
validations.
This gem can be replaced by the built-in class IPAddr and that way does
not require the custom gem installation.

This commit is sourced from a PR from the official repository of the
puppet-network module:
voxpupuli/puppet-network#290

Test Plan:
PASS: Build & Install
PASS: AIO-SX & AIO-DX Successful Bootstrap
PASS: AIO-SX & AIO-DX Successful Unlock
PASS: Check that 'ipaddress gem not found' warning is no longer present
on puppet.log

Story: 2010757
Task: 48425
Change-Id: I1158628165ea62dc642a6a392a036f1d68b4a2cf
Signed-off-by: Luis Marquitti <luis.eduardoangelinimarquitti@windriver.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Unable to set correct netmask for IPv6
2 participants