Class: MistApi::SwitchPortUsage
- Defined in:
- lib/mist_api/models/switch_port_usage.rb
Overview
Junos port usages
Instance Attribute Summary collapse
-
#all_networks ⇒ TrueClass | FalseClass
Only if ‘mode`==`trunk`.
-
#allow_dhcpd ⇒ TrueClass | FalseClass
Only applies when ‘mode`!=`dynamic`.
-
#allow_multiple_supplicants ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#bypass_auth_when_server_down ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#bypass_auth_when_server_down_for_unknown_client ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`=`dot1x`.
-
#bypass_auth_when_server_down_for_voip ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#community_vlan_id ⇒ Integer
Only if ‘mode`!=`dynamic`.
-
#description ⇒ String
Only if ‘mode`!=`dynamic`.
-
#disable_autoneg ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#disabled ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#duplex ⇒ SwitchPortUsageDuplexEnum
Only if ‘mode`!=`dynamic`.
-
#dynamic_vlan_networks ⇒ Array[String]
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`, if dynamic vlan is used, specify the possible networks/vlans RADIUS can return.
-
#enable_mac_auth ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#enable_qos ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#guest_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#inter_isolation_network_link ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#inter_switch_link ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#mac_auth_only ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `enable_mac_auth`==`true`.
-
#mac_auth_preferred ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` + `enable_mac_auth`==`true` + `mac_auth_only`==`false`, dot1x will be given priority then mac_auth.
-
#mac_auth_protocol ⇒ SwitchPortUsageMacAuthProtocolEnum
Only if ‘mode`!=`dynamic` and `enable_mac_auth` ==`true`.
-
#mac_limit ⇒ Object
Only if ‘mode`!=`dynamic`, max number of mac addresses, default is 0 for unlimited, otherwise range is 1 to 16383 (upper bound constrained by platform).
-
#mode ⇒ SwitchPortUsageModeEnum
‘mode`==`dynamic` must only be used if the port usage name is `dynamic`.
-
#mtu ⇒ Object
Only if ‘mode`!=`dynamic` media maximum transmission unit (MTU) is the largest data unit that can be forwarded without fragmentation.
-
#networks ⇒ Array[String]
Only if ‘mode`==`trunk`, the list of network/vlans.
-
#persist_mac ⇒ TrueClass | FalseClass
Only if ‘mode`==`access` and `port_auth`!=`dot1x`.
-
#poe_disabled ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#poe_keep_state_when_reboot ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#poe_priority ⇒ PoePriorityEnum
PoE priority.
-
#port_auth ⇒ SwitchPortUsageDot1xEnum
Only if ‘mode`!=`dynamic`.
-
#port_network ⇒ String
Only if ‘mode`!=`dynamic`.
-
#reauth_interval ⇒ Object
Only if ‘mode`!=`dynamic` and `port_auth`=`dot1x` reauthentication interval range (min: 10, max: 65535, default: 3600).
-
#reset_default_when ⇒ SwitchPortUsageDynamicResetDefaultWhenEnum
Only if ‘mode`==`dynamic` Control when the DPC port should be changed to the default port usage.
-
#rules ⇒ Array[SwitchPortUsageDynamicRule]
Only if ‘mode`==`dynamic`.
-
#server_fail_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#server_reject_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`.
-
#speed ⇒ SwitchPortUsageSpeedEnum
Only if ‘mode`!=`dynamic`, Port speed, default is auto to automatically negotiate speed enum: `100m`, `10m`, `1g`, `2.5g`, `5g`, `10g`, `25g`, `40g`, `100g`,`auto`.
-
#storm_control ⇒ SwitchPortUsageStormControl
Switch storm control.
-
#stp_disable ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `stp_required`==`false`.
-
#stp_edge ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#stp_no_root_port ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#stp_p2p ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#stp_required ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`.
-
#ui_evpntopo_id ⇒ UUID | String
Optional for Campus Fabric Core-Distribution ESI-LAG profile.
-
#use_vstp ⇒ TrueClass | FalseClass
If this is connected to a vstp network.
-
#voip_network ⇒ String
Only if ‘mode`!=`dynamic`.
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(all_networks = false, allow_dhcpd = SKIP, allow_multiple_supplicants = false, bypass_auth_when_server_down = false, bypass_auth_when_server_down_for_unknown_client = false, bypass_auth_when_server_down_for_voip = false, community_vlan_id = SKIP, description = SKIP, disable_autoneg = false, disabled = false, duplex = SwitchPortUsageDuplexEnum::AUTO, dynamic_vlan_networks = SKIP, enable_mac_auth = false, enable_qos = false, guest_network = SKIP, inter_isolation_network_link = false, inter_switch_link = false, mac_auth_only = SKIP, mac_auth_preferred = SKIP, mac_auth_protocol = SwitchPortUsageMacAuthProtocolEnum::EAPMD5, mac_limit = SKIP, mode = SKIP, mtu = SKIP, networks = SKIP, persist_mac = false, poe_disabled = false, poe_keep_state_when_reboot = false, poe_priority = SKIP, port_auth = SKIP, port_network = SKIP, reauth_interval = SKIP, reset_default_when = SwitchPortUsageDynamicResetDefaultWhenEnum::LINK_DOWN, rules = SKIP, server_fail_network = SKIP, server_reject_network = SKIP, speed = SwitchPortUsageSpeedEnum::AUTO, storm_control = SKIP, stp_disable = false, stp_edge = false, stp_no_root_port = false, stp_p2p = false, stp_required = false, ui_evpntopo_id = SKIP, use_vstp = false, voip_network = SKIP) ⇒ SwitchPortUsage
constructor
A new instance of SwitchPortUsage.
-
#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(all_networks = false, allow_dhcpd = SKIP, allow_multiple_supplicants = false, bypass_auth_when_server_down = false, bypass_auth_when_server_down_for_unknown_client = false, bypass_auth_when_server_down_for_voip = false, community_vlan_id = SKIP, description = SKIP, disable_autoneg = false, disabled = false, duplex = SwitchPortUsageDuplexEnum::AUTO, dynamic_vlan_networks = SKIP, enable_mac_auth = false, enable_qos = false, guest_network = SKIP, inter_isolation_network_link = false, inter_switch_link = false, mac_auth_only = SKIP, mac_auth_preferred = SKIP, mac_auth_protocol = SwitchPortUsageMacAuthProtocolEnum::EAPMD5, mac_limit = SKIP, mode = SKIP, mtu = SKIP, networks = SKIP, persist_mac = false, poe_disabled = false, poe_keep_state_when_reboot = false, poe_priority = SKIP, port_auth = SKIP, port_network = SKIP, reauth_interval = SKIP, reset_default_when = SwitchPortUsageDynamicResetDefaultWhenEnum::LINK_DOWN, rules = SKIP, server_fail_network = SKIP, server_reject_network = SKIP, speed = SwitchPortUsageSpeedEnum::AUTO, storm_control = SKIP, stp_disable = false, stp_edge = false, stp_no_root_port = false, stp_p2p = false, stp_required = false, ui_evpntopo_id = SKIP, use_vstp = false, voip_network = SKIP) ⇒ SwitchPortUsage
Returns a new instance of SwitchPortUsage.
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 354 def initialize( all_networks = false, allow_dhcpd = SKIP, allow_multiple_supplicants = false, bypass_auth_when_server_down = false, bypass_auth_when_server_down_for_unknown_client = false, bypass_auth_when_server_down_for_voip = false, community_vlan_id = SKIP, description = SKIP, disable_autoneg = false, disabled = false, duplex = SwitchPortUsageDuplexEnum::AUTO, dynamic_vlan_networks = SKIP, enable_mac_auth = false, enable_qos = false, guest_network = SKIP, inter_isolation_network_link = false, inter_switch_link = false, mac_auth_only = SKIP, mac_auth_preferred = SKIP, mac_auth_protocol = SwitchPortUsageMacAuthProtocolEnum::EAPMD5, mac_limit = SKIP, mode = SKIP, mtu = SKIP, networks = SKIP, persist_mac = false, poe_disabled = false, poe_keep_state_when_reboot = false, poe_priority = SKIP, port_auth = SKIP, port_network = SKIP, reauth_interval = SKIP, reset_default_when = SwitchPortUsageDynamicResetDefaultWhenEnum::LINK_DOWN, rules = SKIP, server_fail_network = SKIP, server_reject_network = SKIP, speed = SwitchPortUsageSpeedEnum::AUTO, storm_control = SKIP, stp_disable = false, stp_edge = false, stp_no_root_port = false, stp_p2p = false, stp_required = false, ui_evpntopo_id = SKIP, use_vstp = false, voip_network = SKIP ) @all_networks = all_networks unless all_networks == SKIP @allow_dhcpd = allow_dhcpd unless allow_dhcpd == SKIP unless allow_multiple_supplicants == SKIP @allow_multiple_supplicants = allow_multiple_supplicants end unless bypass_auth_when_server_down == SKIP @bypass_auth_when_server_down = bypass_auth_when_server_down end unless bypass_auth_when_server_down_for_unknown_client == SKIP @bypass_auth_when_server_down_for_unknown_client = bypass_auth_when_server_down_for_unknown_client end unless bypass_auth_when_server_down_for_voip == SKIP @bypass_auth_when_server_down_for_voip = bypass_auth_when_server_down_for_voip end @community_vlan_id = community_vlan_id unless community_vlan_id == SKIP @description = description unless description == SKIP @disable_autoneg = disable_autoneg unless disable_autoneg == SKIP @disabled = disabled unless disabled == SKIP @duplex = duplex unless duplex == SKIP @dynamic_vlan_networks = dynamic_vlan_networks unless dynamic_vlan_networks == SKIP @enable_mac_auth = enable_mac_auth unless enable_mac_auth == SKIP @enable_qos = enable_qos unless enable_qos == SKIP @guest_network = guest_network unless guest_network == SKIP unless inter_isolation_network_link == SKIP @inter_isolation_network_link = inter_isolation_network_link end @inter_switch_link = inter_switch_link unless inter_switch_link == SKIP @mac_auth_only = mac_auth_only unless mac_auth_only == SKIP @mac_auth_preferred = mac_auth_preferred unless mac_auth_preferred == SKIP @mac_auth_protocol = mac_auth_protocol unless mac_auth_protocol == SKIP @mac_limit = mac_limit unless mac_limit == SKIP @mode = mode unless mode == SKIP @mtu = mtu unless mtu == SKIP @networks = networks unless networks == SKIP @persist_mac = persist_mac unless persist_mac == SKIP @poe_disabled = poe_disabled unless poe_disabled == SKIP unless poe_keep_state_when_reboot == SKIP @poe_keep_state_when_reboot = poe_keep_state_when_reboot end @poe_priority = poe_priority unless poe_priority == SKIP @port_auth = port_auth unless port_auth == SKIP @port_network = port_network unless port_network == SKIP @reauth_interval = reauth_interval unless reauth_interval == SKIP @reset_default_when = reset_default_when unless reset_default_when == SKIP @rules = rules unless rules == SKIP @server_fail_network = server_fail_network unless server_fail_network == SKIP @server_reject_network = server_reject_network unless server_reject_network == SKIP @speed = speed unless speed == SKIP @storm_control = storm_control unless storm_control == SKIP @stp_disable = stp_disable unless stp_disable == SKIP @stp_edge = stp_edge unless stp_edge == SKIP @stp_no_root_port = stp_no_root_port unless stp_no_root_port == SKIP @stp_p2p = stp_p2p unless stp_p2p == SKIP @stp_required = stp_required unless stp_required == SKIP @ui_evpntopo_id = ui_evpntopo_id unless ui_evpntopo_id == SKIP @use_vstp = use_vstp unless use_vstp == SKIP @voip_network = voip_network unless voip_network == SKIP end |
Instance Attribute Details
#all_networks ⇒ TrueClass | FalseClass
Only if ‘mode`==`trunk`. Whether to trunk all network/vlans
14 15 16 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 14 def all_networks @all_networks end |
#allow_dhcpd ⇒ TrueClass | FalseClass
Only applies when ‘mode`!=`dynamic`. Controls whether DHCP server traffic is allowed on ports using this configuration if DHCP snooping is enabled. This is a tri-state setting; `true`: ports become trusted ports allowing DHCP server traffic, `false`: ports become untrusted blocking DHCP server traffic, undefined: use system defaults (access ports default to untrusted, trunk ports default to trusted).
23 24 25 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 23 def allow_dhcpd @allow_dhcpd end |
#allow_multiple_supplicants ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`
27 28 29 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 27 def allow_multiple_supplicants @allow_multiple_supplicants end |
#bypass_auth_when_server_down ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. Bypass auth for known clients if set to true when RADIUS server is down
32 33 34 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 32 def bypass_auth_when_server_down @bypass_auth_when_server_down end |
#bypass_auth_when_server_down_for_unknown_client ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`=`dot1x`. Bypass auth for all (including unknown clients) if set to true when RADIUS server is down
37 38 39 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 37 def bypass_auth_when_server_down_for_unknown_client @bypass_auth_when_server_down_for_unknown_client end |
#bypass_auth_when_server_down_for_voip ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. Bypass auth for VOIP if set to true when RADIUS server is down
42 43 44 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 42 def bypass_auth_when_server_down_for_voip @bypass_auth_when_server_down_for_voip end |
#community_vlan_id ⇒ Integer
Only if ‘mode`!=`dynamic`. To be used together with `isolation` under networks. Signaling that this port connects to the networks isolated but wired clients belong to the same community can talk to each other
48 49 50 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 48 def community_vlan_id @community_vlan_id end |
#description ⇒ String
Only if ‘mode`!=`dynamic`
52 53 54 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 52 def description @description end |
#disable_autoneg ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. If speed and duplex are specified, whether to disable autonegotiation
57 58 59 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 57 def disable_autoneg @disable_autoneg end |
#disabled ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. Whether the port is disabled
61 62 63 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 61 def disabled @disabled end |
#duplex ⇒ SwitchPortUsageDuplexEnum
Only if ‘mode`!=`dynamic`. Link connection mode. enum: `auto`, `full`, `half`
66 67 68 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 66 def duplex @duplex end |
#dynamic_vlan_networks ⇒ Array[String]
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`, if dynamic vlan is used, specify the possible networks/vlans RADIUS can return
71 72 73 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 71 def dynamic_vlan_networks @dynamic_vlan_networks end |
#enable_mac_auth ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. Whether to enable MAC Auth
76 77 78 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 76 def enable_mac_auth @enable_mac_auth end |
#enable_qos ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`
80 81 82 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 80 def enable_qos @enable_qos end |
#guest_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. Which network to put the device into if the device cannot do dot1x. default is null (i.e. not allowed)
86 87 88 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 86 def guest_network @guest_network end |
#inter_isolation_network_link ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. `inter_isolation_network_link` is used together with `isolation` under networks, signaling that this port connects to isolated networks
92 93 94 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 92 def inter_isolation_network_link @inter_isolation_network_link end |
#inter_switch_link ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. `inter_switch_link` is used together with `isolation` under networks. NOTE: `inter_switch_link` works only between Juniper devices. This has to be applied to both ports connected together
98 99 100 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 98 def inter_switch_link @inter_switch_link end |
#mac_auth_only ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `enable_mac_auth`==`true`
102 103 104 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 102 def mac_auth_only @mac_auth_only end |
#mac_auth_preferred ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` + `enable_mac_auth`==`true` + `mac_auth_only`==`false`, dot1x will be given priority then mac_auth. Enable this to prefer mac_auth over dot1x.
108 109 110 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 108 def mac_auth_preferred @mac_auth_preferred end |
#mac_auth_protocol ⇒ SwitchPortUsageMacAuthProtocolEnum
Only if ‘mode`!=`dynamic` and `enable_mac_auth` ==`true`. This type is ignored if mist_nac is enabled. enum: `eap-md5`, `eap-peap`, `pap`
113 114 115 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 113 def mac_auth_protocol @mac_auth_protocol end |
#mac_limit ⇒ Object
Only if ‘mode`!=`dynamic`, max number of mac addresses, default is 0 for unlimited, otherwise range is 1 to 16383 (upper bound constrained by platform)
119 120 121 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 119 def mac_limit @mac_limit end |
#mode ⇒ SwitchPortUsageModeEnum
‘mode`==`dynamic` must only be used if the port usage name is `dynamic`. enum: `access`, `dynamic`, `inet`, `trunk`
124 125 126 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 124 def mode @mode end |
#mtu ⇒ Object
Only if ‘mode`!=`dynamic` media maximum transmission unit (MTU) is the largest data unit that can be forwarded without fragmentation. The default value is 1514.
130 131 132 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 130 def mtu @mtu end |
#networks ⇒ Array[String]
Only if ‘mode`==`trunk`, the list of network/vlans
134 135 136 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 134 def networks @networks end |
#persist_mac ⇒ TrueClass | FalseClass
Only if ‘mode`==`access` and `port_auth`!=`dot1x`. Whether the port should retain dynamically learned MAC addresses
139 140 141 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 139 def persist_mac @persist_mac end |
#poe_disabled ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. Whether PoE capabilities are disabled for a port
144 145 146 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 144 def poe_disabled @poe_disabled end |
#poe_keep_state_when_reboot ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. Whether Perpetual PoE is enabled; keeps PoE state across reboots
149 150 151 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 149 def poe_keep_state_when_reboot @poe_keep_state_when_reboot end |
#poe_priority ⇒ PoePriorityEnum
PoE priority. enum: ‘low`, `high`
153 154 155 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 153 def poe_priority @poe_priority end |
#port_auth ⇒ SwitchPortUsageDot1xEnum
Only if ‘mode`!=`dynamic`. If dot1x is desired, set to dot1x. enum: `dot1x`
158 159 160 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 158 def port_auth @port_auth end |
#port_network ⇒ String
Only if ‘mode`!=`dynamic`. Native network/vlan for untagged traffic
162 163 164 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 162 def port_network @port_network end |
#reauth_interval ⇒ Object
Only if ‘mode`!=`dynamic` and `port_auth`=`dot1x` reauthentication interval range (min: 10, max: 65535, default: 3600). Set to 0 to disable reauthentication (no-reauthentication).
168 169 170 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 168 def reauth_interval @reauth_interval end |
#reset_default_when ⇒ SwitchPortUsageDynamicResetDefaultWhenEnum
Only if ‘mode`==`dynamic` Control when the DPC port should be changed to the default port usage. enum: `link_down`, `none` (let the DPC port keep at the current port usage)
174 175 176 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 174 def reset_default_when @reset_default_when end |
#rules ⇒ Array[SwitchPortUsageDynamicRule]
Only if ‘mode`==`dynamic`
178 179 180 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 178 def rules @rules end |
#server_fail_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. Sets server fail fallback vlan
183 184 185 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 183 def server_fail_network @server_fail_network end |
#server_reject_network ⇒ String
Only if ‘mode`!=`dynamic` and `port_auth`==`dot1x`. When radius server reject / fails
188 189 190 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 188 def server_reject_network @server_reject_network end |
#speed ⇒ SwitchPortUsageSpeedEnum
Only if ‘mode`!=`dynamic`, Port speed, default is auto to automatically negotiate speed enum: `100m`, `10m`, `1g`, `2.5g`, `5g`, `10g`, `25g`, `40g`, `100g`,`auto`
194 195 196 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 194 def speed @speed end |
#storm_control ⇒ SwitchPortUsageStormControl
Switch storm control. Only if ‘mode`!=`dynamic`
198 199 200 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 198 def storm_control @storm_control end |
#stp_disable ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic` and `stp_required`==`false`. Drop bridge protocol data units (BPDUs ) that enter any interface or a specified interface
204 205 206 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 204 def stp_disable @stp_disable end |
#stp_edge ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. When enabled, the port is not expected to receive BPDU frames
209 210 211 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 209 def stp_edge @stp_edge end |
#stp_no_root_port ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`
213 214 215 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 213 def stp_no_root_port @stp_no_root_port end |
#stp_p2p ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`
217 218 219 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 217 def stp_p2p @stp_p2p end |
#stp_required ⇒ TrueClass | FalseClass
Only if ‘mode`!=`dynamic`. Whether to remain in block state if no BPDU is received
222 223 224 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 222 def stp_required @stp_required end |
#ui_evpntopo_id ⇒ UUID | String
Optional for Campus Fabric Core-Distribution ESI-LAG profile. Helper used by the UI to select this port profile as the ESI-Lag between Distribution and Access switches
228 229 230 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 228 def ui_evpntopo_id @ui_evpntopo_id end |
#use_vstp ⇒ TrueClass | FalseClass
If this is connected to a vstp network
232 233 234 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 232 def use_vstp @use_vstp end |
#voip_network ⇒ String
Only if ‘mode`!=`dynamic`. Network/vlan for voip traffic, must also set port_network. to authenticate device, set port_auth
237 238 239 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 237 def voip_network @voip_network end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 442 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. all_networks = hash['all_networks'] ||= false allow_dhcpd = hash.key?('allow_dhcpd') ? hash['allow_dhcpd'] : SKIP allow_multiple_supplicants = hash['allow_multiple_supplicants'] ||= false bypass_auth_when_server_down = hash['bypass_auth_when_server_down'] ||= false bypass_auth_when_server_down_for_unknown_client = hash['bypass_auth_when_server_down_for_unknown_client'] ||= false bypass_auth_when_server_down_for_voip = hash['bypass_auth_when_server_down_for_voip'] ||= false community_vlan_id = hash.key?('community_vlan_id') ? hash['community_vlan_id'] : SKIP description = hash.key?('description') ? hash['description'] : SKIP disable_autoneg = hash['disable_autoneg'] ||= false disabled = hash['disabled'] ||= false duplex = hash['duplex'] ||= SwitchPortUsageDuplexEnum::AUTO dynamic_vlan_networks = hash.key?('dynamic_vlan_networks') ? hash['dynamic_vlan_networks'] : SKIP enable_mac_auth = hash['enable_mac_auth'] ||= false enable_qos = hash['enable_qos'] ||= false guest_network = hash.key?('guest_network') ? hash['guest_network'] : SKIP inter_isolation_network_link = hash['inter_isolation_network_link'] ||= false inter_switch_link = hash['inter_switch_link'] ||= false mac_auth_only = hash.key?('mac_auth_only') ? hash['mac_auth_only'] : SKIP mac_auth_preferred = hash.key?('mac_auth_preferred') ? hash['mac_auth_preferred'] : SKIP mac_auth_protocol = hash['mac_auth_protocol'] ||= SwitchPortUsageMacAuthProtocolEnum::EAPMD5 mac_limit = hash.key?('mac_limit') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:SwitchPortUsageMacLimit), hash['mac_limit'] ) : SKIP mode = hash.key?('mode') ? hash['mode'] : SKIP mtu = hash.key?('mtu') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:SwitchPortUsageMtu), hash['mtu'] ) : SKIP networks = hash.key?('networks') ? hash['networks'] : SKIP persist_mac = hash['persist_mac'] ||= false poe_disabled = hash['poe_disabled'] ||= false poe_keep_state_when_reboot = hash['poe_keep_state_when_reboot'] ||= false poe_priority = hash.key?('poe_priority') ? hash['poe_priority'] : SKIP port_auth = hash.key?('port_auth') ? hash['port_auth'] : SKIP port_network = hash.key?('port_network') ? hash['port_network'] : SKIP reauth_interval = hash.key?('reauth_interval') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:SwitchPortUsageReauthInterval), hash['reauth_interval'] ) : SKIP reset_default_when = hash['reset_default_when'] ||= SwitchPortUsageDynamicResetDefaultWhenEnum::LINK_DOWN # Parameter is an array, so we need to iterate through it rules = nil unless hash['rules'].nil? rules = [] hash['rules'].each do |structure| rules << (SwitchPortUsageDynamicRule.from_hash(structure) if structure) end end rules = SKIP unless hash.key?('rules') server_fail_network = hash.key?('server_fail_network') ? hash['server_fail_network'] : SKIP server_reject_network = hash.key?('server_reject_network') ? hash['server_reject_network'] : SKIP speed = hash['speed'] ||= SwitchPortUsageSpeedEnum::AUTO storm_control = SwitchPortUsageStormControl.from_hash(hash['storm_control']) if hash['storm_control'] stp_disable = hash['stp_disable'] ||= false stp_edge = hash['stp_edge'] ||= false stp_no_root_port = hash['stp_no_root_port'] ||= false stp_p2p = hash['stp_p2p'] ||= false stp_required = hash['stp_required'] ||= false ui_evpntopo_id = hash.key?('ui_evpntopo_id') ? hash['ui_evpntopo_id'] : SKIP use_vstp = hash['use_vstp'] ||= false voip_network = hash.key?('voip_network') ? hash['voip_network'] : SKIP # Create object from extracted values. SwitchPortUsage.new(all_networks, allow_dhcpd, allow_multiple_supplicants, bypass_auth_when_server_down, bypass_auth_when_server_down_for_unknown_client, bypass_auth_when_server_down_for_voip, community_vlan_id, description, disable_autoneg, disabled, duplex, dynamic_vlan_networks, enable_mac_auth, enable_qos, guest_network, inter_isolation_network_link, inter_switch_link, mac_auth_only, mac_auth_preferred, mac_auth_protocol, mac_limit, mode, mtu, networks, persist_mac, poe_disabled, poe_keep_state_when_reboot, poe_priority, port_auth, port_network, reauth_interval, reset_default_when, rules, server_fail_network, server_reject_network, speed, storm_control, stp_disable, stp_edge, stp_no_root_port, stp_p2p, stp_required, ui_evpntopo_id, use_vstp, voip_network) end |
.names ⇒ Object
A mapping from model property names to API property names.
240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 240 def self.names @_hash = {} if @_hash.nil? @_hash['all_networks'] = 'all_networks' @_hash['allow_dhcpd'] = 'allow_dhcpd' @_hash['allow_multiple_supplicants'] = 'allow_multiple_supplicants' @_hash['bypass_auth_when_server_down'] = 'bypass_auth_when_server_down' @_hash['bypass_auth_when_server_down_for_unknown_client'] = 'bypass_auth_when_server_down_for_unknown_client' @_hash['bypass_auth_when_server_down_for_voip'] = 'bypass_auth_when_server_down_for_voip' @_hash['community_vlan_id'] = 'community_vlan_id' @_hash['description'] = 'description' @_hash['disable_autoneg'] = 'disable_autoneg' @_hash['disabled'] = 'disabled' @_hash['duplex'] = 'duplex' @_hash['dynamic_vlan_networks'] = 'dynamic_vlan_networks' @_hash['enable_mac_auth'] = 'enable_mac_auth' @_hash['enable_qos'] = 'enable_qos' @_hash['guest_network'] = 'guest_network' @_hash['inter_isolation_network_link'] = 'inter_isolation_network_link' @_hash['inter_switch_link'] = 'inter_switch_link' @_hash['mac_auth_only'] = 'mac_auth_only' @_hash['mac_auth_preferred'] = 'mac_auth_preferred' @_hash['mac_auth_protocol'] = 'mac_auth_protocol' @_hash['mac_limit'] = 'mac_limit' @_hash['mode'] = 'mode' @_hash['mtu'] = 'mtu' @_hash['networks'] = 'networks' @_hash['persist_mac'] = 'persist_mac' @_hash['poe_disabled'] = 'poe_disabled' @_hash['poe_keep_state_when_reboot'] = 'poe_keep_state_when_reboot' @_hash['poe_priority'] = 'poe_priority' @_hash['port_auth'] = 'port_auth' @_hash['port_network'] = 'port_network' @_hash['reauth_interval'] = 'reauth_interval' @_hash['reset_default_when'] = 'reset_default_when' @_hash['rules'] = 'rules' @_hash['server_fail_network'] = 'server_fail_network' @_hash['server_reject_network'] = 'server_reject_network' @_hash['speed'] = 'speed' @_hash['storm_control'] = 'storm_control' @_hash['stp_disable'] = 'stp_disable' @_hash['stp_edge'] = 'stp_edge' @_hash['stp_no_root_port'] = 'stp_no_root_port' @_hash['stp_p2p'] = 'stp_p2p' @_hash['stp_required'] = 'stp_required' @_hash['ui_evpntopo_id'] = 'ui_evpntopo_id' @_hash['use_vstp'] = 'use_vstp' @_hash['voip_network'] = 'voip_network' @_hash end |
.nullables ⇒ Object
An array for nullable fields
344 345 346 347 348 349 350 351 352 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 344 def self.nullables %w[ guest_network port_auth server_fail_network server_reject_network voip_network ] end |
.optionals ⇒ Object
An array for optional fields
293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 293 def self.optionals %w[ all_networks allow_dhcpd allow_multiple_supplicants bypass_auth_when_server_down bypass_auth_when_server_down_for_unknown_client bypass_auth_when_server_down_for_voip community_vlan_id description disable_autoneg disabled duplex dynamic_vlan_networks enable_mac_auth enable_qos guest_network inter_isolation_network_link inter_switch_link mac_auth_only mac_auth_preferred mac_auth_protocol mac_limit mode mtu networks persist_mac poe_disabled poe_keep_state_when_reboot poe_priority port_auth port_network reauth_interval reset_default_when rules server_fail_network server_reject_network speed storm_control stp_disable stp_edge stp_no_root_port stp_p2p stp_required ui_evpntopo_id use_vstp voip_network ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
570 571 572 573 574 575 576 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 570 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 606 def inspect class_name = self.class.name.split('::').last "<#{class_name} all_networks: #{@all_networks.inspect}, allow_dhcpd:"\ " #{@allow_dhcpd.inspect}, allow_multiple_supplicants:"\ " #{@allow_multiple_supplicants.inspect}, bypass_auth_when_server_down:"\ " #{@bypass_auth_when_server_down.inspect}, bypass_auth_when_server_down_for_unknown_client:"\ " #{@bypass_auth_when_server_down_for_unknown_client.inspect},"\ " bypass_auth_when_server_down_for_voip: #{@bypass_auth_when_server_down_for_voip.inspect},"\ " community_vlan_id: #{@community_vlan_id.inspect}, description: #{@description.inspect},"\ " disable_autoneg: #{@disable_autoneg.inspect}, disabled: #{@disabled.inspect}, duplex:"\ " #{@duplex.inspect}, dynamic_vlan_networks: #{@dynamic_vlan_networks.inspect},"\ " enable_mac_auth: #{@enable_mac_auth.inspect}, enable_qos: #{@enable_qos.inspect},"\ " guest_network: #{@guest_network.inspect}, inter_isolation_network_link:"\ " #{@inter_isolation_network_link.inspect}, inter_switch_link:"\ " #{@inter_switch_link.inspect}, mac_auth_only: #{@mac_auth_only.inspect},"\ " mac_auth_preferred: #{@mac_auth_preferred.inspect}, mac_auth_protocol:"\ " #{@mac_auth_protocol.inspect}, mac_limit: #{@mac_limit.inspect}, mode: #{@mode.inspect},"\ " mtu: #{@mtu.inspect}, networks: #{@networks.inspect}, persist_mac:"\ " #{@persist_mac.inspect}, poe_disabled: #{@poe_disabled.inspect},"\ " poe_keep_state_when_reboot: #{@poe_keep_state_when_reboot.inspect}, poe_priority:"\ " #{@poe_priority.inspect}, port_auth: #{@port_auth.inspect}, port_network:"\ " #{@port_network.inspect}, reauth_interval: #{@reauth_interval.inspect},"\ " reset_default_when: #{@reset_default_when.inspect}, rules: #{@rules.inspect},"\ " server_fail_network: #{@server_fail_network.inspect}, server_reject_network:"\ " #{@server_reject_network.inspect}, speed: #{@speed.inspect}, storm_control:"\ " #{@storm_control.inspect}, stp_disable: #{@stp_disable.inspect}, stp_edge:"\ " #{@stp_edge.inspect}, stp_no_root_port: #{@stp_no_root_port.inspect}, stp_p2p:"\ " #{@stp_p2p.inspect}, stp_required: #{@stp_required.inspect}, ui_evpntopo_id:"\ " #{@ui_evpntopo_id.inspect}, use_vstp: #{@use_vstp.inspect}, voip_network:"\ " #{@voip_network.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 |
# File 'lib/mist_api/models/switch_port_usage.rb', line 579 def to_s class_name = self.class.name.split('::').last "<#{class_name} all_networks: #{@all_networks}, allow_dhcpd: #{@allow_dhcpd},"\ " allow_multiple_supplicants: #{@allow_multiple_supplicants}, bypass_auth_when_server_down:"\ " #{@bypass_auth_when_server_down}, bypass_auth_when_server_down_for_unknown_client:"\ " #{@bypass_auth_when_server_down_for_unknown_client},"\ " bypass_auth_when_server_down_for_voip: #{@bypass_auth_when_server_down_for_voip},"\ " community_vlan_id: #{@community_vlan_id}, description: #{@description}, disable_autoneg:"\ " #{@disable_autoneg}, disabled: #{@disabled}, duplex: #{@duplex}, dynamic_vlan_networks:"\ " #{@dynamic_vlan_networks}, enable_mac_auth: #{@enable_mac_auth}, enable_qos:"\ " #{@enable_qos}, guest_network: #{@guest_network}, inter_isolation_network_link:"\ " #{@inter_isolation_network_link}, inter_switch_link: #{@inter_switch_link}, mac_auth_only:"\ " #{@mac_auth_only}, mac_auth_preferred: #{@mac_auth_preferred}, mac_auth_protocol:"\ " #{@mac_auth_protocol}, mac_limit: #{@mac_limit}, mode: #{@mode}, mtu: #{@mtu}, networks:"\ " #{@networks}, persist_mac: #{@persist_mac}, poe_disabled: #{@poe_disabled},"\ " poe_keep_state_when_reboot: #{@poe_keep_state_when_reboot}, poe_priority:"\ " #{@poe_priority}, port_auth: #{@port_auth}, port_network: #{@port_network},"\ " reauth_interval: #{@reauth_interval}, reset_default_when: #{@reset_default_when}, rules:"\ " #{@rules}, server_fail_network: #{@server_fail_network}, server_reject_network:"\ " #{@server_reject_network}, speed: #{@speed}, storm_control: #{@storm_control},"\ " stp_disable: #{@stp_disable}, stp_edge: #{@stp_edge}, stp_no_root_port:"\ " #{@stp_no_root_port}, stp_p2p: #{@stp_p2p}, stp_required: #{@stp_required},"\ " ui_evpntopo_id: #{@ui_evpntopo_id}, use_vstp: #{@use_vstp}, voip_network:"\ " #{@voip_network}>" end |