boris 1.0.2 → 1.0.3
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/CHANGELOG.md +13 -0
- data/README.md +58 -30
- data/Rakefile +7 -1
- data/code_lookups.yml +94 -0
- data/lib/boris.rb +17 -2
- data/lib/boris/connectors.rb +3 -2
- data/lib/boris/connectors/ssh.rb +92 -48
- data/lib/boris/connectors/wmi.rb +8 -5
- data/lib/boris/{helpers → core_ext}/array.rb +0 -0
- data/lib/boris/core_ext/datetime.rb +38 -0
- data/lib/boris/{helpers → core_ext}/hash.rb +0 -0
- data/lib/boris/{helpers → core_ext}/string.rb +91 -33
- data/lib/boris/{helpers → core_ext}/time.rb +0 -0
- data/lib/boris/helpers/constants.rb +6 -3
- data/lib/boris/helpers/scrubber.rb +2 -1
- data/lib/boris/options.rb +29 -7
- data/lib/boris/profiler_core.rb +15 -0
- data/lib/boris/profilers/big_ip/big_ip10.rb +10 -0
- data/lib/boris/profilers/big_ip/big_ip11.rb +10 -0
- data/lib/boris/profilers/big_ip_core.rb +210 -0
- data/lib/boris/profilers/brocade_fos/fos6.rb +10 -0
- data/lib/boris/profilers/brocade_fos_core.rb +144 -0
- data/lib/boris/profilers/cisco/ios12.rb +21 -0
- data/lib/boris/profilers/cisco/nxos5.rb +11 -0
- data/lib/boris/profilers/cisco_ios_core.rb +138 -0
- data/lib/boris/profilers/cisco_nxos_core.rb +148 -0
- data/lib/boris/profilers/linux/redhat/rhel5.rb +13 -0
- data/lib/boris/profilers/linux/redhat/rhel6.rb +13 -0
- data/lib/boris/profilers/linux/{redhat.rb → redhat_core.rb} +2 -8
- data/lib/boris/profilers/linux_core.rb +25 -7
- data/lib/boris/profilers/onboard_administrator/oa3.rb +10 -0
- data/lib/boris/profilers/onboard_administrator_core.rb +96 -0
- data/lib/boris/profilers/unix/solaris/solaris10.rb +11 -0
- data/lib/boris/profilers/unix/solaris/solaris11.rb +11 -0
- data/lib/boris/profilers/unix/{solaris.rb → solaris_core.rb} +13 -13
- data/lib/boris/profilers/unix_core.rb +23 -6
- data/lib/boris/profilers/windows/windows2003.rb +1 -2
- data/lib/boris/profilers/windows/windows2008.rb +1 -2
- data/lib/boris/profilers/windows/windows2012.rb +1 -2
- data/lib/boris/profilers/windows_core.rb +29 -8
- data/lib/boris/structure.rb +15 -0
- data/lib/boris/target.rb +19 -3
- data/lib/boris/version.rb +1 -1
- metadata +27 -11
- data/lib/boris/helpers.rb +0 -7
- data/lib/boris/profiler.rb +0 -18
data/lib/boris/structure.rb
CHANGED
@@ -13,6 +13,7 @@ module Boris
|
|
13
13
|
network_id
|
14
14
|
network_interfaces
|
15
15
|
operating_system
|
16
|
+
running_processes
|
16
17
|
}
|
17
18
|
|
18
19
|
CATEGORIES.each do |category|
|
@@ -85,6 +86,7 @@ module Boris
|
|
85
86
|
:node_wwn,
|
86
87
|
:port_wwn,
|
87
88
|
:remote_mac_address,
|
89
|
+
:remote_wwn,
|
88
90
|
:status,
|
89
91
|
:type,
|
90
92
|
:vendor,
|
@@ -94,6 +96,14 @@ module Boris
|
|
94
96
|
].to_nil_hash
|
95
97
|
end
|
96
98
|
|
99
|
+
def running_process_template
|
100
|
+
[
|
101
|
+
:command,
|
102
|
+
:cpu_time,
|
103
|
+
:date_started
|
104
|
+
].to_nil_hash
|
105
|
+
end
|
106
|
+
|
97
107
|
def get_file_systems
|
98
108
|
debug 'preparing to fetch file systems'
|
99
109
|
@file_systems = []
|
@@ -168,6 +178,11 @@ module Boris
|
|
168
178
|
].to_nil_hash
|
169
179
|
end
|
170
180
|
|
181
|
+
def get_running_processes
|
182
|
+
debug 'preparing to fetch running_processes'
|
183
|
+
@running_processes = []
|
184
|
+
end
|
185
|
+
|
171
186
|
alias get_installed_daemons get_installed_services
|
172
187
|
end
|
173
188
|
end
|
data/lib/boris/target.rb
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
require 'boris/core_ext/array'
|
2
|
+
require 'boris/core_ext/datetime'
|
3
|
+
require 'boris/core_ext/hash'
|
4
|
+
require 'boris/core_ext/string'
|
5
|
+
require 'boris/core_ext/time'
|
6
|
+
|
7
|
+
require 'boris/helpers/constants'
|
8
|
+
require 'boris/helpers/scrubber'
|
9
|
+
require 'boris/helpers/network'
|
10
|
+
|
11
|
+
require 'boris/lumberjack'
|
12
|
+
|
1
13
|
require 'boris/errors'
|
2
14
|
require 'boris/options'
|
3
15
|
require 'boris/connectors/snmp'
|
@@ -12,6 +24,7 @@ module Boris
|
|
12
24
|
class Target
|
13
25
|
include Lumberjack
|
14
26
|
|
27
|
+
attr_reader :connection_failures
|
15
28
|
attr_reader :host
|
16
29
|
attr_reader :unavailable_connection_types
|
17
30
|
|
@@ -40,6 +53,7 @@ module Boris
|
|
40
53
|
options ||= {}
|
41
54
|
@options = Options.new(options)
|
42
55
|
@connector = Connector.new(@host)
|
56
|
+
@connection_failures = []
|
43
57
|
@unavailable_connection_types = []
|
44
58
|
|
45
59
|
if block_given?
|
@@ -129,8 +143,12 @@ module Boris
|
|
129
143
|
|
130
144
|
info "connection established via #{conn_type}" if @connector.connected?
|
131
145
|
end
|
146
|
+
|
147
|
+
@connection_failures = @connection_failures.concat(@connector.failure_messages)
|
132
148
|
end
|
133
149
|
|
150
|
+
@connection_failures.uniq!
|
151
|
+
|
134
152
|
info 'all connection attempts failed' if !@connector.connected?
|
135
153
|
|
136
154
|
return @connector.connected? ? true : false
|
@@ -161,7 +179,7 @@ module Boris
|
|
161
179
|
raise NoActiveConnection, 'no active connection' if @connector.connected? == false
|
162
180
|
|
163
181
|
@options[:profilers].each do |profiler|
|
164
|
-
break if @profiler || @connector.
|
182
|
+
break if @profiler || @connector.failure_messages.any?
|
165
183
|
|
166
184
|
if profiler.connection_type == @connector.class
|
167
185
|
debug "testing profiler: #{profiler}"
|
@@ -178,8 +196,6 @@ module Boris
|
|
178
196
|
end
|
179
197
|
end
|
180
198
|
|
181
|
-
raise PasswordExpired, @connector.failure_message if @connector.failure_message
|
182
|
-
|
183
199
|
raise NoProfilerDetected, 'no suitable profiler found' if !@profiler
|
184
200
|
|
185
201
|
@profiler
|
data/lib/boris/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: boris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joe Martin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-07-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: netaddr
|
@@ -93,31 +93,47 @@ files:
|
|
93
93
|
- lib/boris/connectors/ssh.rb
|
94
94
|
- lib/boris/connectors/wmi.rb
|
95
95
|
- lib/boris/connectors.rb
|
96
|
+
- lib/boris/core_ext/array.rb
|
97
|
+
- lib/boris/core_ext/datetime.rb
|
98
|
+
- lib/boris/core_ext/hash.rb
|
99
|
+
- lib/boris/core_ext/string.rb
|
100
|
+
- lib/boris/core_ext/time.rb
|
96
101
|
- lib/boris/errors.rb
|
97
|
-
- lib/boris/helpers/array.rb
|
98
102
|
- lib/boris/helpers/constants.rb
|
99
|
-
- lib/boris/helpers/hash.rb
|
100
103
|
- lib/boris/helpers/network.rb
|
101
104
|
- lib/boris/helpers/scrubber.rb
|
102
|
-
- lib/boris/helpers/string.rb
|
103
|
-
- lib/boris/helpers/time.rb
|
104
|
-
- lib/boris/helpers.rb
|
105
105
|
- lib/boris/lumberjack.rb
|
106
106
|
- lib/boris/options.rb
|
107
|
-
- lib/boris/
|
108
|
-
- lib/boris/profilers/
|
107
|
+
- lib/boris/profilers/big_ip/big_ip10.rb
|
108
|
+
- lib/boris/profilers/big_ip/big_ip11.rb
|
109
|
+
- lib/boris/profilers/big_ip_core.rb
|
110
|
+
- lib/boris/profilers/brocade_fos/fos6.rb
|
111
|
+
- lib/boris/profilers/brocade_fos_core.rb
|
112
|
+
- lib/boris/profilers/cisco/ios12.rb
|
113
|
+
- lib/boris/profilers/cisco/nxos5.rb
|
114
|
+
- lib/boris/profilers/cisco_ios_core.rb
|
115
|
+
- lib/boris/profilers/cisco_nxos_core.rb
|
116
|
+
- lib/boris/profilers/linux/redhat/rhel5.rb
|
117
|
+
- lib/boris/profilers/linux/redhat/rhel6.rb
|
118
|
+
- lib/boris/profilers/linux/redhat_core.rb
|
109
119
|
- lib/boris/profilers/linux_core.rb
|
110
|
-
- lib/boris/profilers/
|
120
|
+
- lib/boris/profilers/onboard_administrator/oa3.rb
|
121
|
+
- lib/boris/profilers/onboard_administrator_core.rb
|
122
|
+
- lib/boris/profilers/unix/solaris/solaris10.rb
|
123
|
+
- lib/boris/profilers/unix/solaris/solaris11.rb
|
124
|
+
- lib/boris/profilers/unix/solaris_core.rb
|
111
125
|
- lib/boris/profilers/unix_core.rb
|
112
126
|
- lib/boris/profilers/windows/windows2003.rb
|
113
127
|
- lib/boris/profilers/windows/windows2008.rb
|
114
128
|
- lib/boris/profilers/windows/windows2012.rb
|
115
129
|
- lib/boris/profilers/windows_core.rb
|
130
|
+
- lib/boris/profiler_core.rb
|
116
131
|
- lib/boris/structure.rb
|
117
132
|
- lib/boris/target.rb
|
118
133
|
- lib/boris/version.rb
|
119
134
|
- lib/boris.rb
|
120
135
|
- CHANGELOG.md
|
136
|
+
- code_lookups.yml
|
121
137
|
- LICENSE.md
|
122
138
|
- Rakefile
|
123
139
|
- README.md
|
@@ -140,7 +156,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
156
|
version: '0'
|
141
157
|
requirements: []
|
142
158
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.0.
|
159
|
+
rubygems_version: 2.0.3
|
144
160
|
signing_key:
|
145
161
|
specification_version: 4
|
146
162
|
summary: 'Boris: A networked-device scanning library.'
|
data/lib/boris/helpers.rb
DELETED
data/lib/boris/profiler.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
require 'boris/structure'
|
2
|
-
require 'boris/helpers'
|
3
|
-
|
4
|
-
module Boris; module Profilers
|
5
|
-
class Profiler
|
6
|
-
include Lumberjack
|
7
|
-
include Structure
|
8
|
-
|
9
|
-
attr_reader :cache
|
10
|
-
|
11
|
-
def initialize(connector)
|
12
|
-
@host = connector.host
|
13
|
-
@logger = Boris.logger
|
14
|
-
@connector = connector
|
15
|
-
@cache = {:users=>[]}
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end; end
|