aubergine 0.1.1 → 0.1.2
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 +1 -1
- data/lib/courgette/executor.rb +3 -1
- data/lib/courgette/hp.rb +32 -0
- data/lib/courgette.rb +1 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e409d0bb1f0ea8ed178eaeb66a1c9909233e3e79
|
4
|
+
data.tar.gz: 4d205939739ae62b7d90eebe4352595d242673cb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e60aae7bc388dece40916c46d3e73503385dc9be44973687d0cc3e9d7fcb3421fb188b9df513d6513e3871a1b68d82942988eae47d14198ef838c7836956ed7
|
7
|
+
data.tar.gz: 0ce67edc5ebb5c842460bce502764559eb83a5f59155d5276c7511ac3f9413dfa94782e240bdf9f1e646bc1a2a00469b74cac4439fcf202aa07bd7ee52ffee05
|
data/lib/courgette/device.rb
CHANGED
data/lib/courgette/executor.rb
CHANGED
@@ -31,7 +31,9 @@ module Courgette
|
|
31
31
|
rescue Errno::ECONNREFUSED
|
32
32
|
logger.info "#{device.ip} is unreachable (connection refused)"
|
33
33
|
rescue Net::SSH::Exception => e
|
34
|
-
|
34
|
+
logger.info "#{device.ip} ssh error (#{e.message})"
|
35
|
+
rescue => e
|
36
|
+
logger.info "#{device.ip} fatal error (#{e.message})"
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
data/lib/courgette/hp.rb
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
module Courgette
|
2
|
+
class HP
|
3
|
+
def initialize(ip, credentials, verbose = false)
|
4
|
+
@ip = ip
|
5
|
+
@credentials = credentials
|
6
|
+
end
|
7
|
+
|
8
|
+
def enable
|
9
|
+
end
|
10
|
+
|
11
|
+
def connect
|
12
|
+
end
|
13
|
+
|
14
|
+
def configuration
|
15
|
+
begin
|
16
|
+
data = ""
|
17
|
+
Net::SFTP.start(@ip, @credentials.user, :password => @credentials.password) do |sftp|
|
18
|
+
data = sftp.download!("/cfg/running-config")
|
19
|
+
end
|
20
|
+
data
|
21
|
+
rescue IOError => e
|
22
|
+
data
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def save
|
27
|
+
end
|
28
|
+
|
29
|
+
def disconnect
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/lib/courgette.rb
CHANGED
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.2
|
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-07-
|
11
|
+
date: 2013-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: commutateurs
|
@@ -89,6 +89,7 @@ files:
|
|
89
89
|
- lib/aubergine/path.rb
|
90
90
|
- lib/aubergine/satellite.rb
|
91
91
|
- lib/aubergine/server.rb
|
92
|
+
- lib/courgette/hp.rb
|
92
93
|
- lib/courgette/client.rb
|
93
94
|
- lib/courgette/device.rb
|
94
95
|
- lib/courgette/executor.rb
|