Module: Boris
- Included in:
- String
- Defined in:
- lib/boris/profilers/unix/solaris_core.rb,
lib/boris.rb,
lib/boris/errors.rb,
lib/boris/target.rb,
lib/boris/options.rb,
lib/boris/version.rb,
lib/boris/structure.rb,
lib/boris/connectors.rb,
lib/boris/lumberjack.rb,
lib/boris/profiler_core.rb,
lib/boris/connectors/ssh.rb,
lib/boris/connectors/wmi.rb,
lib/boris/connectors/snmp.rb,
lib/boris/helpers/network.rb,
lib/boris/helpers/scrubber.rb,
lib/boris/helpers/constants.rb,
lib/boris/profilers/unix_core.rb,
lib/boris/profilers/linux_core.rb,
lib/boris/profilers/big_ip_core.rb,
lib/boris/profilers/cisco/ios12.rb,
lib/boris/profilers/cisco/nxos5.rb,
lib/boris/profilers/windows_core.rb,
lib/boris/profilers/cisco_ios_core.rb,
lib/boris/profilers/big_ip/big_ip10.rb,
lib/boris/profilers/big_ip/big_ip11.rb,
lib/boris/profilers/cisco_nxos_core.rb,
lib/boris/profilers/brocade_fos/fos6.rb,
lib/boris/profilers/brocade_fos_core.rb,
lib/boris/profilers/linux/redhat_core.rb,
lib/boris/profilers/linux/redhat/rhel5.rb,
lib/boris/profilers/linux/redhat/rhel6.rb,
lib/boris/profilers/windows/windows2003.rb,
lib/boris/profilers/windows/windows2008.rb,
lib/boris/profilers/windows/windows2012.rb,
lib/boris/profilers/unix/solaris/solaris10.rb,
lib/boris/profilers/unix/solaris/solaris11.rb,
lib/boris/profilers/onboard_administrator/oa3.rb,
lib/boris/profilers/onboard_administrator_core.rb
Overview
require 'boris/helpers/constants'
Defined Under Namespace
Modules: Lumberjack, Network, ProfilerCore, Profilers, Structure Classes: ConnectionAlreadyActive, ConnectionFailed, Connector, InvalidCredentials, InvalidOption, InvalidTargetName, MissingCredentials, NoActiveConnection, NoProfilerDetected, Options, PasswordExpired, SNMPConnector, SSHConnector, Target, WMIConnector
Constant Summary collapse
- VERSION =
'1.0.3'- VENDOR_ADOBE =
'Adobe Systems, Inc.'- VENDOR_AMD =
'AMD, Inc.'- VENDOR_APC =
'APC Corp.'- VENDOR_BROCADE =
'Brocade Communications, Inc.'- VENDOR_CISCO =
'Cisco Systems, Inc.'- VENDOR_CITRIX =
'Citrix Systems, Inc.'- VENDOR_DELL =
'Dell, Inc.'- VENDOR_EMULEX =
'Emulex Corp.'- VENDOR_F5 =
'F5 Networks, Inc.'- VENDOR_HP =
'Hewlett Packard, Inc.'- VENDOR_IBM =
'IBM Corp.'- VENDOR_INTEL =
'Intel Corp.'- VENDOR_MICROSOFT =
'Microsoft Corp.'- VENDOR_ORACLE =
'Oracle Corp.'- VENDOR_QLOGIC =
'QLogic Corp.'- VENDOR_REDHAT =
'Red Hat, Inc.'- VENDOR_SUSE =
'SUSE Linux GmbH'- VENDOR_VMWARE =
'VMware, Inc.'- PORT_DEFAULTS =
{:ssh=>22, :wmi=>135}
- VALID_CONNECTION_TYPES =
[:snmp, :ssh, :wmi]
- CONN_FAILURE_AUTH_FAILED =
'authentication failed'- CONN_FAILURE_HOST_KEY_MISMATCH =
'connection failed (ssh: host key mismatch)'- CONN_FAILURE_NO_HOST =
'connection failed (no such host)'- CONN_FAILURE_RPC_FILTERED =
'connection failed (wmi: rpc calls canceled by remote message filter)'- CONN_FAILURE_RPC_UNAVAILABLE =
'connection failed (wmi: rpc server unavailable)'- CONN_FAILURE_LOCAL_CREDENTIALS =
'connection failed (wmi: credentials used locally, will try again)'- CONN_FAILURE_PASSWORD_EXPIRED =
'connection failed (password expired, requires changing)'- CONN_FAILURE_REFUSED =
'connection failed (target actively refused the connection)'- CONN_FAILURE_CONNECTION_CLOSED =
'connection failed (connection closed by remote host)'- CODE_LOOKUPS =
YAML::load(File.open(File.join(LIB_PATH, '..', 'code_lookups.yml')))
- @@logger =
BorisLogger.new(STDOUT)
Class Method Summary collapse
-
.available_profilers ⇒ Array
Returns an array of all profiler classes that are currently available.
-
.log_level=(level) ⇒ Object
Sets the logging level for Boris.
-
.logger ⇒ Object
Allow all objects in Boris to have access to the logging mechanism.
Class Method Details
.available_profilers ⇒ Array
Returns an array of all profiler classes that are currently available. If this is launched from a non-Windows machine, the Windows-based profilers will not be available.
25 26 27 28 29 30 31 32 |
# File 'lib/boris.rb', line 25 def self.available_profilers ObjectSpace.each_object(Class).select{|klass| klass.to_s =~ /profilers/i}.inject([]) do |result, klass| if !(klass.to_s =~ /windows/i && PLATFORM != :win32) && klass.respond_to?(:matches_target?) result << klass end result end.sort_by {|klass| klass.to_s} end |
.log_level=(level) ⇒ Object
Sets the logging level for Boris. The setting here will carry down to all objects created during this session.
Boris.log_level = :debug
30 31 32 33 34 35 36 37 38 39 |
# File 'lib/boris/lumberjack.rb', line 30 def self.log_level=(level) @@logger.level = case level when :debug then Logger::DEBUG when :info then Logger::INFO when :warn then Logger::WARN when :error then Logger::ERROR when :fatal then Logger::FATAL else raise ArgumentError, "invalid logger level specified (#{level.inspect})" end end |
.logger ⇒ Object
Allow all objects in Boris to have access to the logging mechanism. Any classes simply need to include Lumberjack to have the ability to use the logger.
19 20 21 |
# File 'lib/boris/lumberjack.rb', line 19 def self.logger @@logger end |