Class: MistApi::ApPortConfigForwardingEnum

Inherits:
Object
  • Object
show all
Defined in:
lib/mist_api/models/ap_port_config_forwarding_enum.rb

Overview

enum: * ‘all`: local breakout, All VLANs * `limited`: local breakout, only the VLANs configured in `port_vlan_id` and `vlan_ids` * `mxtunnel`: central breakout to an Org Mist Edge (requires `mxtunnel_id`) * `site_mxedge`: central breakout to a Site Mist Edge (requires `mxtunnel_name`) * `wxtunnel`’: central breakout to an Org WxTunnel (requires ‘wxtunnel_id`)

Constant Summary collapse

AP_PORT_CONFIG_FORWARDING_ENUM =
[
  # TODO: Write general description for ALL
  ALL = 'all'.freeze,

  # TODO: Write general description for LIMITED
  LIMITED = 'limited'.freeze,

  # TODO: Write general description for MXTUNNEL
  MXTUNNEL = 'mxtunnel'.freeze,

  # TODO: Write general description for SITE_MXEDGE
  SITE_MXEDGE = 'site_mxedge'.freeze,

  # TODO: Write general description for WXTUNNEL
  WXTUNNEL = 'wxtunnel'.freeze
].freeze

Class Method Summary collapse

Class Method Details

.from_value(value, default_value = ALL) ⇒ Object



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# File 'lib/mist_api/models/ap_port_config_forwarding_enum.rb', line 37

def self.from_value(value, default_value = ALL)
  return default_value if value.nil?

  str = value.to_s.strip

  case str.downcase
  when 'all' then ALL
  when 'limited' then LIMITED
  when 'mxtunnel' then MXTUNNEL
  when 'site_mxedge' then SITE_MXEDGE
  when 'wxtunnel' then WXTUNNEL
  else
    default_value
  end
end

.validate(value) ⇒ Object



31
32
33
34
35
# File 'lib/mist_api/models/ap_port_config_forwarding_enum.rb', line 31

def self.validate(value)
  return false if value.nil?

  AP_PORT_CONFIG_FORWARDING_ENUM.include?(value)
end