Class: MistApi::ApPortConfigMacAuthProtocolEnum
- Inherits:
-
Object
- Object
- MistApi::ApPortConfigMacAuthProtocolEnum
- Defined in:
- lib/mist_api/models/ap_port_config_mac_auth_protocol_enum.rb
Overview
if ‘enable_mac_auth`==`true`, allows user to select an authentication protocol. enum: `eap-md5`, `eap-peap`, `pap`
Constant Summary collapse
- AP_PORT_CONFIG_MAC_AUTH_PROTOCOL_ENUM =
[ # TODO: Write general description for EAPMD5 EAPMD5 = 'eap-md5'.freeze, # TODO: Write general description for EAPPEAP EAPPEAP = 'eap-peap'.freeze, # TODO: Write general description for PAP PAP = 'pap'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = EAPMD5) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/mist_api/models/ap_port_config_mac_auth_protocol_enum.rb', line 27 def self.from_value(value, default_value = EAPMD5) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'eapmd5' then EAPMD5 when 'eappeap' then EAPPEAP when 'pap' then PAP else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/mist_api/models/ap_port_config_mac_auth_protocol_enum.rb', line 21 def self.validate(value) return false if value.nil? AP_PORT_CONFIG_MAC_AUTH_PROTOCOL_ENUM.include?(value) end |