Class: MistApi::SiteMxtunnel
- Defined in:
- lib/mist_api/models/site_mxtunnel.rb
Overview
Site MxTunnel
Instance Attribute Summary collapse
-
#additional_mxtunnels ⇒ Hash[String, SiteMxtunnelAdditionalMxtunnel]
TODO: Write general description for this method.
-
#ap_subnets ⇒ Array[String]
List of subnets where we allow AP to establish Mist Tunnels from.
-
#auto_preemption ⇒ AutoPreemption
Schedule to preempt ap’s which are not connected to preferred peer.
-
#clusters ⇒ Array[SiteMxtunnelCluster]
For AP, how to connect to tunterm or RadSec Proxy.
-
#created_time ⇒ Float
When the object has been created, in epoch.
-
#enabled ⇒ TrueClass | FalseClass
When the object has been created, in epoch.
-
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch.
-
#hello_interval ⇒ Integer
In seconds, used as heartbeat to detect if a tunnel is alive.
-
#hello_retries ⇒ Integer
In seconds, used as heartbeat to detect if a tunnel is alive.
-
#hosts ⇒ Array[String]
Hostnames or IPs where a Mist Tunnel will use as the Peer (i.e. they are reachable from AP).
-
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization.
-
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch.
-
#mtu ⇒ Integer
0 to enable MTU, 552-1500 to start MTU with a lower MTU.
-
#org_id ⇒ UUID | String
0 to enable MTU, 552-1500 to start MTU with a lower MTU.
-
#protocol ⇒ MxtunnelProtocolEnum
enum: ‘ip`, `udp`.
-
#radsec ⇒ SiteMxtunnelRadsec
enum: ‘ip`, `udp`.
-
#site_id ⇒ UUID | String
enum: ‘ip`, `udp`.
-
#vlan_ids ⇒ Array[Integer]
List of vlan_ids that will be used.
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(additional_mxtunnels = SKIP, ap_subnets = SKIP, auto_preemption = SKIP, clusters = SKIP, created_time = SKIP, enabled = SKIP, for_site = SKIP, hello_interval = 60, hello_retries = 7, hosts = SKIP, id = SKIP, modified_time = SKIP, mtu = 0, org_id = SKIP, protocol = MxtunnelProtocolEnum::UDP, radsec = SKIP, site_id = SKIP, vlan_ids = SKIP) ⇒ SiteMxtunnel
constructor
A new instance of SiteMxtunnel.
-
#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(additional_mxtunnels = SKIP, ap_subnets = SKIP, auto_preemption = SKIP, clusters = SKIP, created_time = SKIP, enabled = SKIP, for_site = SKIP, hello_interval = 60, hello_retries = 7, hosts = SKIP, id = SKIP, modified_time = SKIP, mtu = 0, org_id = SKIP, protocol = MxtunnelProtocolEnum::UDP, radsec = SKIP, site_id = SKIP, vlan_ids = SKIP) ⇒ SiteMxtunnel
Returns a new instance of SiteMxtunnel.
140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 140 def initialize(additional_mxtunnels = SKIP, ap_subnets = SKIP, auto_preemption = SKIP, clusters = SKIP, created_time = SKIP, enabled = SKIP, for_site = SKIP, hello_interval = 60, hello_retries = 7, hosts = SKIP, id = SKIP, modified_time = SKIP, mtu = 0, org_id = SKIP, protocol = MxtunnelProtocolEnum::UDP, radsec = SKIP, site_id = SKIP, vlan_ids = SKIP) @additional_mxtunnels = additional_mxtunnels unless additional_mxtunnels == SKIP @ap_subnets = ap_subnets unless ap_subnets == SKIP @auto_preemption = auto_preemption unless auto_preemption == SKIP @clusters = clusters unless clusters == SKIP @created_time = created_time unless created_time == SKIP @enabled = enabled unless enabled == SKIP @for_site = for_site unless for_site == SKIP @hello_interval = hello_interval unless hello_interval == SKIP @hello_retries = hello_retries unless hello_retries == SKIP @hosts = hosts unless hosts == SKIP @id = id unless id == SKIP @modified_time = modified_time unless modified_time == SKIP @mtu = mtu unless mtu == SKIP @org_id = org_id unless org_id == SKIP @protocol = protocol unless protocol == SKIP @radsec = radsec unless radsec == SKIP @site_id = site_id unless site_id == SKIP @vlan_ids = vlan_ids unless vlan_ids == SKIP end |
Instance Attribute Details
#additional_mxtunnels ⇒ Hash[String, SiteMxtunnelAdditionalMxtunnel]
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 14 def additional_mxtunnels @additional_mxtunnels end |
#ap_subnets ⇒ Array[String]
List of subnets where we allow AP to establish Mist Tunnels from
18 19 20 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 18 def ap_subnets @ap_subnets end |
#auto_preemption ⇒ AutoPreemption
Schedule to preempt ap’s which are not connected to preferred peer
22 23 24 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 22 def auto_preemption @auto_preemption end |
#clusters ⇒ Array[SiteMxtunnelCluster]
For AP, how to connect to tunterm or RadSec Proxy
26 27 28 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 26 def clusters @clusters end |
#created_time ⇒ Float
When the object has been created, in epoch
30 31 32 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 30 def created_time @created_time end |
#enabled ⇒ TrueClass | FalseClass
When the object has been created, in epoch
34 35 36 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 34 def enabled @enabled end |
#for_site ⇒ TrueClass | FalseClass
When the object has been created, in epoch
38 39 40 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 38 def for_site @for_site end |
#hello_interval ⇒ Integer
In seconds, used as heartbeat to detect if a tunnel is alive. AP will try another peer after missing N hellos specified by hello_retries
43 44 45 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 43 def hello_interval @hello_interval end |
#hello_retries ⇒ Integer
In seconds, used as heartbeat to detect if a tunnel is alive. AP will try another peer after missing N hellos specified by hello_retries
48 49 50 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 48 def hello_retries @hello_retries end |
#hosts ⇒ Array[String]
Hostnames or IPs where a Mist Tunnel will use as the Peer (i.e. they are reachable from AP)
53 54 55 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 53 def hosts @hosts end |
#id ⇒ UUID | String
Unique ID of the object instance in the Mist Organization
57 58 59 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 57 def id @id end |
#modified_time ⇒ Float
When the object has been modified for the last time, in epoch
61 62 63 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 61 def modified_time @modified_time end |
#mtu ⇒ Integer
0 to enable MTU, 552-1500 to start MTU with a lower MTU
65 66 67 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 65 def mtu @mtu end |
#org_id ⇒ UUID | String
0 to enable MTU, 552-1500 to start MTU with a lower MTU
69 70 71 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 69 def org_id @org_id end |
#protocol ⇒ MxtunnelProtocolEnum
enum: ‘ip`, `udp`
73 74 75 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 73 def protocol @protocol end |
#radsec ⇒ SiteMxtunnelRadsec
enum: ‘ip`, `udp`
77 78 79 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 77 def radsec @radsec end |
#site_id ⇒ UUID | String
enum: ‘ip`, `udp`
81 82 83 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 81 def site_id @site_id end |
#vlan_ids ⇒ Array[Integer]
List of vlan_ids that will be used
85 86 87 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 85 def vlan_ids @vlan_ids end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
168 169 170 171 172 173 174 175 176 177 178 179 180 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/site_mxtunnel.rb', line 168 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. if hash['additional_mxtunnels'] additional_mxtunnels = SiteMxtunnelAdditionalMxtunnel.from_hash(hash['additional_mxtunnels']) end additional_mxtunnels = SKIP unless hash.key?('additional_mxtunnels') ap_subnets = hash.key?('ap_subnets') ? hash['ap_subnets'] : SKIP auto_preemption = AutoPreemption.from_hash(hash['auto_preemption']) if hash['auto_preemption'] # Parameter is an array, so we need to iterate through it clusters = nil unless hash['clusters'].nil? clusters = [] hash['clusters'].each do |structure| clusters << (SiteMxtunnelCluster.from_hash(structure) if structure) end end clusters = SKIP unless hash.key?('clusters') created_time = hash.key?('created_time') ? hash['created_time'] : SKIP enabled = hash.key?('enabled') ? hash['enabled'] : SKIP for_site = hash.key?('for_site') ? hash['for_site'] : SKIP hello_interval = hash['hello_interval'] ||= 60 hello_retries = hash['hello_retries'] ||= 7 hosts = hash.key?('hosts') ? hash['hosts'] : SKIP id = hash.key?('id') ? hash['id'] : SKIP modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP mtu = hash['mtu'] ||= 0 org_id = hash.key?('org_id') ? hash['org_id'] : SKIP protocol = hash['protocol'] ||= MxtunnelProtocolEnum::UDP radsec = SiteMxtunnelRadsec.from_hash(hash['radsec']) if hash['radsec'] site_id = hash.key?('site_id') ? hash['site_id'] : SKIP vlan_ids = hash.key?('vlan_ids') ? hash['vlan_ids'] : SKIP # Create object from extracted values. SiteMxtunnel.new(additional_mxtunnels, ap_subnets, auto_preemption, clusters, created_time, enabled, for_site, hello_interval, hello_retries, hosts, id, modified_time, mtu, org_id, protocol, radsec, site_id, vlan_ids) end |
.names ⇒ Object
A mapping from model property names to API property names.
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 88 def self.names @_hash = {} if @_hash.nil? @_hash['additional_mxtunnels'] = 'additional_mxtunnels' @_hash['ap_subnets'] = 'ap_subnets' @_hash['auto_preemption'] = 'auto_preemption' @_hash['clusters'] = 'clusters' @_hash['created_time'] = 'created_time' @_hash['enabled'] = 'enabled' @_hash['for_site'] = 'for_site' @_hash['hello_interval'] = 'hello_interval' @_hash['hello_retries'] = 'hello_retries' @_hash['hosts'] = 'hosts' @_hash['id'] = 'id' @_hash['modified_time'] = 'modified_time' @_hash['mtu'] = 'mtu' @_hash['org_id'] = 'org_id' @_hash['protocol'] = 'protocol' @_hash['radsec'] = 'radsec' @_hash['site_id'] = 'site_id' @_hash['vlan_ids'] = 'vlan_ids' @_hash end |
.nullables ⇒ Object
An array for nullable fields
136 137 138 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 136 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 112 def self.optionals %w[ additional_mxtunnels ap_subnets auto_preemption clusters created_time enabled for_site hello_interval hello_retries hosts id modified_time mtu org_id protocol radsec site_id vlan_ids ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
238 239 240 241 242 243 244 245 246 247 248 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 238 def inspect class_name = self.class.name.split('::').last "<#{class_name} additional_mxtunnels: #{@additional_mxtunnels.inspect}, ap_subnets:"\ " #{@ap_subnets.inspect}, auto_preemption: #{@auto_preemption.inspect}, clusters:"\ " #{@clusters.inspect}, created_time: #{@created_time.inspect}, enabled:"\ " #{@enabled.inspect}, for_site: #{@for_site.inspect}, hello_interval:"\ " #{@hello_interval.inspect}, hello_retries: #{@hello_retries.inspect}, hosts:"\ " #{@hosts.inspect}, id: #{@id.inspect}, modified_time: #{@modified_time.inspect}, mtu:"\ " #{@mtu.inspect}, org_id: #{@org_id.inspect}, protocol: #{@protocol.inspect}, radsec:"\ " #{@radsec.inspect}, site_id: #{@site_id.inspect}, vlan_ids: #{@vlan_ids.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
227 228 229 230 231 232 233 234 235 |
# File 'lib/mist_api/models/site_mxtunnel.rb', line 227 def to_s class_name = self.class.name.split('::').last "<#{class_name} additional_mxtunnels: #{@additional_mxtunnels}, ap_subnets: #{@ap_subnets},"\ " auto_preemption: #{@auto_preemption}, clusters: #{@clusters}, created_time:"\ " #{@created_time}, enabled: #{@enabled}, for_site: #{@for_site}, hello_interval:"\ " #{@hello_interval}, hello_retries: #{@hello_retries}, hosts: #{@hosts}, id: #{@id},"\ " modified_time: #{@modified_time}, mtu: #{@mtu}, org_id: #{@org_id}, protocol:"\ " #{@protocol}, radsec: #{@radsec}, site_id: #{@site_id}, vlan_ids: #{@vlan_ids}>" end |