nagios-promoo 1.5.0 → 1.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +15 -0
- data/History.md +5 -0
- data/lib/nagios/promoo.rb +1 -1
- data/lib/nagios/promoo/appdb/probes/sync_probe.rb +2 -2
- data/lib/nagios/promoo/occi/probes/base_probe.rb +1 -1
- data/lib/nagios/promoo/occi/probes/compute_probe.rb +4 -3
- data/lib/nagios/promoo/occi/version.rb +1 -1
- data/lib/nagios/promoo/version.rb +1 -1
- data/nagios-promoo.gemspec +6 -8
- metadata +56 -55
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a4c97556cd0192da5dc5a9919e453ae268e11b6
|
4
|
+
data.tar.gz: 10753a0c8b874b989c6e1a08d6dcf48dc5275b30
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd5cf2d9e47bb4a8ecd46eea83c9e092b2b6411bb20187c5f67b086fc2bd17f18ad3182244ebc5a458e8c5aaf68a4ab31d9ee66fc7819da21ca9806b667a4fc9
|
7
|
+
data.tar.gz: f0131cefac9ffaa2125bcfde5cce57f6dc571eb382b1c4865a53fd03db8f286062e03232c0368c3d49191c6854ff34f45fa8e2aa8dcda3b8169c47587c868ab0
|
data/.rubocop_todo.yml
CHANGED
@@ -27,3 +27,18 @@ Metrics/MethodLength:
|
|
27
27
|
# Offense count: 3
|
28
28
|
Metrics/PerceivedComplexity:
|
29
29
|
Max: 10
|
30
|
+
|
31
|
+
#
|
32
|
+
Lint/RescueWithoutErrorClass:
|
33
|
+
Exclude:
|
34
|
+
- '**/*'
|
35
|
+
|
36
|
+
#
|
37
|
+
Style/CommentedKeyword:
|
38
|
+
Exclude:
|
39
|
+
- 'lib/nagios/promoo/*/master.rb'
|
40
|
+
|
41
|
+
#
|
42
|
+
Lint/HandleExceptions:
|
43
|
+
Exclude:
|
44
|
+
- 'lib/nagios/promoo/occi/probes/compute_probe.rb'
|
data/History.md
ADDED
data/lib/nagios/promoo.rb
CHANGED
@@ -136,11 +136,11 @@ module Nagios
|
|
136
136
|
raise "AppDB image list #{list_url.inspect} is empty or malformed" unless list && list['hv:imagelist']
|
137
137
|
|
138
138
|
list = list['hv:imagelist']
|
139
|
-
unless
|
139
|
+
unless Time.parse(list['dc:date:expires']) > Time.now
|
140
140
|
raise "AppDB image list #{list_url.inspect} has expired"
|
141
141
|
end
|
142
142
|
raise "AppDB image list #{list_url.inspect} doesn't contain images" unless list['hv:images']
|
143
|
-
@_last_update =
|
143
|
+
@_last_update = Time.parse(list['dc:date:created'])
|
144
144
|
|
145
145
|
@_hv_images = list['hv:images'].collect { |im| im['hv:image'] }
|
146
146
|
@_hv_images.reject! { |im| im.blank? || im['ad:mpuri'].blank? }
|
@@ -27,7 +27,7 @@ module Nagios
|
|
27
27
|
user_cert_password: nil,
|
28
28
|
token: options[:token],
|
29
29
|
ca_path: options[:ca_path],
|
30
|
-
voms: options[:auth] == 'x509-voms'
|
30
|
+
voms: options[:auth] == 'x509-voms'
|
31
31
|
},
|
32
32
|
log: {
|
33
33
|
level: options[:debug] ? ::Occi::Api::Log::DEBUG : ::Occi::Api::Log::ERROR,
|
@@ -142,14 +142,15 @@ module Nagios
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def search_and_destroy(kind)
|
145
|
-
|
145
|
+
return if kind.blank?
|
146
146
|
|
147
147
|
client.describe(kind).each do |instance|
|
148
|
-
|
149
|
-
raise 'Attempting to clean up location-less instance' unless instance.respond_to?(:location)
|
148
|
+
next unless instance.respond_to?(:title) && instance.respond_to?(:location)
|
150
149
|
next unless instance.title.start_with?(COMPUTE_NAME_PREFIX)
|
151
150
|
client.delete instance.location
|
152
151
|
end
|
152
|
+
rescue => _ex
|
153
|
+
# ignore all errors here
|
153
154
|
end
|
154
155
|
|
155
156
|
def wait4ready(link)
|
data/nagios-promoo.gemspec
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
|
3
1
|
lib = File.expand_path('../lib', __FILE__)
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
require 'nagios/promoo/version'
|
@@ -19,21 +17,21 @@ Gem::Specification.new do |spec|
|
|
19
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
18
|
spec.require_paths = ['lib']
|
21
19
|
|
20
|
+
spec.add_runtime_dependency 'activesupport', '>= 4.0', '< 5'
|
21
|
+
spec.add_runtime_dependency 'httparty', '>= 0.14', '< 1'
|
22
22
|
spec.add_runtime_dependency 'occi-api', '>= 4.3.15', '< 5'
|
23
23
|
spec.add_runtime_dependency 'opennebula', '>= 5.2.1', '< 6'
|
24
|
+
spec.add_runtime_dependency 'ox', '>= 2.4.9', '< 3'
|
24
25
|
spec.add_runtime_dependency 'thor', '>= 0.19.4', '< 1'
|
25
26
|
spec.add_runtime_dependency 'yell', '>= 2.0.7', '< 3'
|
26
|
-
spec.add_runtime_dependency 'activesupport', '>= 4.0', '< 5'
|
27
|
-
spec.add_runtime_dependency 'httparty', '>= 0.14', '< 1'
|
28
|
-
spec.add_runtime_dependency 'ox', '>= 2.4.9', '< 3'
|
29
27
|
|
30
28
|
spec.add_development_dependency 'bundler', '>= 1.8', '< 2'
|
29
|
+
spec.add_development_dependency 'pry', '>= 0.10', '< 1'
|
31
30
|
spec.add_development_dependency 'rake', '>= 10.0', '< 13'
|
32
31
|
spec.add_development_dependency 'rspec', '>= 3.0', '< 4'
|
33
|
-
spec.add_development_dependency 'simplecov', '>= 0.13', '< 1'
|
34
|
-
spec.add_development_dependency 'rubygems-tasks', '>= 0.2.4', '< 1'
|
35
32
|
spec.add_development_dependency 'rubocop', '>= 0.47', '< 1'
|
36
|
-
spec.add_development_dependency '
|
33
|
+
spec.add_development_dependency 'rubygems-tasks', '>= 0.2.4', '< 1'
|
34
|
+
spec.add_development_dependency 'simplecov', '>= 0.13', '< 1'
|
37
35
|
|
38
36
|
spec.required_ruby_version = '>= 2.2.0'
|
39
37
|
end
|
metadata
CHANGED
@@ -1,22 +1,22 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nagios-promoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Parak
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: activesupport
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: '4.0'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: '5'
|
@@ -26,97 +26,97 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.
|
29
|
+
version: '4.0'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: '5'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: httparty
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version:
|
39
|
+
version: '0.14'
|
40
40
|
- - "<"
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version: '
|
42
|
+
version: '1'
|
43
43
|
type: :runtime
|
44
44
|
prerelease: false
|
45
45
|
version_requirements: !ruby/object:Gem::Requirement
|
46
46
|
requirements:
|
47
47
|
- - ">="
|
48
48
|
- !ruby/object:Gem::Version
|
49
|
-
version:
|
49
|
+
version: '0.14'
|
50
50
|
- - "<"
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version: '
|
52
|
+
version: '1'
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
54
|
+
name: occi-api
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - ">="
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
59
|
+
version: 4.3.15
|
60
60
|
- - "<"
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: '
|
62
|
+
version: '5'
|
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
|
-
version:
|
69
|
+
version: 4.3.15
|
70
70
|
- - "<"
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
72
|
+
version: '5'
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
|
-
name:
|
74
|
+
name: opennebula
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - ">="
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: 2.
|
79
|
+
version: 5.2.1
|
80
80
|
- - "<"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '6'
|
83
83
|
type: :runtime
|
84
84
|
prerelease: false
|
85
85
|
version_requirements: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 5.2.1
|
90
90
|
- - "<"
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version: '
|
92
|
+
version: '6'
|
93
93
|
- !ruby/object:Gem::Dependency
|
94
|
-
name:
|
94
|
+
name: ox
|
95
95
|
requirement: !ruby/object:Gem::Requirement
|
96
96
|
requirements:
|
97
97
|
- - ">="
|
98
98
|
- !ruby/object:Gem::Version
|
99
|
-
version:
|
99
|
+
version: 2.4.9
|
100
100
|
- - "<"
|
101
101
|
- !ruby/object:Gem::Version
|
102
|
-
version: '
|
102
|
+
version: '3'
|
103
103
|
type: :runtime
|
104
104
|
prerelease: false
|
105
105
|
version_requirements: !ruby/object:Gem::Requirement
|
106
106
|
requirements:
|
107
107
|
- - ">="
|
108
108
|
- !ruby/object:Gem::Version
|
109
|
-
version:
|
109
|
+
version: 2.4.9
|
110
110
|
- - "<"
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: '
|
112
|
+
version: '3'
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
|
-
name:
|
114
|
+
name: thor
|
115
115
|
requirement: !ruby/object:Gem::Requirement
|
116
116
|
requirements:
|
117
117
|
- - ">="
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version:
|
119
|
+
version: 0.19.4
|
120
120
|
- - "<"
|
121
121
|
- !ruby/object:Gem::Version
|
122
122
|
version: '1'
|
@@ -126,17 +126,17 @@ dependencies:
|
|
126
126
|
requirements:
|
127
127
|
- - ">="
|
128
128
|
- !ruby/object:Gem::Version
|
129
|
-
version:
|
129
|
+
version: 0.19.4
|
130
130
|
- - "<"
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '1'
|
133
133
|
- !ruby/object:Gem::Dependency
|
134
|
-
name:
|
134
|
+
name: yell
|
135
135
|
requirement: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
137
|
- - ">="
|
138
138
|
- !ruby/object:Gem::Version
|
139
|
-
version: 2.
|
139
|
+
version: 2.0.7
|
140
140
|
- - "<"
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '3'
|
@@ -146,7 +146,7 @@ dependencies:
|
|
146
146
|
requirements:
|
147
147
|
- - ">="
|
148
148
|
- !ruby/object:Gem::Version
|
149
|
-
version: 2.
|
149
|
+
version: 2.0.7
|
150
150
|
- - "<"
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '3'
|
@@ -171,72 +171,72 @@ dependencies:
|
|
171
171
|
- !ruby/object:Gem::Version
|
172
172
|
version: '2'
|
173
173
|
- !ruby/object:Gem::Dependency
|
174
|
-
name:
|
174
|
+
name: pry
|
175
175
|
requirement: !ruby/object:Gem::Requirement
|
176
176
|
requirements:
|
177
177
|
- - ">="
|
178
178
|
- !ruby/object:Gem::Version
|
179
|
-
version: '10
|
179
|
+
version: '0.10'
|
180
180
|
- - "<"
|
181
181
|
- !ruby/object:Gem::Version
|
182
|
-
version: '
|
182
|
+
version: '1'
|
183
183
|
type: :development
|
184
184
|
prerelease: false
|
185
185
|
version_requirements: !ruby/object:Gem::Requirement
|
186
186
|
requirements:
|
187
187
|
- - ">="
|
188
188
|
- !ruby/object:Gem::Version
|
189
|
-
version: '10
|
189
|
+
version: '0.10'
|
190
190
|
- - "<"
|
191
191
|
- !ruby/object:Gem::Version
|
192
|
-
version: '
|
192
|
+
version: '1'
|
193
193
|
- !ruby/object:Gem::Dependency
|
194
|
-
name:
|
194
|
+
name: rake
|
195
195
|
requirement: !ruby/object:Gem::Requirement
|
196
196
|
requirements:
|
197
197
|
- - ">="
|
198
198
|
- !ruby/object:Gem::Version
|
199
|
-
version: '
|
199
|
+
version: '10.0'
|
200
200
|
- - "<"
|
201
201
|
- !ruby/object:Gem::Version
|
202
|
-
version: '
|
202
|
+
version: '13'
|
203
203
|
type: :development
|
204
204
|
prerelease: false
|
205
205
|
version_requirements: !ruby/object:Gem::Requirement
|
206
206
|
requirements:
|
207
207
|
- - ">="
|
208
208
|
- !ruby/object:Gem::Version
|
209
|
-
version: '
|
209
|
+
version: '10.0'
|
210
210
|
- - "<"
|
211
211
|
- !ruby/object:Gem::Version
|
212
|
-
version: '
|
212
|
+
version: '13'
|
213
213
|
- !ruby/object:Gem::Dependency
|
214
|
-
name:
|
214
|
+
name: rspec
|
215
215
|
requirement: !ruby/object:Gem::Requirement
|
216
216
|
requirements:
|
217
217
|
- - ">="
|
218
218
|
- !ruby/object:Gem::Version
|
219
|
-
version: '0
|
219
|
+
version: '3.0'
|
220
220
|
- - "<"
|
221
221
|
- !ruby/object:Gem::Version
|
222
|
-
version: '
|
222
|
+
version: '4'
|
223
223
|
type: :development
|
224
224
|
prerelease: false
|
225
225
|
version_requirements: !ruby/object:Gem::Requirement
|
226
226
|
requirements:
|
227
227
|
- - ">="
|
228
228
|
- !ruby/object:Gem::Version
|
229
|
-
version: '0
|
229
|
+
version: '3.0'
|
230
230
|
- - "<"
|
231
231
|
- !ruby/object:Gem::Version
|
232
|
-
version: '
|
232
|
+
version: '4'
|
233
233
|
- !ruby/object:Gem::Dependency
|
234
|
-
name:
|
234
|
+
name: rubocop
|
235
235
|
requirement: !ruby/object:Gem::Requirement
|
236
236
|
requirements:
|
237
237
|
- - ">="
|
238
238
|
- !ruby/object:Gem::Version
|
239
|
-
version: 0.
|
239
|
+
version: '0.47'
|
240
240
|
- - "<"
|
241
241
|
- !ruby/object:Gem::Version
|
242
242
|
version: '1'
|
@@ -246,17 +246,17 @@ dependencies:
|
|
246
246
|
requirements:
|
247
247
|
- - ">="
|
248
248
|
- !ruby/object:Gem::Version
|
249
|
-
version: 0.
|
249
|
+
version: '0.47'
|
250
250
|
- - "<"
|
251
251
|
- !ruby/object:Gem::Version
|
252
252
|
version: '1'
|
253
253
|
- !ruby/object:Gem::Dependency
|
254
|
-
name:
|
254
|
+
name: rubygems-tasks
|
255
255
|
requirement: !ruby/object:Gem::Requirement
|
256
256
|
requirements:
|
257
257
|
- - ">="
|
258
258
|
- !ruby/object:Gem::Version
|
259
|
-
version:
|
259
|
+
version: 0.2.4
|
260
260
|
- - "<"
|
261
261
|
- !ruby/object:Gem::Version
|
262
262
|
version: '1'
|
@@ -266,17 +266,17 @@ dependencies:
|
|
266
266
|
requirements:
|
267
267
|
- - ">="
|
268
268
|
- !ruby/object:Gem::Version
|
269
|
-
version:
|
269
|
+
version: 0.2.4
|
270
270
|
- - "<"
|
271
271
|
- !ruby/object:Gem::Version
|
272
272
|
version: '1'
|
273
273
|
- !ruby/object:Gem::Dependency
|
274
|
-
name:
|
274
|
+
name: simplecov
|
275
275
|
requirement: !ruby/object:Gem::Requirement
|
276
276
|
requirements:
|
277
277
|
- - ">="
|
278
278
|
- !ruby/object:Gem::Version
|
279
|
-
version: '0.
|
279
|
+
version: '0.13'
|
280
280
|
- - "<"
|
281
281
|
- !ruby/object:Gem::Version
|
282
282
|
version: '1'
|
@@ -286,7 +286,7 @@ dependencies:
|
|
286
286
|
requirements:
|
287
287
|
- - ">="
|
288
288
|
- !ruby/object:Gem::Version
|
289
|
-
version: '0.
|
289
|
+
version: '0.13'
|
290
290
|
- - "<"
|
291
291
|
- !ruby/object:Gem::Version
|
292
292
|
version: '1'
|
@@ -303,6 +303,7 @@ files:
|
|
303
303
|
- ".rubocop_todo.yml"
|
304
304
|
- ".travis.yml"
|
305
305
|
- Gemfile
|
306
|
+
- History.md
|
306
307
|
- LICENSE.txt
|
307
308
|
- README.md
|
308
309
|
- Rakefile
|