Class: MistApi::ApPortConfig
- Defined in:
- lib/mist_api/models/ap_port_config.rb
Overview
ApPortConfig Model.
Instance Attribute Summary collapse
-
#disabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#dynamic_vlan ⇒ ApPortConfigDynamicVlan
Optional dynamic vlan.
-
#enable_mac_auth ⇒ TrueClass | FalseClass
Optional dynamic vlan.
-
#forwarding ⇒ ApPortConfigForwardingEnum
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`).
-
#mac_auth_preferred ⇒ TrueClass | FalseClass
When ‘true`, we’ll do dot1x then mac_auth.
-
#mac_auth_protocol ⇒ ApPortConfigMacAuthProtocolEnum
if ‘enable_mac_auth`==`true`, allows user to select an authentication protocol.
-
#mist_nac ⇒ WlanMistNac
if ‘enable_mac_auth`==`true`, allows user to select an authentication protocol.
-
#mx_tunnel_id ⇒ UUID | String
If ‘forwarding`==`mxtunnel`, vlan_ids comes from mxtunnel.
-
#mxtunnel_name ⇒ String
If ‘forwarding`==`site_mxedge`, vlan_ids comes from site_mxedge (`mxtunnels` under site setting).
-
#port_auth ⇒ ApPortConfigPortAuthEnum
When doing port auth.
-
#port_vlan_id ⇒ Integer
If ‘forwarding`==`limited`.
-
#radius_config ⇒ RadiusConfig
Junos Radius config.
-
#radsec ⇒ Radsec
RadSec settings.
-
#vlan_id ⇒ Integer
Optional to specify the vlan id for a tunnel if forwarding is for ‘wxtunnel`, `mxtunnel` or `site_mxedge`.
-
#vlan_ids ⇒ String
If ‘forwarding`==`limited`, comma separated list of additional vlan ids allowed on this port.
-
#wxtunnel_id ⇒ UUID | String
If ‘forwarding`==`wxtunnel`, the port is bridged to the vlan of the session.
-
#wxtunnel_remote_id ⇒ String
If ‘forwarding`==`wxtunnel`, the port is bridged to the vlan of the session.
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(disabled = false, dynamic_vlan = SKIP, enable_mac_auth = false, forwarding = ApPortConfigForwardingEnum::ALL, mac_auth_preferred = false, mac_auth_protocol = ApPortConfigMacAuthProtocolEnum::PAP, mist_nac = SKIP, mx_tunnel_id = SKIP, mxtunnel_name = SKIP, port_auth = ApPortConfigPortAuthEnum::NONE, port_vlan_id = SKIP, radius_config = SKIP, radsec = SKIP, vlan_id = SKIP, vlan_ids = SKIP, wxtunnel_id = SKIP, wxtunnel_remote_id = SKIP) ⇒ ApPortConfig
constructor
A new instance of ApPortConfig.
-
#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(disabled = false, dynamic_vlan = SKIP, enable_mac_auth = false, forwarding = ApPortConfigForwardingEnum::ALL, mac_auth_preferred = false, mac_auth_protocol = ApPortConfigMacAuthProtocolEnum::PAP, mist_nac = SKIP, mx_tunnel_id = SKIP, mxtunnel_name = SKIP, port_auth = ApPortConfigPortAuthEnum::NONE, port_vlan_id = SKIP, radius_config = SKIP, radsec = SKIP, vlan_id = SKIP, vlan_ids = SKIP, wxtunnel_id = SKIP, wxtunnel_remote_id = SKIP) ⇒ ApPortConfig
Returns a new instance of ApPortConfig.
151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 |
# File 'lib/mist_api/models/ap_port_config.rb', line 151 def initialize(disabled = false, dynamic_vlan = SKIP, enable_mac_auth = false, forwarding = ApPortConfigForwardingEnum::ALL, mac_auth_preferred = false, mac_auth_protocol = ApPortConfigMacAuthProtocolEnum::PAP, mist_nac = SKIP, mx_tunnel_id = SKIP, mxtunnel_name = SKIP, port_auth = ApPortConfigPortAuthEnum::NONE, port_vlan_id = SKIP, radius_config = SKIP, radsec = SKIP, vlan_id = SKIP, vlan_ids = SKIP, wxtunnel_id = SKIP, wxtunnel_remote_id = SKIP) @disabled = disabled unless disabled == SKIP @dynamic_vlan = dynamic_vlan unless dynamic_vlan == SKIP @enable_mac_auth = enable_mac_auth unless enable_mac_auth == SKIP @forwarding = forwarding unless forwarding == SKIP @mac_auth_preferred = mac_auth_preferred unless mac_auth_preferred == SKIP @mac_auth_protocol = mac_auth_protocol unless mac_auth_protocol == SKIP @mist_nac = mist_nac unless mist_nac == SKIP @mx_tunnel_id = mx_tunnel_id unless mx_tunnel_id == SKIP @mxtunnel_name = mxtunnel_name unless mxtunnel_name == SKIP @port_auth = port_auth unless port_auth == SKIP @port_vlan_id = port_vlan_id unless port_vlan_id == SKIP @radius_config = radius_config unless radius_config == SKIP @radsec = radsec unless radsec == SKIP @vlan_id = vlan_id unless vlan_id == SKIP @vlan_ids = vlan_ids unless vlan_ids == SKIP @wxtunnel_id = wxtunnel_id unless wxtunnel_id == SKIP @wxtunnel_remote_id = wxtunnel_remote_id unless wxtunnel_remote_id == SKIP end |
Instance Attribute Details
#disabled ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/ap_port_config.rb', line 14 def disabled @disabled end |
#dynamic_vlan ⇒ ApPortConfigDynamicVlan
Optional dynamic vlan
18 19 20 |
# File 'lib/mist_api/models/ap_port_config.rb', line 18 def dynamic_vlan @dynamic_vlan end |
#enable_mac_auth ⇒ TrueClass | FalseClass
Optional dynamic vlan
22 23 24 |
# File 'lib/mist_api/models/ap_port_config.rb', line 22 def enable_mac_auth @enable_mac_auth end |
#forwarding ⇒ ApPortConfigForwardingEnum
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`)
35 36 37 |
# File 'lib/mist_api/models/ap_port_config.rb', line 35 def forwarding @forwarding end |
#mac_auth_preferred ⇒ TrueClass | FalseClass
When ‘true`, we’ll do dot1x then mac_auth. enable this to prefer mac_auth
39 40 41 |
# File 'lib/mist_api/models/ap_port_config.rb', line 39 def mac_auth_preferred @mac_auth_preferred end |
#mac_auth_protocol ⇒ ApPortConfigMacAuthProtocolEnum
if ‘enable_mac_auth`==`true`, allows user to select an authentication protocol. enum: `eap-md5`, `eap-peap`, `pap`
44 45 46 |
# File 'lib/mist_api/models/ap_port_config.rb', line 44 def mac_auth_protocol @mac_auth_protocol end |
#mist_nac ⇒ WlanMistNac
if ‘enable_mac_auth`==`true`, allows user to select an authentication protocol. enum: `eap-md5`, `eap-peap`, `pap`
49 50 51 |
# File 'lib/mist_api/models/ap_port_config.rb', line 49 def mist_nac @mist_nac end |
#mx_tunnel_id ⇒ UUID | String
If ‘forwarding`==`mxtunnel`, vlan_ids comes from mxtunnel
53 54 55 |
# File 'lib/mist_api/models/ap_port_config.rb', line 53 def mx_tunnel_id @mx_tunnel_id end |
#mxtunnel_name ⇒ String
If ‘forwarding`==`site_mxedge`, vlan_ids comes from site_mxedge (`mxtunnels` under site setting)
58 59 60 |
# File 'lib/mist_api/models/ap_port_config.rb', line 58 def mxtunnel_name @mxtunnel_name end |
#port_auth ⇒ ApPortConfigPortAuthEnum
When doing port auth. enum: ‘dot1x`, `none`
62 63 64 |
# File 'lib/mist_api/models/ap_port_config.rb', line 62 def port_auth @port_auth end |
#port_vlan_id ⇒ Integer
If ‘forwarding`==`limited`
66 67 68 |
# File 'lib/mist_api/models/ap_port_config.rb', line 66 def port_vlan_id @port_vlan_id end |
#radius_config ⇒ RadiusConfig
Junos Radius config
70 71 72 |
# File 'lib/mist_api/models/ap_port_config.rb', line 70 def radius_config @radius_config end |
#radsec ⇒ Radsec
RadSec settings
74 75 76 |
# File 'lib/mist_api/models/ap_port_config.rb', line 74 def radsec @radsec end |
#vlan_id ⇒ Integer
Optional to specify the vlan id for a tunnel if forwarding is for ‘wxtunnel`, `mxtunnel` or `site_mxedge`.
* if vlan_id is not specified then it will use first one in vlan_ids[]
of the mxtunnel.
* if forwarding == site_mxedge, vlan_ids comes from site_mxedge
(‘mxtunnels` under site setting)
83 84 85 |
# File 'lib/mist_api/models/ap_port_config.rb', line 83 def vlan_id @vlan_id end |
#vlan_ids ⇒ String
If ‘forwarding`==`limited`, comma separated list of additional vlan ids allowed on this port
88 89 90 |
# File 'lib/mist_api/models/ap_port_config.rb', line 88 def vlan_ids @vlan_ids end |
#wxtunnel_id ⇒ UUID | String
If ‘forwarding`==`wxtunnel`, the port is bridged to the vlan of the session
93 94 95 |
# File 'lib/mist_api/models/ap_port_config.rb', line 93 def wxtunnel_id @wxtunnel_id end |
#wxtunnel_remote_id ⇒ String
If ‘forwarding`==`wxtunnel`, the port is bridged to the vlan of the session
98 99 100 |
# File 'lib/mist_api/models/ap_port_config.rb', line 98 def wxtunnel_remote_id @wxtunnel_remote_id end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 |
# File 'lib/mist_api/models/ap_port_config.rb', line 181 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. disabled = hash['disabled'] ||= false dynamic_vlan = ApPortConfigDynamicVlan.from_hash(hash['dynamic_vlan']) if hash['dynamic_vlan'] enable_mac_auth = hash['enable_mac_auth'] ||= false forwarding = hash['forwarding'] ||= ApPortConfigForwardingEnum::ALL mac_auth_preferred = hash['mac_auth_preferred'] ||= false mac_auth_protocol = hash['mac_auth_protocol'] ||= ApPortConfigMacAuthProtocolEnum::PAP mist_nac = WlanMistNac.from_hash(hash['mist_nac']) if hash['mist_nac'] mx_tunnel_id = hash.key?('mx_tunnel_id') ? hash['mx_tunnel_id'] : SKIP mxtunnel_name = hash.key?('mxtunnel_name') ? hash['mxtunnel_name'] : SKIP port_auth = hash['port_auth'] ||= ApPortConfigPortAuthEnum::NONE port_vlan_id = hash.key?('port_vlan_id') ? hash['port_vlan_id'] : SKIP radius_config = RadiusConfig.from_hash(hash['radius_config']) if hash['radius_config'] radsec = Radsec.from_hash(hash['radsec']) if hash['radsec'] vlan_id = hash.key?('vlan_id') ? hash['vlan_id'] : SKIP vlan_ids = hash.key?('vlan_ids') ? hash['vlan_ids'] : SKIP wxtunnel_id = hash.key?('wxtunnel_id') ? hash['wxtunnel_id'] : SKIP wxtunnel_remote_id = hash.key?('wxtunnel_remote_id') ? hash['wxtunnel_remote_id'] : SKIP # Create object from extracted values. ApPortConfig.new(disabled, dynamic_vlan, enable_mac_auth, forwarding, mac_auth_preferred, mac_auth_protocol, mist_nac, mx_tunnel_id, mxtunnel_name, port_auth, port_vlan_id, radius_config, radsec, vlan_id, vlan_ids, wxtunnel_id, wxtunnel_remote_id) end |
.names ⇒ Object
A mapping from model property names to API property names.
101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 |
# File 'lib/mist_api/models/ap_port_config.rb', line 101 def self.names @_hash = {} if @_hash.nil? @_hash['disabled'] = 'disabled' @_hash['dynamic_vlan'] = 'dynamic_vlan' @_hash['enable_mac_auth'] = 'enable_mac_auth' @_hash['forwarding'] = 'forwarding' @_hash['mac_auth_preferred'] = 'mac_auth_preferred' @_hash['mac_auth_protocol'] = 'mac_auth_protocol' @_hash['mist_nac'] = 'mist_nac' @_hash['mx_tunnel_id'] = 'mx_tunnel_id' @_hash['mxtunnel_name'] = 'mxtunnel_name' @_hash['port_auth'] = 'port_auth' @_hash['port_vlan_id'] = 'port_vlan_id' @_hash['radius_config'] = 'radius_config' @_hash['radsec'] = 'radsec' @_hash['vlan_id'] = 'vlan_id' @_hash['vlan_ids'] = 'vlan_ids' @_hash['wxtunnel_id'] = 'wxtunnel_id' @_hash['wxtunnel_remote_id'] = 'wxtunnel_remote_id' @_hash end |
.nullables ⇒ Object
An array for nullable fields
147 148 149 |
# File 'lib/mist_api/models/ap_port_config.rb', line 147 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 |
# File 'lib/mist_api/models/ap_port_config.rb', line 124 def self.optionals %w[ disabled dynamic_vlan enable_mac_auth forwarding mac_auth_preferred mac_auth_protocol mist_nac mx_tunnel_id mxtunnel_name port_auth port_vlan_id radius_config radsec vlan_id vlan_ids wxtunnel_id wxtunnel_remote_id ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
239 240 241 242 243 244 245 246 247 248 249 250 |
# File 'lib/mist_api/models/ap_port_config.rb', line 239 def inspect class_name = self.class.name.split('::').last "<#{class_name} disabled: #{@disabled.inspect}, dynamic_vlan: #{@dynamic_vlan.inspect},"\ " enable_mac_auth: #{@enable_mac_auth.inspect}, forwarding: #{@forwarding.inspect},"\ " mac_auth_preferred: #{@mac_auth_preferred.inspect}, mac_auth_protocol:"\ " #{@mac_auth_protocol.inspect}, mist_nac: #{@mist_nac.inspect}, mx_tunnel_id:"\ " #{@mx_tunnel_id.inspect}, mxtunnel_name: #{@mxtunnel_name.inspect}, port_auth:"\ " #{@port_auth.inspect}, port_vlan_id: #{@port_vlan_id.inspect}, radius_config:"\ " #{@radius_config.inspect}, radsec: #{@radsec.inspect}, vlan_id: #{@vlan_id.inspect},"\ " vlan_ids: #{@vlan_ids.inspect}, wxtunnel_id: #{@wxtunnel_id.inspect}, wxtunnel_remote_id:"\ " #{@wxtunnel_remote_id.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
227 228 229 230 231 232 233 234 235 236 |
# File 'lib/mist_api/models/ap_port_config.rb', line 227 def to_s class_name = self.class.name.split('::').last "<#{class_name} disabled: #{@disabled}, dynamic_vlan: #{@dynamic_vlan}, enable_mac_auth:"\ " #{@enable_mac_auth}, forwarding: #{@forwarding}, mac_auth_preferred:"\ " #{@mac_auth_preferred}, mac_auth_protocol: #{@mac_auth_protocol}, mist_nac: #{@mist_nac},"\ " mx_tunnel_id: #{@mx_tunnel_id}, mxtunnel_name: #{@mxtunnel_name}, port_auth:"\ " #{@port_auth}, port_vlan_id: #{@port_vlan_id}, radius_config: #{@radius_config}, radsec:"\ " #{@radsec}, vlan_id: #{@vlan_id}, vlan_ids: #{@vlan_ids}, wxtunnel_id: #{@wxtunnel_id},"\ " wxtunnel_remote_id: #{@wxtunnel_remote_id}>" end |