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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c5514f15169f27063af1929c38010fdf4e55f64
4
- data.tar.gz: cf3d1454931fdc5498d5e2b0be5005a0f89e5c2c
3
+ metadata.gz: 2a4c97556cd0192da5dc5a9919e453ae268e11b6
4
+ data.tar.gz: 10753a0c8b874b989c6e1a08d6dcf48dc5275b30
5
5
  SHA512:
6
- metadata.gz: e5a01a68717a9651c57bd1417d9813f6aeff9d3292299cb1b4f78dec09c529dd9239516ab8d3ba3d6f37002ad9e8ee6bc9d866184502ef68769e36ecfbcafd8d
7
- data.tar.gz: 756dbbde4d557a8e0d5da3d53d12544b18879271a6c45fda72d83bca45936219b52a1ff17485d75f958a142e7dcdcc671f9e3d8bc3a4e31590455b2fdb70a140
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
@@ -0,0 +1,5 @@
1
+
2
+ 1.6.0 / 2017-11-20
3
+ ==================
4
+
5
+ * Ignoring ALL clean-up errors in OCCI compute probe
data/lib/nagios/promoo.rb CHANGED
@@ -5,7 +5,7 @@ require 'timeout'
5
5
  require 'ox'
6
6
  require 'multi_xml'
7
7
  require 'httparty'
8
- require 'date'
8
+ require 'time'
9
9
 
10
10
  # Force multi_xml to use ox
11
11
  MultiXml.parser = :ox
@@ -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 DateTime.parse(list['dc:date:expires']) > Time.now
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 = DateTime.parse list['dc:date:created']
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' ? true : false
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
- raise 'You have to specifiy a kind' if kind.blank?
145
+ return if kind.blank?
146
146
 
147
147
  client.describe(kind).each do |instance|
148
- raise 'Attempting to clean up title-less instance' unless instance.respond_to?(:title)
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)
@@ -1,7 +1,7 @@
1
1
  module Nagios
2
2
  module Promoo
3
3
  module Occi
4
- VERSION = '1.4.0'.freeze
4
+ VERSION = '1.5.0'.freeze
5
5
  end
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  module Nagios
2
2
  module Promoo
3
- VERSION = '1.5.0'.freeze
3
+ VERSION = '1.6.0'.freeze
4
4
  end
5
5
  end
@@ -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 'pry', '>= 0.10', '< 1'
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.5.0
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-10-10 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: occi-api
14
+ name: activesupport
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 4.3.15
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.3.15
29
+ version: '4.0'
30
30
  - - "<"
31
31
  - !ruby/object:Gem::Version
32
32
  version: '5'
33
33
  - !ruby/object:Gem::Dependency
34
- name: opennebula
34
+ name: httparty
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - ">="
38
38
  - !ruby/object:Gem::Version
39
- version: 5.2.1
39
+ version: '0.14'
40
40
  - - "<"
41
41
  - !ruby/object:Gem::Version
42
- version: '6'
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: 5.2.1
49
+ version: '0.14'
50
50
  - - "<"
51
51
  - !ruby/object:Gem::Version
52
- version: '6'
52
+ version: '1'
53
53
  - !ruby/object:Gem::Dependency
54
- name: thor
54
+ name: occi-api
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 0.19.4
59
+ version: 4.3.15
60
60
  - - "<"
61
61
  - !ruby/object:Gem::Version
62
- version: '1'
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: 0.19.4
69
+ version: 4.3.15
70
70
  - - "<"
71
71
  - !ruby/object:Gem::Version
72
- version: '1'
72
+ version: '5'
73
73
  - !ruby/object:Gem::Dependency
74
- name: yell
74
+ name: opennebula
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
- version: 2.0.7
79
+ version: 5.2.1
80
80
  - - "<"
81
81
  - !ruby/object:Gem::Version
82
- version: '3'
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.0.7
89
+ version: 5.2.1
90
90
  - - "<"
91
91
  - !ruby/object:Gem::Version
