ring-sqa 0.1.0 → 0.1.1

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: ca449f8a8c7a0ab2161b8b29b660e676b03a35b6
4
- data.tar.gz: 75eda160f04f86f654f6a1238e27c9b8baf2632b
3
+ metadata.gz: d32cba15f81d02bdc91162394a7142b70c397c4a
4
+ data.tar.gz: 361e5e46eb36fef3b659e5c3140fc63af36d49c4
5
5
  SHA512:
6
- metadata.gz: 4171a64a662db193d702b783adb1e8d39c26110d4e53c852948033cffa9d69d1b5e6347d38f127007e1a50631a17116c31969ee9b7b458bb36f3d7e56899b558
7
- data.tar.gz: f931c2971269e66bfe2fa5506cf1ae93da4e0e7e6bd96d81765ec79acea0363b9516dd6563d76415faca49806ba92ccc36ca1551511d1bedc4499eab8cc9535e
6
+ metadata.gz: 8d34b474cbbde3074fd733cc3fbd6b414bfd7f20a6c1bef23da4a0213f7b488393d87f6414afe7355ab470d544c1aac976b9d0d156f1eaea7a547f0360b382c9
7
+ data.tar.gz: 9af1aebd17e05879825686d1e5a760dbe5b9291de55c3adf14afe0913c852b8d44390f08b10a56ad525a2c8d72485efe4e8877c0dd18a468191979fbfe978c2b
data/CHANGELOG.md CHANGED
@@ -1,5 +1,6 @@
1
- # 0.1.x
2
- - FIX: ....
1
+ # 0.1.1
2
+ - FEATURE: AFI reported in the alarm JSON
3
+ - FIX: alarm/exec on clearing alarm
3
4
 
4
5
  # 0.1.0
5
6
  - wooo
@@ -10,6 +10,7 @@ class Alarm
10
10
  :short => opts[:short],
11
11
  :long => opts[:long],
12
12
  :status => opts[:status],
13
+ :afi => opts[:afi],
13
14
  })
14
15
  exec stdout, CFG.exec.command, CFG.exec.arguments?
15
16
  rescue => error
@@ -19,13 +19,13 @@ class SQA
19
19
  end
20
20
  end
21
21
 
22
- def clear
22
+ def clear alarm_buffer
23
23
  if @alarm == true
24
24
  @alarm = false
25
25
  msg = { short: "#{@hostname}: clearing #{@afi} alarm" }
26
26
  msg[:long] = msg[:short]
27
27
  Log.info msg[:short]
28
- @methods.each { |alarm_method| alarm_send alarm_method, 'clear', msg, nil }
28
+ @methods.each { |alarm_method| alarm_send alarm_method, 'clear', msg, alarm_buffer }
29
29
  end
30
30
  end
31
31
 
@@ -72,12 +72,13 @@ class SQA
72
72
  msg
73
73
  end
74
74
 
75
- def alarm_send alarm_method, status, msg, alarm_buffer=nil
75
+ def alarm_send alarm_method, status, msg, alarm_buffer
76
76
  alarm_method.send(short: msg[:short],
77
77
  long: msg[:long],
78
78
  status: status,
79
79
  alarm_buffer: alarm_buffer,
80
- nodes: @nodes)
80
+ nodes: @nodes,
81
+ afi: @afi)
81
82
  end
82
83
 
83
84
  end
@@ -15,7 +15,7 @@ class SQA
15
15
  sleep INFLIGHT_WAIT
16
16
  records = records.all
17
17
  @buffer.push records.map { |record| record.peer }
18
- @buffer.exceed_median? ? @alarm.set(@buffer) : @alarm.clear
18
+ @buffer.exceed_median? ? @alarm.set(@buffer) : @alarm.clear(@buffer)
19
19
  delay = INTERVAL-(Time.now-start)
20
20
  if delay > 0
21
21
  sleep delay
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.1.0'
3
+ s.version = '0.1.1'
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.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti
@@ -9,82 +9,82 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-31 00:00:00.000000000 Z
12
+ date: 2014-08-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: slop
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - "~>"
18
+ - - ~>
19
19
  - !ruby/object:Gem::Version
20
20
  version: '3.5'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - "~>"
25
+ - - ~>
26
26
  - !ruby/object:Gem::Version
27
27
  version: '3.5'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rb-inotify
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - "~>"
32
+ - - ~>
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0.9'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - "~>"
39
+ - - ~>
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0.9'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: sequel
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ~>
47
47
  - !ruby/object:Gem::Version
48
48
  version: '4.12'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ~>
54
54
  - !ruby/object:Gem::Version
55
55
  version: '4.12'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: sqlite3
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - "~>"
60
+ - - ~>
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.3'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - "~>"
67
+ - - ~>
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.3'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: asetus
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - "~>"
74
+ - - ~>
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0.1'
77
- - - ">="
77
+ - - '>='
78
78
  - !ruby/object:Gem::Version
79
79
  version: 0.1.2
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
- - - "~>"
84
+ - - ~>
85
85
  - !ruby/object:Gem::Version
86
86
  version: '0.1'
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: 0.1.2
90
90
  description: gets list of nodes and pings from each to each storing results
@@ -132,17 +132,17 @@ require_paths:
132
132
  - lib
133
133
  required_ruby_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - ">="
135
+ - - '>='
136
136
  - !ruby/object:Gem::Version
137
137
  version: 1.9.3
138
138
  required_rubygems_version: !ruby/object:Gem::Requirement
139
139
  requirements:
140
- - - ">="
140
+ - - '>='
141
141
  - !ruby/object:Gem::Version
142
142
  version: '0'
143
143
  requirements: []
144
144
  rubyforge_project: ring-sqa
145
- rubygems_version: 2.2.2
145
+ rubygems_version: 2.0.14
146
146
  signing_key:
147
147
  specification_version: 4
148
148
  summary: NLNOG Ring SQA