dyntool 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/dyntool.rb +3 -4
- metadata +2 -2
data/lib/dyntool.rb
CHANGED
@@ -46,7 +46,7 @@ class LoadConfig
|
|
46
46
|
def GetIpWeight(ip,region)
|
47
47
|
@weight = @conf['ips'][ip]['weight'][region]
|
48
48
|
end
|
49
|
-
def GetIpTTL(
|
49
|
+
def GetIpTTL(region)
|
50
50
|
@ttl = @conf['ttls'][region]
|
51
51
|
end
|
52
52
|
def GetContacts
|
@@ -639,13 +639,12 @@ class OperateDyn
|
|
639
639
|
@ips.each do |ip|
|
640
640
|
@label = @@conf.GetIpLabel(ip)
|
641
641
|
@weight = @@conf.GetIpWeight(ip,region)
|
642
|
-
@ttl = @@conf.GetIpTTL(ip,region)
|
643
642
|
@labels << "#{@label}"
|
644
643
|
@weights << "#{@weight}"
|
645
|
-
@ttls << "#{@ttl}"
|
646
644
|
end
|
645
|
+
@ttl = @@conf.GetIpTTL(region)
|
647
646
|
@labels = @labels.uniq
|
648
|
-
@region_hash[@i] = { :name => "#{region}", :label => { :a_label => @labels}, :weight => { :a_weight => @weights }, :serve_count => { :a_serve_count => @ips_len }, :ttl => { :a_ttl => @
|
647
|
+
@region_hash[@i] = { :name => "#{region}", :label => { :a_label => @labels}, :weight => { :a_weight => @weights }, :serve_count => { :a_serve_count => @ips_len }, :ttl => { :a_ttl => @ttl }, :countries => @countries, :rdata => @ips_hash }
|
649
648
|
end
|
650
649
|
@record_data = { :name => "#{service}", :groups => [ @region_hash[1],@region_hash[2],@region_hash[3],@region_hash[4],@region_hash[5],@region_hash[6],@region_hash[7],@region_hash[8],@region_hash[9] ]}
|
651
650
|
return(@record_data)
|