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

Parse config file on NetworkInterface#reload #253

Merged

Conversation

agrare
Copy link
Member

@agrare agrare commented Aug 5, 2024

I haven't checked other callers of reload to see if this makes sense so I'd like your opinions @bdunne / @Fryguy but I was looking at https://github.com/ManageIQ/manageiq-appliance_console/blob/master/bin/appliance_console#L92-L93 and the .reload then .parse_conf if respond_to?(:parse_conf) looked like it could be improved by moving this logic into the NetworkInterfaceRh subclass.

@@ -12,6 +12,13 @@ class NetworkInterfaceRH < NetworkInterface
def initialize(interface)
@interface_file = self.class.path_to_interface_config_file(interface)
super
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NOTE the base class initialize calls reload so we don't need to super then parse_conf here.

@agrare agrare force-pushed the network_interface_parse_config_file_on_reload branch from 8051f20 to a91b888 Compare August 5, 2024 20:47
@miq-bot
Copy link
Member

miq-bot commented Aug 5, 2024

Checked commit agrare@a91b888 with ruby 3.1.5, rubocop 1.56.3, haml-lint 0.51.0, and yamllint
1 file checked, 0 offenses detected
Everything looks fine. 🏆

@Fryguy
Copy link
Member

Fryguy commented Aug 5, 2024

Yeah this makes more sense. 👍

@bdunne bdunne merged commit 1e256b9 into ManageIQ:master Aug 5, 2024
5 checks passed
@bdunne bdunne self-assigned this Aug 5, 2024
@agrare agrare deleted the network_interface_parse_config_file_on_reload branch August 5, 2024 21:46
bdunne added a commit that referenced this pull request Aug 13, 2024
Breaking Changes:
- Use --json for ip command output #251

Added:
- Add network interface loopback #254
- Add LinuxAdmin::NetworkInterface.list #249

Changed:
- Parse config file on NetworkInterface#reload #253

Test:
- Use ruby 3.1 and rails 7 for code coverage #250
- Fix rubocop warnings in NetworkInterface Spec #252
- Update paambaati/codeclimate-action action to v8 #248
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants