Class: MistApi::UtilsShowRouteProtocolEnum
- Inherits:
-
Object
- Object
- MistApi::UtilsShowRouteProtocolEnum
- Defined in:
- lib/mist_api/models/utils_show_route_protocol_enum.rb
Overview
enum: ‘any`, `bgp`, `direct`, `evpn`, `ospf`, `static`
Constant Summary collapse
- UTILS_SHOW_ROUTE_PROTOCOL_ENUM =
[ # TODO: Write general description for ANY ANY = 'any'.freeze, # TODO: Write general description for BGP BGP = 'bgp'.freeze, # TODO: Write general description for DIRECT DIRECT = 'direct'.freeze, # TODO: Write general description for EVPN EVPN = 'evpn'.freeze, # TODO: Write general description for OSPF OSPF = 'ospf'.freeze, # TODO: Write general description for STATIC STATIC = 'static'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ANY) ⇒ Object
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/mist_api/models/utils_show_route_protocol_enum.rb', line 35 def self.from_value(value, default_value = ANY) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'any' then ANY when 'bgp' then BGP when 'direct' then DIRECT when 'evpn' then EVPN when 'ospf' then OSPF when 'static' then STATIC else default_value end end |
.validate(value) ⇒ Object
29 30 31 32 33 |
# File 'lib/mist_api/models/utils_show_route_protocol_enum.rb', line 29 def self.validate(value) return false if value.nil? UTILS_SHOW_ROUTE_PROTOCOL_ENUM.include?(value) end |