Class: MistApi::EvpnTopologySwitchRoleEnum
- Inherits:
-
Object
- Object
- MistApi::EvpnTopologySwitchRoleEnum
- Defined in:
- lib/mist_api/models/evpn_topology_switch_role_enum.rb
Overview
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
Constant Summary collapse
- EVPN_TOPOLOGY_SWITCH_ROLE_ENUM =
[ # TODO: Write general description for ACCESS ACCESS = 'access'.freeze, # TODO: Write general description for COLLAPSEDCORE COLLAPSEDCORE = 'collapsed-core'.freeze, # TODO: Write general description for CORE CORE = 'core'.freeze, # TODO: Write general description for DISTRIBUTION DISTRIBUTION = 'distribution'.freeze, # TODO: Write general description for ESILAGACCESS ESILAGACCESS = 'esilag-access'.freeze, # TODO: Write general description for NONE NONE = 'none'.freeze ].freeze
Class Method Summary collapse
Class Method Details
.from_value(value, default_value = ACCESS) ⇒ Object
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 |
# File 'lib/mist_api/models/evpn_topology_switch_role_enum.rb', line 36 def self.from_value(value, default_value = ACCESS) return default_value if value.nil? str = value.to_s.strip case str.downcase when 'access' then ACCESS when 'collapsedcore' then COLLAPSEDCORE when 'core' then CORE when 'distribution' then DISTRIBUTION when 'esilagaccess' then ESILAGACCESS when 'none' then NONE else default_value end end |
.validate(value) ⇒ Object
30 31 32 33 34 |
# File 'lib/mist_api/models/evpn_topology_switch_role_enum.rb', line 30 def self.validate(value) return false if value.nil? EVPN_TOPOLOGY_SWITCH_ROLE_ENUM.include?(value) end |