Class: MistApi::ApUplinkPortConfig

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

Overview

AP Uplink port configuration

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(dot1x = false, keep_wlans_up_if_down = false) ⇒ ApUplinkPortConfig

Returns a new instance of ApUplinkPortConfig.



44
45
46
47
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 44

def initialize(dot1x = false, keep_wlans_up_if_down = false)
  @dot1x = dot1x unless dot1x == SKIP
  @keep_wlans_up_if_down = keep_wlans_up_if_down unless keep_wlans_up_if_down == SKIP
end

Instance Attribute Details

#dot1xTrueClass | FalseClass

Whether to do 802.1x against uplink switch. When enabled, AP cert will be used to do EAP-TLS and the Org’s CA Cert has to be provisioned at the switch

Returns:

  • (TrueClass | FalseClass)


16
17
18
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 16

def dot1x
  @dot1x
end

#keep_wlans_up_if_downTrueClass | FalseClass

By default, WLANs are disabled when uplink is down. In some scenario, like SiteSurvey, one would want the AP to keep sending beacons.

Returns:

  • (TrueClass | FalseClass)


21
22
23
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 21

def keep_wlans_up_if_down
  @keep_wlans_up_if_down
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



50
51
52
53
54
55
56
57
58
59
60
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 50

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  dot1x = hash['dot1x'] ||= false
  keep_wlans_up_if_down = hash['keep_wlans_up_if_down'] ||= false

  # Create object from extracted values.
  ApUplinkPortConfig.new(dot1x,
                         keep_wlans_up_if_down)
end

.namesObject

A mapping from model property names to API property names.



24
25
26
27
28
29
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 24

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['dot1x'] = 'dot1x'
  @_hash['keep_wlans_up_if_down'] = 'keep_wlans_up_if_down'
  @_hash
end

.nullablesObject

An array for nullable fields



40
41
42
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 40

def self.nullables
  []
end

.optionalsObject

An array for optional fields



32
33
34
35
36
37
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 32

def self.optionals
  %w[
    dot1x
    keep_wlans_up_if_down
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



69
70
71
72
73
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 69

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} dot1x: #{@dot1x.inspect}, keep_wlans_up_if_down:"\
  " #{@keep_wlans_up_if_down.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



63
64
65
66
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 63

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} dot1x: #{@dot1x}, keep_wlans_up_if_down: #{@keep_wlans_up_if_down}>"
end