Class: MistApi::SnmpUsmUserAuthenticationTypeEnum
- Inherits:
-
Object
- Object
- MistApi::SnmpUsmUserAuthenticationTypeEnum
- Defined in:
- lib/mist_api/models/snmp_usm_user_authentication_type_enum.rb
Overview
sha224, sha256, sha384, sha512 are supported in 21.1 and newer release. enum: ‘authentication-md5`, `authentication-none`, `authentication-sha`, `authentication-sha224`, `authentication-sha256`, `authentication-sha384`, `authentication-sha512`
Constant Summary collapse
- SNMP_USM_USER_AUTHENTICATION_TYPE_ENUM =
[ # TODO: Write general description for AUTHENTICATIONMD5 AUTHENTICATIONMD5 = 'authentication-md5'.freeze, # TODO: Write general description for AUTHENTICATIONNONE AUTHENTICATIONNONE = 'authentication-none'.freeze, # TODO: Write general description for AUTHENTICATIONSHA AUTHENTICATIONSHA = 'authentication-sha'.freeze, # TODO: Write general description for AUTHENTICATIONSHA224 AUTHENTICATIONSHA224 = 'authentication-sha224'.freeze, # TODO: Write general description for AUTHENTICATIONSHA256 AUTHENTICATIONSHA256 = 'authentication-sha256'.freeze, # TODO: Write general description for AUTHENTICATIONSHA384 AUTHENTICATIONSHA384 = 'authentication-sha384'.freeze, # TODO: Write general description for AUTHENTICATIONSHA512 AUTHENTICATIONSHA512 = 'authentication-sha512'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = AUTHENTICATIONMD5) ⇒ Object
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/mist_api/models/snmp_usm_user_authentication_type_enum.rb', line 41 def self.from_value(value, default_value = AUTHENTICATIONMD5) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'authenticationmd5' then AUTHENTICATIONMD5 when 'authenticationnone' then AUTHENTICATIONNONE when 'authenticationsha' then AUTHENTICATIONSHA when 'authenticationsha224' then AUTHENTICATIONSHA224 when 'authenticationsha256' then AUTHENTICATIONSHA256 when 'authenticationsha384' then AUTHENTICATIONSHA384 when 'authenticationsha512' then AUTHENTICATIONSHA512 else default_value end end |
.validate(value) ⇒ Object
35 36 37 38 39 |
# File 'lib/mist_api/models/snmp_usm_user_authentication_type_enum.rb', line 35 def self.validate(value) return false if value.nil? SNMP_USM_USER_AUTHENTICATION_TYPE_ENUM.include?(value) end |