Class: MistApi::EvpnOptionsRoutedAtEnum
- Inherits:
-
Object
- Object
- MistApi::EvpnOptionsRoutedAtEnum
- Defined in:
- lib/mist_api/models/evpn_options_routed_at_enum.rb
Overview
optional, where virtual-gateway should reside. enum: ‘core`, `distribution`, `edge`
Constant Summary collapse
- EVPN_OPTIONS_ROUTED_AT_ENUM =
[ # TODO: Write general description for CORE CORE = 'core'.freeze, # TODO: Write general description for DISTRIBUTION DISTRIBUTION = 'distribution'.freeze, # TODO: Write general description for EDGE EDGE = 'edge'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = CORE) ⇒ Object
27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/mist_api/models/evpn_options_routed_at_enum.rb', line 27 def self.from_value(value, default_value = CORE) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'core' then CORE when 'distribution' then DISTRIBUTION when 'edge' then EDGE else default_value end end |
.validate(value) ⇒ Object
21 22 23 24 25 |
# File 'lib/mist_api/models/evpn_options_routed_at_enum.rb', line 21 def self.validate(value) return false if value.nil? EVPN_OPTIONS_ROUTED_AT_ENUM.include?(value) end |