Class: SNMP4JR::MibManager
- Inherits:
-
Object
- Object
- SNMP4JR::MibManager
- Includes:
- Singleton
- Defined in:
- lib/snmp4jr/mib_manager.rb
Instance Attribute Summary collapse
-
#compilation_monitor ⇒ Object
readonly
Returns the value of attribute compilation_monitor.
-
#compile_leniently ⇒ Object
readonly
Returns the value of attribute compile_leniently.
-
#license_key ⇒ Object
Returns the value of attribute license_key.
-
#load_into_repository ⇒ Object
readonly
Returns the value of attribute load_into_repository.
-
#mib_directory ⇒ Object
Returns the value of attribute mib_directory.
-
#update_existent ⇒ Object
readonly
Returns the value of attribute update_existent.
Instance Method Summary collapse
- #find_smi_object(oid) ⇒ Object
-
#initialize ⇒ MibManager
constructor
A new instance of MibManager.
- #load ⇒ Object
- #loaded? ⇒ Boolean
Constructor Details
#initialize ⇒ MibManager
Returns a new instance of MibManager.
13 14 15 16 17 18 |
# File 'lib/snmp4jr/mib_manager.rb', line 13 def initialize @compilation_monitor = nil @load_into_repository = true @update_existent = true @compile_leniently = false end |
Instance Attribute Details
#compilation_monitor ⇒ Object (readonly)
Returns the value of attribute compilation_monitor.
10 11 12 |
# File 'lib/snmp4jr/mib_manager.rb', line 10 def compilation_monitor @compilation_monitor end |
#compile_leniently ⇒ Object (readonly)
Returns the value of attribute compile_leniently.
10 11 12 |
# File 'lib/snmp4jr/mib_manager.rb', line 10 def compile_leniently @compile_leniently end |
#license_key ⇒ Object
Returns the value of attribute license_key.
8 9 10 |
# File 'lib/snmp4jr/mib_manager.rb', line 8 def license_key @license_key end |
#load_into_repository ⇒ Object (readonly)
Returns the value of attribute load_into_repository.
10 11 12 |
# File 'lib/snmp4jr/mib_manager.rb', line 10 def load_into_repository @load_into_repository end |
#mib_directory ⇒ Object
Returns the value of attribute mib_directory.
8 9 10 |
# File 'lib/snmp4jr/mib_manager.rb', line 8 def mib_directory @mib_directory end |
#update_existent ⇒ Object (readonly)
Returns the value of attribute update_existent.
10 11 12 |
# File 'lib/snmp4jr/mib_manager.rb', line 10 def update_existent @update_existent end |
Instance Method Details
#find_smi_object(oid) ⇒ Object
32 33 34 35 |
# File 'lib/snmp4jr/mib_manager.rb', line 32 def find_smi_object(oid) return nil unless loaded? manager.find_smi_object(SNMP4JR::SMI::OID.new(oid)) end |
#load ⇒ Object
20 21 22 23 24 25 |
# File 'lib/snmp4jr/mib_manager.rb', line 20 def load return if loaded? || license_key.nil? || mib_directory.nil? compile_mibs set_formats @loaded = true end |
#loaded? ⇒ Boolean
27 28 29 |
# File 'lib/snmp4jr/mib_manager.rb', line 27 def loaded? @loaded == true end |