(#20229) Fix per-interface netmask_* facts with net-tools 1.60#432
(#20229) Fix per-interface netmask_* facts with net-tools 1.60#432adrienthebo merged 3 commits intopuppetlabs:stablefrom
Conversation
|
CLA Signed by jeffmccune on 2010-08-16 21:00:00 -0700 |
|
Closing this pull request until the other facts like |
spec/unit/netmask_spec.rb
Outdated
There was a problem hiding this comment.
Will this configure block be localized to only this spec file?
There was a problem hiding this comment.
No, it affects global state. I chose to do it here for readability.
There was a problem hiding this comment.
So for my understanding, this is to make the shared example code more descriptive and emit more descriptive messages with --format documentation or are there functional behavior changes as well?
There was a problem hiding this comment.
It's to be more descriptive, yes. It doesn't actually change the behavior of the system in any way AFAICT.
|
@jeffmccune would you like me to fix this up? How would you like to see this deduplicated? |
If you have the bandwidth, yes, that'd be great. I don't really have any preference on how to deduplicate this, perhaps just factoring out the |
Without this patch the interface specific facts for the netmask are not correctly parsed on systems with net-tools 1.60 or later, such as Archlinux. This patch addresses the problem by adjusting the regular expression to take into account the new format of the ifconfig command. This patch is specific to the netmask_* facts and does not affect the behavior of the general `netmask` fact.
Without this patch the netmask fact does not return a value on Archlinux because of the new format of the net-tools package. This patch addresses the problem by updating the regular expressions for the netmask fact. Both the old format and the new format are covered by the regular expression now.
Adrien pointed out the duplication of
RSpec.configure do |config|
config.alias_it_should_behave_like_to :example_behavior_for, "parses"
end
in both of the interfaces_spec file and the netmask_spec file. This
patch removes the duplicate statements and places them in a shared file
required by both example specs.
|
@adrienthebo I've fixed this up and moved the configure statements into their own file. As soon as Github catches up and re-synchronizes this pull request it should be ready for merge. |
(#20229) Fix per-interface netmask_* facts with net-tools 1.60
|
Summary: merged into master in c7407f8. This should be released in 1.7.2. Thanks! |
Without this patch the interface specific facts for the netmask are not
correctly parsed on systems with net-tools 1.60 or later, such as
Archlinux.
This patch addresses the problem by adjusting the regular expression to
take into account the new format of the ifconfig command.
This patch is specific to the netmask_* facts and does not affect the
behavior of the general
netmaskfact.