Skip to content

Ticket/1.6.x/11566 windows ec2#140

Merged
joshcooper merged 1 commit intopuppetlabs:1.6.xfrom
kbarber:ticket/1.6.x/11566-windows_ec2
Jan 17, 2012
Merged

Ticket/1.6.x/11566 windows ec2#140
joshcooper merged 1 commit intopuppetlabs:1.6.xfrom
kbarber:ticket/1.6.x/11566-windows_ec2

Conversation

@kbarber
Copy link

@kbarber kbarber commented Jan 6, 2012

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.

@kbarber
Copy link
Author

kbarber commented Jan 9, 2012

@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.

@joshcooper
Copy link
Contributor

Ran into problems when running the tests on Windows. Sent separate email to Ken

@kbarber
Copy link
Author

kbarber commented Jan 15, 2012

@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.
@joshcooper joshcooper merged commit 1df5b46 into puppetlabs:1.6.x Jan 17, 2012
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants