snmp4em 1.1.3 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.rdoc +4 -0
- data/lib/snmp4em/requests/snmp_bulkwalk_request.rb +10 -4
- data/lib/snmp4em/requests/snmp_getbulk_request.rb +14 -5
- 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: 7a0049dbb8877e5daaaab5141f6ba97d7a6fb97c
|
4
|
+
data.tar.gz: a9faac10dcdef203d791aab883a7d90dc2ee661c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13f95373407fa3c01234cf33d2cab64bc3db04218831bc333db8c108c1eb3dfa2bd27de00cc5b7b81a9f175105e1a8b588b38d10f0afad1081e5d6a2ded709fe
|
7
|
+
data.tar.gz: e0eccdf6b255ba8127670beee95810044609e931e0167a7a5a257e65fadd44913647751bdb18c7c4132ae3e126f0c30556dc81ca5c9ca3841fb2110492f45206
|
data/README.rdoc
CHANGED
@@ -227,6 +227,10 @@ For example:
|
|
227
227
|
|
228
228
|
== Change Log
|
229
229
|
|
230
|
+
Version 1.1.5:
|
231
|
+
|
232
|
+
* Fix an error when constructing a GetBulkRequest when using version >= 1.3.1 of the SNMP gem
|
233
|
+
|
230
234
|
Version 1.1.2:
|
231
235
|
|
232
236
|
* Changed timeout error handling. We now raise a SNMP::RequestTimeout instead of a StandardError.
|
@@ -73,10 +73,16 @@ module SNMP4EM
|
|
73
73
|
Manager.track_request(self)
|
74
74
|
|
75
75
|
vb_list = SNMP::VarBindList.new(pending_oids.collect{|oid| oid[:next_oid]})
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
76
|
+
|
77
|
+
# Gracefully handle a new constructor introduced in SNMP 1.3.1
|
78
|
+
if Gem::Version.new(SNMP::VERSION) >= Gem::Version.new("1.3.1")
|
79
|
+
request = SNMP::GetBulkRequest.new(@snmp_id, vb_list, 0, 10)
|
80
|
+
else
|
81
|
+
request = SNMP::GetBulkRequest.new(@snmp_id, vb_list)
|
82
|
+
|
83
|
+
request.max_repetitions = 10
|
84
|
+
request.non_repeaters = 0
|
85
|
+
end
|
80
86
|
|
81
87
|
message = SNMP::Message.new(@sender.version, @sender.community_ro, request)
|
82
88
|
|
@@ -76,11 +76,20 @@ module SNMP4EM
|
|
76
76
|
Manager.track_request(self)
|
77
77
|
|
78
78
|
vb_list = SNMP::VarBindList.new(pending_oids.collect{|oid| oid[:requested_oid]})
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
79
|
+
|
80
|
+
max_repetitions = @max_results
|
81
|
+
non_repeaters = pending_oids.select{|oid| oid[:method] == :non_repeating}.count
|
82
|
+
|
83
|
+
# Gracefully handle a new constructor introduced in SNMP 1.3.1
|
84
|
+
if Gem::Version.new(SNMP::VERSION) >= Gem::Version.new("1.3.1")
|
85
|
+
request = SNMP::GetBulkRequest.new(@snmp_id, vb_list, non_repeaters, max_repetitions)
|
86
|
+
else
|
87
|
+
request = SNMP::GetBulkRequest.new(@snmp_id, vb_list)
|
88
|
+
|
89
|
+
request.max_repetitions = max_repetitions
|
90
|
+
request.non_repeaters = non_repeaters
|
91
|
+
end
|
92
|
+
|
84
93
|
message = SNMP::Message.new(@sender.version, @sender.community_ro, request)
|
85
94
|
|
86
95
|
super(message)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snmp4em
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Norman Elton
|
@@ -122,7 +122,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
122
122
|
version: '1.2'
|
123
123
|
requirements: []
|
124
124
|
rubyforge_project: snmp4em
|
125
|
-
rubygems_version: 2.
|
125
|
+
rubygems_version: 2.6.8
|
126
126
|
signing_key:
|
127
127
|
specification_version: 4
|
128
128
|
summary: A high-performance SNMP engine built on EventMachine and Ruby-SNMP
|