fog/fog — pull request #1976 by maxlinc (2013-07-23 21:24:30+00:00)
Title: Fog::Mock - random ip address generation

It looks like most providers have implemented their own (often similar) methods to generate dummy IPv4 and IPv6 addresses. It also looks like most, if not all, of them sometimes return invalid addresses like "476.4.7.4" (the 476 is too high for a valid IP address).

This adds support for Fog::Mock.random_ip (with v4 vs v6 options) so providers don't need to implement their own using Fog::Mock.random_number.

I did not include fixes in provider mocks to use the new method, but it looks like the bug exists in at least these providers:
rackspace
aws
cloudstack
ecloud
hp
ibm
internet_archive