Ticket/1.6.x/11566 windows ec2#140
Merged
joshcooper merged 1 commit intopuppetlabs:1.6.xfrom Jan 17, 2012
Merged
Conversation
Author
|
@joshcooper I've reworked my patch here completely so that the decision making is done in a util class - its easier to test that way ... and I've added much better coverage because of it. @nicklewis I've removed my backslashes - thanks for the advice. |
Contributor
|
Ran into problems when running the tests on Windows. Sent separate email to Ken |
Author
|
@joshcooper should be good now mate. |
This patch adds support for detecting ec2 on windows. This works by modifying the linux methodology by using arp -a instead of arp -an and searching for the mac address with a hyphen delimiter (as apposed to a quote). I've added tests and a sample fixtures which adds output from arp -a from a windows machine and linux machines, on ec2 and not on ec2. I've also re-worked the decision making into a util class so the testing is much easier to write and work with, so now we can test the individual mechanism for detecting that we are in a cloud on their own. This will be much better abstracted into their own fact(s) but for now this has the least impact to solve the problem at hand. In the future this logic (and tests) can certainly be re-used if such a fact was evercreated. Thanks to Feifei Jia <fjia@yottaa.com> for contributing the original code.
whopper
pushed a commit
to whopper/facter
that referenced
this pull request
Mar 18, 2015
…ion-fix (CFACT-125) Resolve architecture fact when passed as an argument
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This patch adds support for detecting ec2 on windows. This works by modifying
the linux methodology by using arp -a instead of arp -an and searching for the
mac address with a hyphen delimiter (as apposed to a quote).
I've added tests and a sample fixture which adds output from arp -a from a
windows machine.
Thanks to Feifei Jia fjia@yottaa.com for contributing the original code.