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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60844ff7abd03bc96c6e26bfb9b06b1cfa73ba31
4
- data.tar.gz: 2ae27972b2aee0a16f9618dc2fcc3318c3eb7baf
3
+ metadata.gz: cbd245eb5a6a731030236852129ed5d86ba0e290
4
+ data.tar.gz: 95b8d3a1205d21683625389c565bfe2cbd2968c2
5
5
  SHA512:
6
- metadata.gz: b2638970c9937136aa23210c2eaae1d819d36de51db0cb3f43d9b98ca5f88d53d799a7940a68bc8e1dee2cea0cdc23000c94ff0102c8f10924c65b48e0196adb
7
- data.tar.gz: f823449cf8c249acc67e57d9982479d172e6692654e4a318001feb4b634ef5be376f77bc93d09e250acdbf23bccb3d26c5d985f76bc34e3da3f0cc0904f8f596
6
+ metadata.gz: a84cf8e1aeea4ba8a4ba7314542467ba68593838ed06f053fdfe544f3407eb1b3d09660b521c98f7907cbb39e5992be10cc699fbe1be76a58ae6c09843d8b36a
7
+ data.tar.gz: 1574491532391e03889e2f18ebe71907c619a2cc9c29d54f8cd9ec623792da39a75cbb03239cf5169150fab36009c7a3c885c34c22ed133c10701d7507363c7b
@@ -12,5 +12,9 @@ module Courgette
12
12
  chain = Chain.all.find { |chain| chain.responsible_of(@vendor) }
13
13
  chain ? chain.apply(@ip, @details) : raise("Vendor not found")
14
14
  end
15
+
16
+ def to_s
17
+ "#{ip}/#{vendor}"
18
+ end
15
19
  end
16
20
  end
@@ -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.ip} execution too long (timeout)"
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.ip} #{status}"
24
+ logger.info "#{device} #{status}"
25
25
  rescue Timeout::Error
26
- logger.info "#{device.ip} is unreachable (timeout)"
26
+ logger.info "#{device} is unreachable (timeout)"
27
27
  rescue Net::SSH::Disconnect
28
- logger.info "#{device.ip} is unreachable (disconnect)"
28
+ logger.info "#{device} is unreachable (disconnect)"
29
29
  rescue Net::SSH::AuthenticationFailed
30
- logger.info "#{device.ip} credentials are incorrect"
30
+ logger.info "#{device} credentials are incorrect"
31
31
  rescue Errno::ECONNREFUSED
32
- logger.info "#{device.ip} is unreachable (connection refused)"
32
+ logger.info "#{device} is unreachable (connection refused)"
33
33
  rescue Net::SSH::Exception => e
34
- logger.info "#{device.ip} ssh error (#{e.message})"
34
+ logger.info "#{device} ssh error (#{e.message})"
35
35
  rescue => e
36
- logger.info "#{device.ip} fatal error (#{e.message})"
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.8
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-08 00:00:00.000000000 Z
11
+ date: 2013-08-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commutateurs