snmpjr 0.2.2-java → 0.3.0-java
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/.semver +2 -2
- data/README.md +33 -10
- data/history.rdoc +2 -0
- data/lib/snmpjr/configuration.rb +13 -0
- data/lib/snmpjr/configuration_v2c.rb +22 -0
- data/lib/snmpjr/configuration_v3.rb +51 -0
- data/lib/snmpjr/getter.rb +18 -19
- data/lib/snmpjr/{pdu.rb → pdu_v2c.rb} +8 -5
- data/lib/snmpjr/pdu_v3.rb +14 -0
- data/lib/snmpjr/{session.rb → session_v2c.rb} +4 -2
- data/lib/snmpjr/session_v3.rb +63 -0
- data/lib/snmpjr/target_v2c.rb +18 -0
- data/lib/snmpjr/target_v3.rb +18 -0
- data/lib/snmpjr/version.rb +4 -1
- data/lib/snmpjr/walker.rb +3 -2
- data/lib/snmpjr/wrappers/mp.rb +9 -0
- data/lib/snmpjr/wrappers/security.rb +9 -0
- data/lib/snmpjr.rb +29 -31
- data/snmpjr.gemspec +1 -1
- data/spec/integration/{snmpjr_get_spec.rb → snmp_v2c/snmpjr_get_spec.rb} +18 -5
- data/spec/integration/{snmpjr_walk_spec.rb → snmp_v2c/snmpjr_walk_spec.rb} +20 -5
- data/spec/integration/snmp_v3/snmpjr_get_spec.rb +67 -0
- data/spec/integration/snmp_v3/snmpjr_walk_spec.rb +54 -0
- data/spec/snmpjr/configuration_v2c_spec.rb +30 -0
- data/spec/snmpjr/configuration_v3_spec.rb +90 -0
- data/spec/snmpjr/getter_spec.rb +24 -27
- data/spec/snmpjr/{pdu_spec.rb → pdu_v2c_spec.rb} +2 -2
- data/spec/snmpjr/pdu_v3_spec.rb +17 -0
- data/spec/snmpjr/{session_spec.rb → session_v2c_spec.rb} +1 -1
- data/spec/snmpjr/session_v3_spec.rb +22 -0
- data/spec/snmpjr/{target_spec.rb → target_v2c_spec.rb} +16 -7
- data/spec/snmpjr/target_v3_spec.rb +50 -0
- data/spec/snmpjr/walker_spec.rb +1 -2
- data/spec/snmpjr_spec.rb +68 -35
- metadata +37 -16
- data/lib/snmpjr/target.rb +0 -17
- data/lib/snmpjr/target_timeout_error.rb +0 -5
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snmpjr
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: java
|
6
6
|
authors:
|
7
7
|
- Zen Kyprianou
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake-n-bake
|
@@ -156,27 +156,41 @@ files:
|
|
156
156
|
- Rakefile
|
157
157
|
- history.rdoc
|
158
158
|
- lib/snmpjr.rb
|
159
|
+
- lib/snmpjr/configuration.rb
|
160
|
+
- lib/snmpjr/configuration_v2c.rb
|
161
|
+
- lib/snmpjr/configuration_v3.rb
|
159
162
|
- lib/snmpjr/getter.rb
|
160
|
-
- lib/snmpjr/
|
163
|
+
- lib/snmpjr/pdu_v2c.rb
|
164
|
+
- lib/snmpjr/pdu_v3.rb
|
161
165
|
- lib/snmpjr/response.rb
|
162
|
-
- lib/snmpjr/
|
163
|
-
- lib/snmpjr/
|
164
|
-
- lib/snmpjr/
|
166
|
+
- lib/snmpjr/session_v2c.rb
|
167
|
+
- lib/snmpjr/session_v3.rb
|
168
|
+
- lib/snmpjr/target_v2c.rb
|
169
|
+
- lib/snmpjr/target_v3.rb
|
165
170
|
- lib/snmpjr/version.rb
|
166
171
|
- lib/snmpjr/walker.rb
|
172
|
+
- lib/snmpjr/wrappers/mp.rb
|
173
|
+
- lib/snmpjr/wrappers/security.rb
|
167
174
|
- lib/snmpjr/wrappers/smi.rb
|
168
175
|
- lib/snmpjr/wrappers/snmp4j-2.3.1.jar
|
169
176
|
- lib/snmpjr/wrappers/snmp4j.rb
|
170
177
|
- lib/snmpjr/wrappers/transport.rb
|
171
178
|
- lib/snmpjr/wrappers/util.rb
|
172
179
|
- snmpjr.gemspec
|
173
|
-
- spec/integration/snmpjr_get_spec.rb
|
174
|
-
- spec/integration/snmpjr_walk_spec.rb
|
180
|
+
- spec/integration/snmp_v2c/snmpjr_get_spec.rb
|
181
|
+
- spec/integration/snmp_v2c/snmpjr_walk_spec.rb
|
182
|
+
- spec/integration/snmp_v3/snmpjr_get_spec.rb
|
183
|
+
- spec/integration/snmp_v3/snmpjr_walk_spec.rb
|
184
|
+
- spec/snmpjr/configuration_v2c_spec.rb
|
185
|
+
- spec/snmpjr/configuration_v3_spec.rb
|
175
186
|
- spec/snmpjr/getter_spec.rb
|
176
|
-
- spec/snmpjr/
|
187
|
+
- spec/snmpjr/pdu_v2c_spec.rb
|
188
|
+
- spec/snmpjr/pdu_v3_spec.rb
|
177
189
|
- spec/snmpjr/response_spec.rb
|
178
|
-
- spec/snmpjr/
|
179
|
-
- spec/snmpjr/
|
190
|
+
- spec/snmpjr/session_v2c_spec.rb
|
191
|
+
- spec/snmpjr/session_v3_spec.rb
|
192
|
+
- spec/snmpjr/target_v2c_spec.rb
|
193
|
+
- spec/snmpjr/target_v3_spec.rb
|
180
194
|
- spec/snmpjr/walker_spec.rb
|
181
195
|
- spec/snmpjr_spec.rb
|
182
196
|
- spec/spec_helper.rb
|
@@ -205,13 +219,20 @@ signing_key:
|
|
205
219
|
specification_version: 4
|
206
220
|
summary: Simple SNMP interface for JRuby
|
207
221
|
test_files:
|
208
|
-
- spec/integration/snmpjr_get_spec.rb
|
209
|
-
- spec/integration/snmpjr_walk_spec.rb
|
222
|
+
- spec/integration/snmp_v2c/snmpjr_get_spec.rb
|
223
|
+
- spec/integration/snmp_v2c/snmpjr_walk_spec.rb
|
224
|
+
- spec/integration/snmp_v3/snmpjr_get_spec.rb
|
225
|
+
- spec/integration/snmp_v3/snmpjr_walk_spec.rb
|
226
|
+
- spec/snmpjr/configuration_v2c_spec.rb
|
227
|
+
- spec/snmpjr/configuration_v3_spec.rb
|
210
228
|
- spec/snmpjr/getter_spec.rb
|
211
|
-
- spec/snmpjr/
|
229
|
+
- spec/snmpjr/pdu_v2c_spec.rb
|
230
|
+
- spec/snmpjr/pdu_v3_spec.rb
|
212
231
|
- spec/snmpjr/response_spec.rb
|
213
|
-
- spec/snmpjr/
|
214
|
-
- spec/snmpjr/
|
232
|
+
- spec/snmpjr/session_v2c_spec.rb
|
233
|
+
- spec/snmpjr/session_v3_spec.rb
|
234
|
+
- spec/snmpjr/target_v2c_spec.rb
|
235
|
+
- spec/snmpjr/target_v3_spec.rb
|
215
236
|
- spec/snmpjr/walker_spec.rb
|
216
237
|
- spec/snmpjr_spec.rb
|
217
238
|
- spec/spec_helper.rb
|
data/lib/snmpjr/target.rb
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
require 'snmpjr/wrappers/smi'
|
2
|
-
|
3
|
-
class Snmpjr
|
4
|
-
class Target
|
5
|
-
|
6
|
-
def create options = {}
|
7
|
-
target = Snmpjr::Wrappers::CommunityTarget.new
|
8
|
-
target.community = Snmpjr::Wrappers::SMI::OctetString.new(options.fetch(:community))
|
9
|
-
target.address = Snmpjr::Wrappers::SMI::GenericAddress.parse("udp:#{options.fetch(:host)}/#{options.fetch(:port)}")
|
10
|
-
target.version = 1
|
11
|
-
target.retries = options.fetch(:retries)
|
12
|
-
target.timeout = options.fetch(:timeout)
|
13
|
-
target
|
14
|
-
end
|
15
|
-
|
16
|
-
end
|
17
|
-
end
|