Class: MistApi::ApUplinkPortConfig
- Defined in:
- lib/mist_api/models/ap_uplink_port_config.rb
Overview
AP Uplink port configuration
Instance Attribute Summary collapse
-
#dot1x ⇒ TrueClass | FalseClass
Whether to do 802.1x against uplink switch.
-
#keep_wlans_up_if_down ⇒ TrueClass | FalseClass
By default, WLANs are disabled when uplink is down.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(dot1x = false, keep_wlans_up_if_down = false) ⇒ ApUplinkPortConfig
constructor
A new instance of ApUplinkPortConfig.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
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
#dot1x ⇒ TrueClass | 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
16 17 18 |
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 16 def dot1x @dot1x end |
#keep_wlans_up_if_down ⇒ TrueClass | FalseClass
By default, WLANs are disabled when uplink is down. In some scenario, like SiteSurvey, one would want the AP to keep sending beacons.
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 |
.names ⇒ Object
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 |
.nullables ⇒ Object
An array for nullable fields
40 41 42 |
# File 'lib/mist_api/models/ap_uplink_port_config.rb', line 40 def self.nullables [] end |
.optionals ⇒ Object
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
#inspect ⇒ Object
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_s ⇒ Object
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 |