netcrawl 0.0.5 → 0.0.6

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: 30abf7c1a361b2c52d77ac36533832c2e79e0b51
4
- data.tar.gz: dee3be4a0509301907aee28fd13bdf21d6f72d02
3
+ metadata.gz: 4b5e9fe103683bde2c6c01244ea5b9863fda382e
4
+ data.tar.gz: 803c4fcd2591d20388afe7e7818b7676156bff74
5
5
  SHA512:
6
- metadata.gz: 6724f5b7b0386a4194ad1a642ebe4dd53e64eed63cb40a7963482e6914cb0cceea49d77f31d8ef1dcf95a46385086095b8432f4d6638feccd9c5eab33b17e825
7
- data.tar.gz: 3adebdc60fe94aef26f6bc5de35d018394d48cef580ccfc395a7ef07371541e1b496ad9d9ce8a2a87b0824ca33286fa38e9b5e079a57f5835bbc8d48742d1efc
6
+ metadata.gz: 813a3c039742405dff24004d5add19897ad8945a5d1a7fbfdfdcb88b9c8dfe025597a297a4cc102fff4db8d4a8ff8a775acdc2fbf1bb700c6971606c9ae01fc8
7
+ data.tar.gz: 909607c9c5e5d17e5b26487a1acb21182d874e029d874e6110d2506afef24b3bd62a45d52a35b9bda85ba4d586f2efc7a045cca1b047dc295f6db263ae71889d
@@ -1,5 +1,6 @@
1
1
  class NetCrawl
2
2
  class CDP < XDP
3
+ require 'pry'
3
4
  MIB = '1.3.6.1.4.1.9.9.23' # ciscoCdpMIB
4
5
  OID = {
5
6
  # http://tools.cisco.com/Support/SNMP/do/BrowseOID.do?local=en&translate=Translate&objectInput=1.3.6.1.4.1.9.9.23.1.2.1.1
@@ -22,7 +23,8 @@ class NetCrawl
22
23
  peer.raw_name = @mib[OID[:cdpCacheDeviceId], peer_id].value
23
24
  peer.ip = get_ip peer.raw_ip, peer.raw_name
24
25
  peer.dst = @mib[OID[:cdpCacheDevicePort], peer_id].value
25
- peer.src = @mib[OID[:cdpInterfaceName], peer_id.first].value
26
+ peer.src = @mib[OID[:cdpInterfaceName], peer_id.first]
27
+ peer.src = peer.src.value if peer.src
26
28
  peer.raw_ip = @mib[OID[:cdpCacheAddress], peer_id].value
27
29
  peers << peer
28
30
  end
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'netcrawl'
3
- s.version = '0.0.5'
3
+ s.version = '0.0.6'
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.authors = [ 'Saku Ytti' ]
6
6
  s.email = %w( saku@ytti.fi )
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netcrawl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Saku Ytti
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-07 00:00:00.000000000 Z
11
+ date: 2014-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: snmp