2011-01-03 14:23:51 -05:00
|
|
|
def dns_providers
|
|
|
|
{
|
2011-06-15 20:25:01 -04:00
|
|
|
:aws => {
|
2011-01-03 14:23:51 -05:00
|
|
|
:mocked => false
|
|
|
|
},
|
2011-06-15 20:25:01 -04:00
|
|
|
:bluebox => {
|
2011-02-23 14:16:58 -05:00
|
|
|
:mocked => false,
|
|
|
|
:zone_attributes => {
|
|
|
|
:ttl => 60
|
|
|
|
}
|
|
|
|
},
|
2011-06-15 20:25:01 -04:00
|
|
|
:dnsimple => {
|
|
|
|
:mocked => false
|
|
|
|
},
|
|
|
|
:dnsmadeeasy => {
|
|
|
|
:mocked => false
|
|
|
|
},
|
2011-07-14 20:22:43 -04:00
|
|
|
:dynect => {
|
|
|
|
:mocked => false,
|
|
|
|
:zone_attributes => {
|
|
|
|
:email => 'fog@example.com'
|
|
|
|
}
|
|
|
|
},
|
2011-06-15 20:25:01 -04:00
|
|
|
:linode => {
|
2011-01-03 18:39:38 -05:00
|
|
|
:mocked => false,
|
|
|
|
:zone_attributes => {
|
|
|
|
:email => 'fog@example.com'
|
|
|
|
}
|
2011-01-03 14:23:51 -05:00
|
|
|
},
|
2011-06-15 20:25:01 -04:00
|
|
|
:zerigo => {
|
2011-05-29 19:41:27 -04:00
|
|
|
:mocked => false
|
2011-08-27 22:06:46 -04:00
|
|
|
},
|
2014-12-10 11:30:34 -05:00
|
|
|
:rackspace => {
|
|
|
|
:mocked => false,
|
|
|
|
:zone_attributes => {
|
|
|
|
:email => 'fog@example.com'
|
|
|
|
}
|
|
|
|
},
|
2014-01-21 17:23:55 -05:00
|
|
|
:rage4 => {
|
2014-01-23 16:27:04 -05:00
|
|
|
:mocked => false
|
2011-01-03 14:23:51 -05:00
|
|
|
}
|
2010-12-29 20:23:40 -05:00
|
|
|
}
|
2011-02-18 00:22:43 -05:00
|
|
|
end
|
2011-07-15 12:26:22 -04:00
|
|
|
|
|
|
|
def generate_unique_domain( with_trailing_dot = false)
|
|
|
|
#get time (with 1/100th of sec accuracy)
|
|
|
|
#want unique domain name and if provider is fast, this can be called more than once per second
|
|
|
|
time= (Time.now.to_f * 100).to_i
|
|
|
|
domain = 'test-' + time.to_s + '.com'
|
|
|
|
if with_trailing_dot
|
|
|
|
domain+= '.'
|
|
|
|
end
|
|
|
|
|
|
|
|
domain
|
|
|
|
end
|