Class: MistApi::GatewayPortConfig
- Defined in:
- lib/mist_api/models/gateway_port_config.rb
Overview
Gateway port config
Instance Attribute Summary collapse
-
#ae_disable_lacp ⇒ TrueClass | FalseClass
If ‘aggregated`==`true`.
-
#ae_idx ⇒ String
If ‘aggregated`==`true`.
-
#ae_lacp_force_up ⇒ TrueClass | FalseClass
For SRX only, if ‘aggregated`==`true`.Sets the state of the interface as UP when the peer has limited LACP capability.
-
#aggregated ⇒ TrueClass | FalseClass
For SRX only, if ‘aggregated`==`true`.Sets the state of the interface as UP when the peer has limited LACP capability.
-
#critical ⇒ TrueClass | FalseClass
To generate port up/down alarm, set it to true.
-
#description ⇒ String
Interface Description.
-
#disable_autoneg ⇒ TrueClass | FalseClass
Interface Description.
-
#disabled ⇒ TrueClass | FalseClass
Port admin up (true) / down (false).
-
#dsl_type ⇒ GatewayPortDslTypeEnum
if ‘wan_type`==`dsl`.
-
#dsl_vci ⇒ Integer
If ‘wan_type`==`dsl`, 16 bit int.
-
#dsl_vpi ⇒ Integer
If ‘wan_type`==`dsl`, 8 bit int.
-
#duplex ⇒ GatewayPortDuplexEnum
enum: ‘auto`, `full`, `half`.
-
#ip_config ⇒ GatewayPortConfigIpConfig
Junos IP Config.
-
#lte_apn ⇒ String
If ‘wan_type`==`lte`.
-
#lte_auth ⇒ GatewayPortLteAuthEnum
if ‘wan_type`==`lte`.
-
#lte_backup ⇒ TrueClass | FalseClass
if ‘wan_type`==`lte`.
-
#lte_password ⇒ String
If ‘wan_type`==`lte`.
-
#lte_username ⇒ String
If ‘wan_type`==`lte`.
-
#mtu ⇒ Integer
If ‘wan_type`==`lte`.
-
#name ⇒ String
Name that we’ll use to derive config.
-
#networks ⇒ Array[String]
If ‘usage`==`lan`, name of the [networks]($h/Orgs%20Networks/_overview) to attach to the interface.
-
#outer_vlan_id ⇒ Integer
For Q-in-Q.
-
#poe_disabled ⇒ TrueClass | FalseClass
For Q-in-Q.
-
#poe_keep_state_when_reboot ⇒ TrueClass | FalseClass
Whether Perpetual PoE capabilities are enabled for a port.
-
#port_network ⇒ String
Only for SRX and if ‘usage`==`lan`, the name of the Network to be used as the Untagged VLAN.
-
#preserve_dscp ⇒ TrueClass | FalseClass
Whether to preserve dscp when sending traffic over VPN (SSR-only).
-
#redundant ⇒ TrueClass | FalseClass
If HA mode.
-
#redundant_group ⇒ Integer
If HA mode, SRX Only - support redundancy-group.
-
#reth_idx ⇒ Object
For SRX only and if HA Mode.
-
#reth_node ⇒ String
If HA mode.
-
#reth_nodes ⇒ Array[String]
SSR only - supporting vlan-based redundancy (matching the size of ‘networks`).
-
#speed ⇒ String
SSR only - supporting vlan-based redundancy (matching the size of ‘networks`).
-
#ssr_no_virtual_mac ⇒ TrueClass | FalseClass
When SSR is running as VM, this is required on certain hosting platforms.
-
#svr_port_range ⇒ String
For SSR only.
-
#traffic_shaping ⇒ GatewayTrafficShaping
For SSR only.
-
#usage ⇒ GatewayPortUsageEnum
port usage name.
-
#vlan_id ⇒ Object
If WAN interface is on a VLAN.
-
#vpn_paths ⇒ Hash[String, GatewayPortVpnPath]
Property key is the VPN name.
-
#wan_arp_policer ⇒ GatewayPortWanArpPolicerEnum
Only when ‘wan_type`==`broadband`.
-
#wan_ext_ip ⇒ String
Only if ‘usage`==`wan`, optional.
-
#wan_ext_ip6 ⇒ String
Only if ‘usage`==`wan`, optional.
-
#wan_extra_routes ⇒ Hash[String, WanExtraRoutes]
Only if ‘usage`==`wan`.
-
#wan_extra_routes6 ⇒ Hash[String, WanExtraRoutes]
Only if ‘usage`==`wan`.
-
#wan_networks ⇒ Array[String]
Only if ‘usage`==`wan`.
-
#wan_probe_override ⇒ GatewayWanProbeOverride
Only if ‘usage`==`wan`.
-
#wan_source_nat ⇒ GatewayPortWanSourceNat
Only if ‘usage`==`wan`, optional.
-
#wan_speedtest_mode ⇒ GatewayPortConfigWanSpeedtestModeEnum
Controls whether Marvis/scheduler can run speedtest on this port.
-
#wan_type ⇒ GatewayPortWanTypeEnum
Only if ‘usage`==`wan`.
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(usage = nil, ae_disable_lacp = false, ae_idx = SKIP, ae_lacp_force_up = false, aggregated = false, critical = false, description = SKIP, disable_autoneg = false, disabled = false, dsl_type = GatewayPortDslTypeEnum::VDSL, dsl_vci = 35, dsl_vpi = 0, duplex = GatewayPortDuplexEnum::AUTO, ip_config = SKIP, lte_apn = SKIP, lte_auth = GatewayPortLteAuthEnum::NONE, lte_backup = SKIP, lte_password = SKIP, lte_username = SKIP, mtu = SKIP, name = SKIP, networks = SKIP, outer_vlan_id = SKIP, poe_disabled = false, poe_keep_state_when_reboot = false, port_network = SKIP, preserve_dscp = true, redundant = SKIP, redundant_group = SKIP, reth_idx = SKIP, reth_node = SKIP, reth_nodes = SKIP, speed = 'auto', ssr_no_virtual_mac = false, svr_port_range = 'none', traffic_shaping = SKIP, vlan_id = SKIP, vpn_paths = SKIP, wan_arp_policer = GatewayPortWanArpPolicerEnum::DEFAULT, wan_ext_ip = SKIP, wan_ext_ip6 = SKIP, wan_extra_routes = SKIP, wan_extra_routes6 = SKIP, wan_networks = SKIP, wan_probe_override = SKIP, wan_source_nat = SKIP, wan_speedtest_mode = GatewayPortConfigWanSpeedtestModeEnum::AUTO, wan_type = GatewayPortWanTypeEnum::BROADBAND) ⇒ GatewayPortConfig
constructor
A new instance of GatewayPortConfig.
-
#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(usage = nil, ae_disable_lacp = false, ae_idx = SKIP, ae_lacp_force_up = false, aggregated = false, critical = false, description = SKIP, disable_autoneg = false, disabled = false, dsl_type = GatewayPortDslTypeEnum::VDSL, dsl_vci = 35, dsl_vpi = 0, duplex = GatewayPortDuplexEnum::AUTO, ip_config = SKIP, lte_apn = SKIP, lte_auth = GatewayPortLteAuthEnum::NONE, lte_backup = SKIP, lte_password = SKIP, lte_username = SKIP, mtu = SKIP, name = SKIP, networks = SKIP, outer_vlan_id = SKIP, poe_disabled = false, poe_keep_state_when_reboot = false, port_network = SKIP, preserve_dscp = true, redundant = SKIP, redundant_group = SKIP, reth_idx = SKIP, reth_node = SKIP, reth_nodes = SKIP, speed = 'auto', ssr_no_virtual_mac = false, svr_port_range = 'none', traffic_shaping = SKIP, vlan_id = SKIP, vpn_paths = SKIP, wan_arp_policer = GatewayPortWanArpPolicerEnum::DEFAULT, wan_ext_ip = SKIP, wan_ext_ip6 = SKIP, wan_extra_routes = SKIP, wan_extra_routes6 = SKIP, wan_networks = SKIP, wan_probe_override = SKIP, wan_source_nat = SKIP, wan_speedtest_mode = GatewayPortConfigWanSpeedtestModeEnum::AUTO, wan_type = GatewayPortWanTypeEnum::BROADBAND) ⇒ GatewayPortConfig
Returns a new instance of GatewayPortConfig.
342 343 344 345 346 347 348 349 350 351 352 353 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 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 342 def initialize( usage = nil, ae_disable_lacp = false, ae_idx = SKIP, ae_lacp_force_up = false, aggregated = false, critical = false, description = SKIP, disable_autoneg = false, disabled = false, dsl_type = GatewayPortDslTypeEnum::VDSL, dsl_vci = 35, dsl_vpi = 0, duplex = GatewayPortDuplexEnum::AUTO, ip_config = SKIP, lte_apn = SKIP, lte_auth = GatewayPortLteAuthEnum::NONE, lte_backup = SKIP, lte_password = SKIP, lte_username = SKIP, mtu = SKIP, name = SKIP, networks = SKIP, outer_vlan_id = SKIP, poe_disabled = false, poe_keep_state_when_reboot = false, port_network = SKIP, preserve_dscp = true, redundant = SKIP, redundant_group = SKIP, reth_idx = SKIP, reth_node = SKIP, reth_nodes = SKIP, speed = 'auto', ssr_no_virtual_mac = false, svr_port_range = 'none', traffic_shaping = SKIP, vlan_id = SKIP, vpn_paths = SKIP, wan_arp_policer = GatewayPortWanArpPolicerEnum::DEFAULT, wan_ext_ip = SKIP, wan_ext_ip6 = SKIP, wan_extra_routes = SKIP, wan_extra_routes6 = SKIP, wan_networks = SKIP, wan_probe_override = SKIP, wan_source_nat = SKIP, wan_speedtest_mode = GatewayPortConfigWanSpeedtestModeEnum::AUTO, wan_type = GatewayPortWanTypeEnum::BROADBAND ) @ae_disable_lacp = ae_disable_lacp unless ae_disable_lacp == SKIP @ae_idx = ae_idx unless ae_idx == SKIP @ae_lacp_force_up = ae_lacp_force_up unless ae_lacp_force_up == SKIP @aggregated = aggregated unless aggregated == SKIP @critical = critical unless critical == SKIP @description = description unless description == SKIP @disable_autoneg = disable_autoneg unless disable_autoneg == SKIP @disabled = disabled unless disabled == SKIP @dsl_type = dsl_type unless dsl_type == SKIP @dsl_vci = dsl_vci unless dsl_vci == SKIP @dsl_vpi = dsl_vpi unless dsl_vpi == SKIP @duplex = duplex unless duplex == SKIP @ip_config = ip_config unless ip_config == SKIP @lte_apn = lte_apn unless lte_apn == SKIP @lte_auth = lte_auth unless lte_auth == SKIP @lte_backup = lte_backup unless lte_backup == SKIP @lte_password = lte_password unless lte_password == SKIP @lte_username = lte_username unless lte_username == SKIP @mtu = mtu unless mtu == SKIP @name = name unless name == SKIP @networks = networks unless networks == SKIP @outer_vlan_id = outer_vlan_id unless outer_vlan_id == 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 @port_network = port_network unless port_network == SKIP @preserve_dscp = preserve_dscp unless preserve_dscp == SKIP @redundant = redundant unless redundant == SKIP @redundant_group = redundant_group unless redundant_group == SKIP @reth_idx = reth_idx unless reth_idx == SKIP @reth_node = reth_node unless reth_node == SKIP @reth_nodes = reth_nodes unless reth_nodes == SKIP @speed = speed unless speed == SKIP @ssr_no_virtual_mac = ssr_no_virtual_mac unless ssr_no_virtual_mac == SKIP @svr_port_range = svr_port_range unless svr_port_range == SKIP @traffic_shaping = traffic_shaping unless traffic_shaping == SKIP @usage = usage @vlan_id = vlan_id unless vlan_id == SKIP @vpn_paths = vpn_paths unless vpn_paths == SKIP @wan_arp_policer = wan_arp_policer unless wan_arp_policer == SKIP @wan_ext_ip = wan_ext_ip unless wan_ext_ip == SKIP @wan_ext_ip6 = wan_ext_ip6 unless wan_ext_ip6 == SKIP @wan_extra_routes = wan_extra_routes unless wan_extra_routes == SKIP @wan_extra_routes6 = wan_extra_routes6 unless wan_extra_routes6 == SKIP @wan_networks = wan_networks unless wan_networks == SKIP @wan_probe_override = wan_probe_override unless wan_probe_override == SKIP @wan_source_nat = wan_source_nat unless wan_source_nat == SKIP @wan_speedtest_mode = wan_speedtest_mode unless wan_speedtest_mode == SKIP @wan_type = wan_type unless wan_type == SKIP end |
Instance Attribute Details
#ae_disable_lacp ⇒ TrueClass | FalseClass
If ‘aggregated`==`true`. To disable LCP support for the AE interface
14 15 16 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 14 def ae_disable_lacp @ae_disable_lacp end |
#ae_idx ⇒ String
If ‘aggregated`==`true`. Users could force to use the designated AE name (must be an integer between 0 and 127)
19 20 21 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 19 def ae_idx @ae_idx end |
#ae_lacp_force_up ⇒ TrueClass | FalseClass
For SRX only, if ‘aggregated`==`true`.Sets the state of the interface as UP when the peer has limited LACP capability. Use case: When a device connected to this AE port is ZTPing for the first time, it will not have LACP configured on the other end. Note: Turning this on will enable force-up on one of the interfaces in the bundle only
27 28 29 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 27 def ae_lacp_force_up @ae_lacp_force_up end |
#aggregated ⇒ TrueClass | FalseClass
For SRX only, if ‘aggregated`==`true`.Sets the state of the interface as UP when the peer has limited LACP capability. Use case: When a device connected to this AE port is ZTPing for the first time, it will not have LACP configured on the other end. Note: Turning this on will enable force-up on one of the interfaces in the bundle only
35 36 37 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 35 def aggregated @aggregated end |
#critical ⇒ TrueClass | FalseClass
To generate port up/down alarm, set it to true
39 40 41 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 39 def critical @critical end |
#description ⇒ String
Interface Description. Can be a variable (i.e. “{myvar}”)
43 44 45 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 43 def description @description end |
#disable_autoneg ⇒ TrueClass | FalseClass
Interface Description. Can be a variable (i.e. “{myvar}”)
47 48 49 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 47 def disable_autoneg @disable_autoneg end |
#disabled ⇒ TrueClass | FalseClass
Port admin up (true) / down (false)
51 52 53 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 51 def disabled @disabled end |
#dsl_type ⇒ GatewayPortDslTypeEnum
if ‘wan_type`==`dsl`. enum: `adsl`, `vdsl`
55 56 57 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 55 def dsl_type @dsl_type end |
#dsl_vci ⇒ Integer
If ‘wan_type`==`dsl`, 16 bit int
59 60 61 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 59 def dsl_vci @dsl_vci end |
#dsl_vpi ⇒ Integer
If ‘wan_type`==`dsl`, 8 bit int
63 64 65 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 63 def dsl_vpi @dsl_vpi end |
#duplex ⇒ GatewayPortDuplexEnum
enum: ‘auto`, `full`, `half`
67 68 69 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 67 def duplex @duplex end |
#ip_config ⇒ GatewayPortConfigIpConfig
Junos IP Config
71 72 73 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 71 def ip_config @ip_config end |
#lte_apn ⇒ String
If ‘wan_type`==`lte`
75 76 77 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 75 def lte_apn @lte_apn end |
#lte_auth ⇒ GatewayPortLteAuthEnum
if ‘wan_type`==`lte`. enum: `chap`, `none`, `pap`
79 80 81 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 79 def lte_auth @lte_auth end |
#lte_backup ⇒ TrueClass | FalseClass
if ‘wan_type`==`lte`. enum: `chap`, `none`, `pap`
83 84 85 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 83 def lte_backup @lte_backup end |
#lte_password ⇒ String
If ‘wan_type`==`lte`
87 88 89 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 87 def lte_password @lte_password end |
#lte_username ⇒ String
If ‘wan_type`==`lte`
91 92 93 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 91 def lte_username @lte_username end |
#mtu ⇒ Integer
If ‘wan_type`==`lte`
95 96 97 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 95 def mtu @mtu end |
#name ⇒ String
Name that we’ll use to derive config
99 100 101 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 99 def name @name end |
#networks ⇒ Array[String]
If ‘usage`==`lan`, name of the [networks]($h/Orgs%20Networks/_overview) to attach to the interface
104 105 106 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 104 def networks @networks end |
#outer_vlan_id ⇒ Integer
For Q-in-Q
108 109 110 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 108 def outer_vlan_id @outer_vlan_id end |
#poe_disabled ⇒ TrueClass | FalseClass
For Q-in-Q
112 113 114 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 112 def poe_disabled @poe_disabled end |
#poe_keep_state_when_reboot ⇒ TrueClass | FalseClass
Whether Perpetual PoE capabilities are enabled for a port
116 117 118 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 116 def poe_keep_state_when_reboot @poe_keep_state_when_reboot end |
#port_network ⇒ String
Only for SRX and if ‘usage`==`lan`, the name of the Network to be used as the Untagged VLAN
121 122 123 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 121 def port_network @port_network end |
#preserve_dscp ⇒ TrueClass | FalseClass
Whether to preserve dscp when sending traffic over VPN (SSR-only)
125 126 127 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 125 def preserve_dscp @preserve_dscp end |
#redundant ⇒ TrueClass | FalseClass
If HA mode
129 130 131 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 129 def redundant @redundant end |
#redundant_group ⇒ Integer
If HA mode, SRX Only - support redundancy-group. 1-128 for physical SRX, 1-64 for virtual SRX
134 135 136 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 134 def redundant_group @redundant_group end |
#reth_idx ⇒ Object
For SRX only and if HA Mode. ‘-1` means it will be managed by the device. Use `>= 0` values to manage it manually. Ensure no conflicting values are assigned across all ports.
140 141 142 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 140 def reth_idx @reth_idx end |
#reth_node ⇒ String
If HA mode
144 145 146 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 144 def reth_node @reth_node end |
#reth_nodes ⇒ Array[String]
SSR only - supporting vlan-based redundancy (matching the size of ‘networks`)
149 150 151 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 149 def reth_nodes @reth_nodes end |
#speed ⇒ String
SSR only - supporting vlan-based redundancy (matching the size of ‘networks`)
154 155 156 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 154 def speed @speed end |
#ssr_no_virtual_mac ⇒ TrueClass | FalseClass
When SSR is running as VM, this is required on certain hosting platforms
158 159 160 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 158 def ssr_no_virtual_mac @ssr_no_virtual_mac end |
#svr_port_range ⇒ String
For SSR only
162 163 164 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 162 def svr_port_range @svr_port_range end |
#traffic_shaping ⇒ GatewayTrafficShaping
For SSR only
166 167 168 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 166 def traffic_shaping @traffic_shaping end |
#usage ⇒ GatewayPortUsageEnum
port usage name. enum: ‘ha_control`, `ha_data`, `lan`, `wan`
170 171 172 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 170 def usage @usage end |
#vlan_id ⇒ Object
If WAN interface is on a VLAN. Can be the VLAN ID (i.e. “10”) or a Variable (i.e. “{myvar}”)
175 176 177 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 175 def vlan_id @vlan_id end |
#vpn_paths ⇒ Hash[String, GatewayPortVpnPath]
Property key is the VPN name
179 180 181 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 179 def vpn_paths @vpn_paths end |
#wan_arp_policer ⇒ GatewayPortWanArpPolicerEnum
Only when ‘wan_type`==`broadband`. enum: `default`, `max`, `recommended`
183 184 185 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 183 def wan_arp_policer @wan_arp_policer end |
#wan_ext_ip ⇒ String
Only if ‘usage`==`wan`, optional. If spoke should reach this port by a different IP
188 189 190 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 188 def wan_ext_ip @wan_ext_ip end |
#wan_ext_ip6 ⇒ String
Only if ‘usage`==`wan`, optional. If spoke should reach this port by a different IPv6
193 194 195 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 193 def wan_ext_ip6 @wan_ext_ip6 end |
#wan_extra_routes ⇒ Hash[String, WanExtraRoutes]
Only if ‘usage`==`wan`. Property Key is the destination CIDR (e.g. “100.100.100.0/24”)
198 199 200 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 198 def wan_extra_routes @wan_extra_routes end |
#wan_extra_routes6 ⇒ Hash[String, WanExtraRoutes]
Only if ‘usage`==`wan`. Property Key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”)
203 204 205 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 203 def wan_extra_routes6 @wan_extra_routes6 end |
#wan_networks ⇒ Array[String]
Only if ‘usage`==`wan`. If some networks are connected to this WAN port, it can be added here so policies can be defined
208 209 210 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 208 def wan_networks @wan_networks end |
#wan_probe_override ⇒ GatewayWanProbeOverride
Only if ‘usage`==`wan`
212 213 214 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 212 def wan_probe_override @wan_probe_override end |
#wan_source_nat ⇒ GatewayPortWanSourceNat
Only if ‘usage`==`wan`, optional. By default, source-NAT is performed on all WAN Ports using the interface-ip
217 218 219 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 217 def wan_source_nat @wan_source_nat end |
#wan_speedtest_mode ⇒ GatewayPortConfigWanSpeedtestModeEnum
Controls whether Marvis/scheduler can run speedtest on this port. enum: ‘auto`, `enabled`, `disabled`
222 223 224 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 222 def wan_speedtest_mode @wan_speedtest_mode end |
#wan_type ⇒ GatewayPortWanTypeEnum
Only if ‘usage`==`wan`. enum: `broadband`, `dsl`, `lte`
226 227 228 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 226 def wan_type @wan_type end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 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 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 417 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. usage = hash.key?('usage') ? hash['usage'] : nil ae_disable_lacp = hash['ae_disable_lacp'] ||= false ae_idx = hash.key?('ae_idx') ? hash['ae_idx'] : SKIP ae_lacp_force_up = hash['ae_lacp_force_up'] ||= false aggregated = hash['aggregated'] ||= false critical = hash['critical'] ||= false description = hash.key?('description') ? hash['description'] : SKIP disable_autoneg = hash['disable_autoneg'] ||= false disabled = hash['disabled'] ||= false dsl_type = hash['dsl_type'] ||= GatewayPortDslTypeEnum::VDSL dsl_vci = hash['dsl_vci'] ||= 35 dsl_vpi = hash['dsl_vpi'] ||= 0 duplex = hash['duplex'] ||= GatewayPortDuplexEnum::AUTO ip_config = GatewayPortConfigIpConfig.from_hash(hash['ip_config']) if hash['ip_config'] lte_apn = hash.key?('lte_apn') ? hash['lte_apn'] : SKIP lte_auth = hash['lte_auth'] ||= GatewayPortLteAuthEnum::NONE lte_backup = hash.key?('lte_backup') ? hash['lte_backup'] : SKIP lte_password = hash.key?('lte_password') ? hash['lte_password'] : SKIP lte_username = hash.key?('lte_username') ? hash['lte_username'] : SKIP mtu = hash.key?('mtu') ? hash['mtu'] : SKIP name = hash.key?('name') ? hash['name'] : SKIP networks = hash.key?('networks') ? hash['networks'] : SKIP outer_vlan_id = hash.key?('outer_vlan_id') ? hash['outer_vlan_id'] : SKIP poe_disabled = hash['poe_disabled'] ||= false poe_keep_state_when_reboot = hash['poe_keep_state_when_reboot'] ||= false port_network = hash.key?('port_network') ? hash['port_network'] : SKIP preserve_dscp = hash['preserve_dscp'] ||= true redundant = hash.key?('redundant') ? hash['redundant'] : SKIP redundant_group = hash.key?('redundant_group') ? hash['redundant_group'] : SKIP reth_idx = hash.key?('reth_idx') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:GatewayPortConfigRethIdx), hash['reth_idx'] ) : SKIP reth_node = hash.key?('reth_node') ? hash['reth_node'] : SKIP reth_nodes = hash.key?('reth_nodes') ? hash['reth_nodes'] : SKIP speed = hash['speed'] ||= 'auto' ssr_no_virtual_mac = hash['ssr_no_virtual_mac'] ||= false svr_port_range = hash['svr_port_range'] ||= 'none' traffic_shaping = GatewayTrafficShaping.from_hash(hash['traffic_shaping']) if hash['traffic_shaping'] vlan_id = hash.key?('vlan_id') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:GatewayPortVlanIdWithVariable), hash['vlan_id'] ) : SKIP vpn_paths = GatewayPortVpnPath.from_hash(hash['vpn_paths']) if hash['vpn_paths'] vpn_paths = SKIP unless hash.key?('vpn_paths') wan_arp_policer = hash['wan_arp_policer'] ||= GatewayPortWanArpPolicerEnum::DEFAULT wan_ext_ip = hash.key?('wan_ext_ip') ? hash['wan_ext_ip'] : SKIP wan_ext_ip6 = hash.key?('wan_ext_ip6') ? hash['wan_ext_ip6'] : SKIP wan_extra_routes = WanExtraRoutes.from_hash(hash['wan_extra_routes']) if hash['wan_extra_routes'] wan_extra_routes = SKIP unless hash.key?('wan_extra_routes') wan_extra_routes6 = WanExtraRoutes.from_hash(hash['wan_extra_routes6']) if hash['wan_extra_routes6'] wan_extra_routes6 = SKIP unless hash.key?('wan_extra_routes6') wan_networks = hash.key?('wan_networks') ? hash['wan_networks'] : SKIP wan_probe_override = GatewayWanProbeOverride.from_hash(hash['wan_probe_override']) if hash['wan_probe_override'] wan_source_nat = GatewayPortWanSourceNat.from_hash(hash['wan_source_nat']) if hash['wan_source_nat'] wan_speedtest_mode = hash['wan_speedtest_mode'] ||= GatewayPortConfigWanSpeedtestModeEnum::AUTO wan_type = hash['wan_type'] ||= GatewayPortWanTypeEnum::BROADBAND # Create object from extracted values. GatewayPortConfig.new(usage, ae_disable_lacp, ae_idx, ae_lacp_force_up, aggregated, critical, description, disable_autoneg, disabled, dsl_type, dsl_vci, dsl_vpi, duplex, ip_config, lte_apn, lte_auth, lte_backup, lte_password, lte_username, mtu, name, networks, outer_vlan_id, poe_disabled, poe_keep_state_when_reboot, port_network, preserve_dscp, redundant, redundant_group, reth_idx, reth_node, reth_nodes, speed, ssr_no_virtual_mac, svr_port_range, traffic_shaping, vlan_id, vpn_paths, wan_arp_policer, wan_ext_ip, wan_ext_ip6, wan_extra_routes, wan_extra_routes6, wan_networks, wan_probe_override, wan_source_nat, wan_speedtest_mode, wan_type) end |
.names ⇒ Object
A mapping from model property names to API property names.
229 230 231 232 233 234 235 236 237 238 239 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 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 229 def self.names @_hash = {} if @_hash.nil? @_hash['ae_disable_lacp'] = 'ae_disable_lacp' @_hash['ae_idx'] = 'ae_idx' @_hash['ae_lacp_force_up'] = 'ae_lacp_force_up' @_hash['aggregated'] = 'aggregated' @_hash['critical'] = 'critical' @_hash['description'] = 'description' @_hash['disable_autoneg'] = 'disable_autoneg' @_hash['disabled'] = 'disabled' @_hash['dsl_type'] = 'dsl_type' @_hash['dsl_vci'] = 'dsl_vci' @_hash['dsl_vpi'] = 'dsl_vpi' @_hash['duplex'] = 'duplex' @_hash['ip_config'] = 'ip_config' @_hash['lte_apn'] = 'lte_apn' @_hash['lte_auth'] = 'lte_auth' @_hash['lte_backup'] = 'lte_backup' @_hash['lte_password'] = 'lte_password' @_hash['lte_username'] = 'lte_username' @_hash['mtu'] = 'mtu' @_hash['name'] = 'name' @_hash['networks'] = 'networks' @_hash['outer_vlan_id'] = 'outer_vlan_id' @_hash['poe_disabled'] = 'poe_disabled' @_hash['poe_keep_state_when_reboot'] = 'poe_keep_state_when_reboot' @_hash['port_network'] = 'port_network' @_hash['preserve_dscp'] = 'preserve_dscp' @_hash['redundant'] = 'redundant' @_hash['redundant_group'] = 'redundant_group' @_hash['reth_idx'] = 'reth_idx' @_hash['reth_node'] = 'reth_node' @_hash['reth_nodes'] = 'reth_nodes' @_hash['speed'] = 'speed' @_hash['ssr_no_virtual_mac'] = 'ssr_no_virtual_mac' @_hash['svr_port_range'] = 'svr_port_range' @_hash['traffic_shaping'] = 'traffic_shaping' @_hash['usage'] = 'usage' @_hash['vlan_id'] = 'vlan_id' @_hash['vpn_paths'] = 'vpn_paths' @_hash['wan_arp_policer'] = 'wan_arp_policer' @_hash['wan_ext_ip'] = 'wan_ext_ip' @_hash['wan_ext_ip6'] = 'wan_ext_ip6' @_hash['wan_extra_routes'] = 'wan_extra_routes' @_hash['wan_extra_routes6'] = 'wan_extra_routes6' @_hash['wan_networks'] = 'wan_networks' @_hash['wan_probe_override'] = 'wan_probe_override' @_hash['wan_source_nat'] = 'wan_source_nat' @_hash['wan_speedtest_mode'] = 'wan_speedtest_mode' @_hash['wan_type'] = 'wan_type' @_hash end |
.nullables ⇒ Object
An array for nullable fields
336 337 338 339 340 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 336 def self.nullables %w[ ae_idx ] end |
.optionals ⇒ Object
An array for optional fields
283 284 285 286 287 288 289 290 291 292 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 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 283 def self.optionals %w[ ae_disable_lacp ae_idx ae_lacp_force_up aggregated critical description disable_autoneg disabled dsl_type dsl_vci dsl_vpi duplex ip_config lte_apn lte_auth lte_backup lte_password lte_username mtu name networks outer_vlan_id poe_disabled poe_keep_state_when_reboot port_network preserve_dscp redundant redundant_group reth_idx reth_node reth_nodes speed ssr_no_virtual_mac svr_port_range traffic_shaping vlan_id vpn_paths wan_arp_policer wan_ext_ip wan_ext_ip6 wan_extra_routes wan_extra_routes6 wan_networks wan_probe_override wan_source_nat wan_speedtest_mode wan_type ] end |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
541 542 543 544 545 546 547 548 549 550 551 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 541 def self.validate(value) if value.instance_of? self return APIHelper.valid_type?(value.usage, ->(val) { GatewayPortUsageEnum.validate(val) }) end return false unless value.instance_of? Hash APIHelper.valid_type?(value['usage'], ->(val) { GatewayPortUsageEnum.validate(val) }) end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
577 578 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/gateway_port_config.rb', line 577 def inspect class_name = self.class.name.split('::').last "<#{class_name} ae_disable_lacp: #{@ae_disable_lacp.inspect}, ae_idx: #{@ae_idx.inspect},"\ " ae_lacp_force_up: #{@ae_lacp_force_up.inspect}, aggregated: #{@aggregated.inspect},"\ " critical: #{@critical.inspect}, description: #{@description.inspect}, disable_autoneg:"\ " #{@disable_autoneg.inspect}, disabled: #{@disabled.inspect}, dsl_type:"\ " #{@dsl_type.inspect}, dsl_vci: #{@dsl_vci.inspect}, dsl_vpi: #{@dsl_vpi.inspect}, duplex:"\ " #{@duplex.inspect}, ip_config: #{@ip_config.inspect}, lte_apn: #{@lte_apn.inspect},"\ " lte_auth: #{@lte_auth.inspect}, lte_backup: #{@lte_backup.inspect}, lte_password:"\ " #{@lte_password.inspect}, lte_username: #{@lte_username.inspect}, mtu: #{@mtu.inspect},"\ " name: #{@name.inspect}, networks: #{@networks.inspect}, outer_vlan_id:"\ " #{@outer_vlan_id.inspect}, poe_disabled: #{@poe_disabled.inspect},"\ " poe_keep_state_when_reboot: #{@poe_keep_state_when_reboot.inspect}, port_network:"\ " #{@port_network.inspect}, preserve_dscp: #{@preserve_dscp.inspect}, redundant:"\ " #{@redundant.inspect}, redundant_group: #{@redundant_group.inspect}, reth_idx:"\ " #{@reth_idx.inspect}, reth_node: #{@reth_node.inspect}, reth_nodes:"\ " #{@reth_nodes.inspect}, speed: #{@speed.inspect}, ssr_no_virtual_mac:"\ " #{@ssr_no_virtual_mac.inspect}, svr_port_range: #{@svr_port_range.inspect},"\ " traffic_shaping: #{@traffic_shaping.inspect}, usage: #{@usage.inspect}, vlan_id:"\ " #{@vlan_id.inspect}, vpn_paths: #{@vpn_paths.inspect}, wan_arp_policer:"\ " #{@wan_arp_policer.inspect}, wan_ext_ip: #{@wan_ext_ip.inspect}, wan_ext_ip6:"\ " #{@wan_ext_ip6.inspect}, wan_extra_routes: #{@wan_extra_routes.inspect},"\ " wan_extra_routes6: #{@wan_extra_routes6.inspect}, wan_networks: #{@wan_networks.inspect},"\ " wan_probe_override: #{@wan_probe_override.inspect}, wan_source_nat:"\ " #{@wan_source_nat.inspect}, wan_speedtest_mode: #{@wan_speedtest_mode.inspect}, wan_type:"\ " #{@wan_type.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/mist_api/models/gateway_port_config.rb', line 554 def to_s class_name = self.class.name.split('::').last "<#{class_name} ae_disable_lacp: #{@ae_disable_lacp}, ae_idx: #{@ae_idx}, ae_lacp_force_up:"\ " #{@ae_lacp_force_up}, aggregated: #{@aggregated}, critical: #{@critical}, description:"\ " #{@description}, disable_autoneg: #{@disable_autoneg}, disabled: #{@disabled}, dsl_type:"\ " #{@dsl_type}, dsl_vci: #{@dsl_vci}, dsl_vpi: #{@dsl_vpi}, duplex: #{@duplex}, ip_config:"\ " #{@ip_config}, lte_apn: #{@lte_apn}, lte_auth: #{@lte_auth}, lte_backup: #{@lte_backup},"\ " lte_password: #{@lte_password}, lte_username: #{@lte_username}, mtu: #{@mtu}, name:"\ " #{@name}, networks: #{@networks}, outer_vlan_id: #{@outer_vlan_id}, poe_disabled:"\ " #{@poe_disabled}, poe_keep_state_when_reboot: #{@poe_keep_state_when_reboot},"\ " port_network: #{@port_network}, preserve_dscp: #{@preserve_dscp}, redundant:"\ " #{@redundant}, redundant_group: #{@redundant_group}, reth_idx: #{@reth_idx}, reth_node:"\ " #{@reth_node}, reth_nodes: #{@reth_nodes}, speed: #{@speed}, ssr_no_virtual_mac:"\ " #{@ssr_no_virtual_mac}, svr_port_range: #{@svr_port_range}, traffic_shaping:"\ " #{@traffic_shaping}, usage: #{@usage}, vlan_id: #{@vlan_id}, vpn_paths: #{@vpn_paths},"\ " wan_arp_policer: #{@wan_arp_policer}, wan_ext_ip: #{@wan_ext_ip}, wan_ext_ip6:"\ " #{@wan_ext_ip6}, wan_extra_routes: #{@wan_extra_routes}, wan_extra_routes6:"\ " #{@wan_extra_routes6}, wan_networks: #{@wan_networks}, wan_probe_override:"\ " #{@wan_probe_override}, wan_source_nat: #{@wan_source_nat}, wan_speedtest_mode:"\ " #{@wan_speedtest_mode}, wan_type: #{@wan_type}>" end |