aubergine 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/courgette/device.rb +4 -0
- data/lib/courgette/executor.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbd245eb5a6a731030236852129ed5d86ba0e290
|
4
|
+
data.tar.gz: 95b8d3a1205d21683625389c565bfe2cbd2968c2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a84cf8e1aeea4ba8a4ba7314542467ba68593838ed06f053fdfe544f3407eb1b3d09660b521c98f7907cbb39e5992be10cc699fbe1be76a58ae6c09843d8b36a
|
7
|
+
data.tar.gz: 1574491532391e03889e2f18ebe71907c619a2cc9c29d54f8cd9ec623792da39a75cbb03239cf5169150fab36009c7a3c885c34c22ed133c10701d7507363c7b
|
data/lib/courgette/device.rb
CHANGED
data/lib/courgette/executor.rb
CHANGED
@@ -13,7 +13,7 @@ module Courgette
|
|
13
13
|
begin
|
14
14
|
Timeout::timeout(240) { fetch_and_update(device) }
|
15
15
|
rescue
|
16
|
-
logger.info "#{device
|
16
|
+
logger.info "#{device} execution too long (timeout)"
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -21,19 +21,19 @@ module Courgette
|
|
21
21
|
def fetch_and_update(device)
|
22
22
|
begin
|
23
23
|
status = client.update_device(device.ip, device.fetch)
|
24
|
-
logger.info "#{device
|
24
|
+
logger.info "#{device} #{status}"
|
25
25
|
rescue Timeout::Error
|
26
|
-
logger.info "#{device
|
26
|
+
logger.info "#{device} is unreachable (timeout)"
|
27
27
|
rescue Net::SSH::Disconnect
|
28
|
-
logger.info "#{device
|
28
|
+
logger.info "#{device} is unreachable (disconnect)"
|
29
29
|
rescue Net::SSH::AuthenticationFailed
|
30
|
-
logger.info "#{device
|
30
|
+
logger.info "#{device} credentials are incorrect"
|
31
31
|
rescue Errno::ECONNREFUSED
|
32
|
-
logger.info "#{device
|
32
|
+
logger.info "#{device} is unreachable (connection refused)"
|
33
33
|
rescue Net::SSH::Exception => e
|
34
|
-
logger.info "#{device
|
34
|
+
logger.info "#{device} ssh error (#{e.message})"
|
35
35
|
rescue => e
|
36
|
-
logger.info "#{device
|
36
|
+
logger.info "#{device} fatal error (#{e.class} - #{e.message})"
|
37
37
|
end
|
38
38
|
end
|
39
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aubergine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Guillaume Rose
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commutateurs
|