Class: Snmpjr::ConfigurationV3
- Inherits:
-
Configuration
- Object
- Configuration
- Snmpjr::ConfigurationV3
- Defined in:
- lib/snmpjr/configuration_v3.rb
Defined Under Namespace
Modules: SecurityLevels
Instance Attribute Summary collapse
-
#authentication_key ⇒ Object
readonly
Returns the value of attribute authentication_key.
-
#authentication_protocol ⇒ Object
readonly
Returns the value of attribute authentication_protocol.
-
#context ⇒ Object
Returns the value of attribute context.
-
#privacy_key ⇒ Object
readonly
Returns the value of attribute privacy_key.
-
#privacy_protocol ⇒ Object
readonly
Returns the value of attribute privacy_protocol.
-
#user ⇒ Object
Returns the value of attribute user.
Attributes inherited from Configuration
#host, #max_oids_per_request, #port, #retries, #timeout
Instance Method Summary collapse
- #authentication(protocol, key) ⇒ Object
- #create_pdu ⇒ Object
- #create_session ⇒ Object
- #create_target ⇒ Object
-
#initialize ⇒ ConfigurationV3
constructor
A new instance of ConfigurationV3.
- #privacy(protocol, key) ⇒ Object
- #security_level ⇒ Object
Constructor Details
#initialize ⇒ ConfigurationV3
Returns a new instance of ConfigurationV3.
17 18 19 20 |
# File 'lib/snmpjr/configuration_v3.rb', line 17 def initialize @context = '' super end |
Instance Attribute Details
#authentication_key ⇒ Object (readonly)
Returns the value of attribute authentication_key.
15 16 17 |
# File 'lib/snmpjr/configuration_v3.rb', line 15 def authentication_key @authentication_key end |
#authentication_protocol ⇒ Object (readonly)
Returns the value of attribute authentication_protocol.
15 16 17 |
# File 'lib/snmpjr/configuration_v3.rb', line 15 def authentication_protocol @authentication_protocol end |
#context ⇒ Object
Returns the value of attribute context.
14 15 16 |
# File 'lib/snmpjr/configuration_v3.rb', line 14 def context @context end |
#privacy_key ⇒ Object (readonly)
Returns the value of attribute privacy_key.
15 16 17 |
# File 'lib/snmpjr/configuration_v3.rb', line 15 def privacy_key @privacy_key end |
#privacy_protocol ⇒ Object (readonly)
Returns the value of attribute privacy_protocol.
15 16 17 |
# File 'lib/snmpjr/configuration_v3.rb', line 15 def privacy_protocol @privacy_protocol end |
#user ⇒ Object
Returns the value of attribute user.
14 15 16 |
# File 'lib/snmpjr/configuration_v3.rb', line 14 def user @user end |
Instance Method Details
#authentication(protocol, key) ⇒ Object
28 29 30 31 |
# File 'lib/snmpjr/configuration_v3.rb', line 28 def authentication protocol, key @authentication_protocol = protocol @authentication_key = key end |
#create_pdu ⇒ Object
46 47 48 |
# File 'lib/snmpjr/configuration_v3.rb', line 46 def create_pdu Snmpjr::PduV3.new context end |
#create_session ⇒ Object
42 43 44 |
# File 'lib/snmpjr/configuration_v3.rb', line 42 def create_session Snmpjr::SessionV3.new self end |
#create_target ⇒ Object
38 39 40 |
# File 'lib/snmpjr/configuration_v3.rb', line 38 def create_target Snmpjr::TargetV3.new.create self end |
#privacy(protocol, key) ⇒ Object
33 34 35 36 |
# File 'lib/snmpjr/configuration_v3.rb', line 33 def privacy protocol, key @privacy_protocol = protocol @privacy_key = key end |
#security_level ⇒ Object
22 23 24 25 26 |
# File 'lib/snmpjr/configuration_v3.rb', line 22 def security_level return SecurityLevels::AuthPriv if authentication_protocol && privacy_protocol return SecurityLevels::AuthNoPriv if authentication_protocol SecurityLevels::NoAuthNoPriv end |