92
- version: '3'
92
+ version: '6'
93
93
  - !ruby/object:Gem::Dependency
94
- name: activesupport
94
+ name: ox
95
95
  requirement: !ruby/object:Gem::Requirement
96
96
  requirements:
97
97
  - - ">="
98
98
  - !ruby/object:Gem::Version
99
- version: '4.0'
99
+ version: 2.4.9
100
100
  - - "<"
101
101
  - !ruby/object:Gem::Version
102
- version: '5'
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: '4.0'
109
+ version: 2.4.9
110
110
  - - "<"
111
111
  - !ruby/object:Gem::Version
112
- version: '5'
112
+ version: '3'
113
113
  - !ruby/object:Gem::Dependency
114
- name: httparty
114
+ name: thor
115
115
  requirement: !ruby/object:Gem::Requirement
116
116
  requirements:
117
117
  - - ">="
118
118
  - !ruby/object:Gem::Version
119
- version: '0.14'
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: '0.14'
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: ox
134
+ name: yell
135
135
  requirement: !ruby/object:Gem::Requirement
136
136
  requirements:
137
137
  - - ">="
138
138
  - !ruby/object:Gem::Version
139
- version: 2.4.9
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.4.9
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: rake
174
+ name: pry
175
175
  requirement: !ruby/object:Gem::Requirement
176
176
  requirements:
177
177
  - - ">="
178
178
  - !ruby/object:Gem::Version
179
- version: '10.0'
179
+ version: '0.10'
180
180
  - - "<"
181
181
  - !ruby/object:Gem::Version
182
- version: '13'
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.0'
189
+ version: '0.10'
190
190
  - - "<"
191
191
  - !ruby/object:Gem::Version
192
- version: '13'
192
+ version: '1'
193
193
  - !ruby/object:Gem::Dependency
194
- name: rspec
194
+ name: rake
195
195
  requirement: !ruby/object:Gem::Requirement
196
196
  requirements:
197
197
  - - ">="
198
198
  - !ruby/object:Gem::Version
199
- version: '3.0'
199
+ version: '10.0'
200
200
  - - "<"
201
201
  - !ruby/object:Gem::Version
202
- version: '4'
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: '3.0'
209
+ version: '10.0'
210
210
  - - "<"
211
211
  - !ruby/object:Gem::Version
212
- version: '4'
212
+ version: '13'
213
213
  - !ruby/object:Gem::Dependency
214
- name: simplecov
214
+ name: rspec
215
215
  requirement: !ruby/object:Gem::Requirement
216
216
  requirements:
217
217
  - - ">="
218
218
  - !ruby/object:Gem::Version
219
- version: '0.13'
219
+ version: '3.0'
220
220
  - - "<"
221
221
  - !ruby/object:Gem::Version
222
- version: '1'
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.13'
229
+ version: '3.0'
230
230
  - - "<"
231
231
  - !ruby/object:Gem::Version
232
- version: '1'
232
+ version: '4'
233
233
  - !ruby/object:Gem::Dependency
234
- name: rubygems-tasks
234
+ name: rubocop
235
235
  requirement: !ruby/object:Gem::Requirement
236
236
  requirements:
237
237
  - - ">="
238
238
  - !ruby/object:Gem::Version
239
- version: 0.2.4
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.2.4
249
+ version: '0.47'
250
250
  - - "<"
251
251
  - !ruby/object:Gem::Version
252
252
  version: '1'
253
253
  - !ruby/object:Gem::Dependency
254
- name: rubocop
254
+ name: rubygems-tasks
255
255
  requirement: !ruby/object:Gem::Requirement
256
256
  requirements:
257
257
  - - ">="
258
258
  - !ruby/object:Gem::Version
259
- version: '0.47'
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: '0.47'
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: pry
274
+ name: simplecov
275
275
  requirement: !ruby/object:Gem::Requirement
276
276
  requirements:
277
277
  - - ">="
278
278
  - !ruby/object:Gem::Version
279
- version: '0.10'
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.10'
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