ring-sqa 0.0.22 → 0.0.23

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 607e1ee6bfecfef783993cd833b5939e23274d04
4
- data.tar.gz: 44e5b32a2e81e1159b7bd36d76a6e90b91d64f0a
3
+ metadata.gz: 5a9e53e58f2786d8d813c824630b6c3885a92d89
4
+ data.tar.gz: 795d8eec0b54a1c9cb634adf99006931bcf0173c
5
5
  SHA512:
6
- metadata.gz: 1b43afbdb5daa721b17f9de29bbae979a336af2e6ee8b0c54e6571b3e8254473078eab1ebb12735c7bf45d71644ca7a903f4feaef945e68e3fe5181b8e1edd6d
7
- data.tar.gz: be0b92fcf4880131ebaff0f6c41a694651afcc0f7ed07fb168535d2b77867731d15480527a1d1e52b69cd793f1eb6030f62727e54bf2693d277f0ebca11b95a4
6
+ metadata.gz: a0850b9387086975c40633444e0de890b1899fe25a9af70766f0d78f2e33c6694c3e08ab26aeb835629b1bdcf3400742f3cb34ecdc9272653596454a584e67f3
7
+ data.tar.gz: b77f8540839d0af92ed47b923f299d240ad194f344815541e0f384b737bbe921a456f14ea812b44c1bf54a44be6e3108c15166f47ef1af8eb709c6112512ac4a
@@ -45,9 +45,10 @@ class SQA
45
45
  msg = {short: "#{@hostname}: raising #{@afi} alarm - #{exceeding_nodes.size} new nodes down"}
46
46
  exceeding_nodes = exceeding_nodes.map { |node| @nodes.get node }
47
47
 
48
+ addr_len = @afi == 'ipv6' ? 40 : 15
48
49
  nodes_list = ''
49
50
  exceeding_nodes.sort_by{ |node| node[:cc] }.each do |node|
50
- nodes_list << "- %-35s %15s AS%-6s %2s\n" % [node[:name], node[:ip], node[:as], node[:cc]]
51
+ nodes_list << "- %-35s %#{addr_len}s AS%-6s %2s\n" % [node[:name], node[:ip], node[:as], node[:cc]]
51
52
  end
52
53
 
53
54
  mtr_list = ''
@@ -56,6 +56,7 @@ class SQA
56
56
  def json_to_nodes_hash from_json
57
57
  nodes= {}
58
58
  from_json.each do |ip, json|
59
+ ip = IPAddr.new(ip).to_s
59
60
  node = {
60
61
  name: json['hostname'],
61
62
  ip: ip,
data/ring-sqa.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'ring-sqa'
3
- s.version = '0.0.22'
3
+ s.version = '0.0.23'
4
4
  s.licenses = %w( Apache-2.0 )
5
5
  s.platform = Gem::Platform::RUBY
6
6
  s.authors = [ 'Saku Ytti', 'Job Snijders' ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ring-sqa
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.22
4
+ version: 0.0.23
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti