Class: MistApi::EvpnTopologySwitch
- Defined in:
- lib/mist_api/models/evpn_topology_switch.rb
Overview
EvpnTopologySwitch Model.
Instance Attribute Summary collapse
-
#config ⇒ EvpnTopologySwitchConfig
TODO: Write general description for this method.
-
#deviceprofile_id ⇒ UUID | String
TODO: Write general description for this method.
-
#downlink_ips ⇒ Array[String]
TODO: Write general description for this method.
-
#downlinks ⇒ Array[String]
TODO: Write general description for this method.
-
#esilaglinks ⇒ Array[String]
TODO: Write general description for this method.
-
#evpn_id ⇒ Integer
TODO: Write general description for this method.
-
#mac ⇒ String
TODO: Write general description for this method.
-
#model ⇒ String
TODO: Write general description for this method.
-
#pod ⇒ Integer
Optionally, for distribution / access / esilag-access, they can be placed into different pods.
-
#pods ⇒ Array[Integer]
By default, core switches are assumed to be connecting all pods.
-
#role ⇒ EvpnTopologySwitchRoleEnum
use ‘role`==`none` to remove a switch from the topology.
-
#router_id ⇒ String
use ‘role`==`none` to remove a switch from the topology.
-
#site_id ⇒ UUID | String
use ‘role`==`none` to remove a switch from the topology.
-
#suggested_downlinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology.
-
#suggested_esilaglinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology.
-
#suggested_uplinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology.
-
#uplinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology.
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(mac = nil, role = nil, config = SKIP, deviceprofile_id = SKIP, downlink_ips = SKIP, downlinks = SKIP, esilaglinks = SKIP, evpn_id = SKIP, model = SKIP, pod = 1, pods = SKIP, router_id = SKIP, site_id = SKIP, suggested_downlinks = SKIP, suggested_esilaglinks = SKIP, suggested_uplinks = SKIP, uplinks = SKIP) ⇒ EvpnTopologySwitch
constructor
A new instance of EvpnTopologySwitch.
-
#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(mac = nil, role = nil, config = SKIP, deviceprofile_id = SKIP, downlink_ips = SKIP, downlinks = SKIP, esilaglinks = SKIP, evpn_id = SKIP, model = SKIP, pod = 1, pods = SKIP, router_id = SKIP, site_id = SKIP, suggested_downlinks = SKIP, suggested_esilaglinks = SKIP, suggested_uplinks = SKIP, uplinks = SKIP) ⇒ EvpnTopologySwitch
Returns a new instance of EvpnTopologySwitch.
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 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 140 def initialize(mac = nil, role = nil, config = SKIP, deviceprofile_id = SKIP, downlink_ips = SKIP, downlinks = SKIP, esilaglinks = SKIP, evpn_id = SKIP, model = SKIP, pod = 1, pods = SKIP, router_id = SKIP, site_id = SKIP, suggested_downlinks = SKIP, suggested_esilaglinks = SKIP, suggested_uplinks = SKIP, uplinks = SKIP) @config = config unless config == SKIP @deviceprofile_id = deviceprofile_id unless deviceprofile_id == SKIP @downlink_ips = downlink_ips unless downlink_ips == SKIP @downlinks = downlinks unless downlinks == SKIP @esilaglinks = esilaglinks unless esilaglinks == SKIP @evpn_id = evpn_id unless evpn_id == SKIP @mac = mac @model = model unless model == SKIP @pod = pod unless pod == SKIP @pods = pods unless pods == SKIP @role = role @router_id = router_id unless router_id == SKIP @site_id = site_id unless site_id == SKIP @suggested_downlinks = suggested_downlinks unless suggested_downlinks == SKIP @suggested_esilaglinks = suggested_esilaglinks unless suggested_esilaglinks == SKIP @suggested_uplinks = suggested_uplinks unless suggested_uplinks == SKIP @uplinks = uplinks unless uplinks == SKIP end |
Instance Attribute Details
#config ⇒ EvpnTopologySwitchConfig
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 14 def config @config end |
#deviceprofile_id ⇒ UUID | String
TODO: Write general description for this method
18 19 20 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 18 def deviceprofile_id @deviceprofile_id end |
#downlink_ips ⇒ Array[String]
TODO: Write general description for this method
22 23 24 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 22 def downlink_ips @downlink_ips end |
#downlinks ⇒ Array[String]
TODO: Write general description for this method
26 27 28 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 26 def downlinks @downlinks end |
#esilaglinks ⇒ Array[String]
TODO: Write general description for this method
30 31 32 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 30 def esilaglinks @esilaglinks end |
#evpn_id ⇒ Integer
TODO: Write general description for this method
34 35 36 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 34 def evpn_id @evpn_id end |
#mac ⇒ String
TODO: Write general description for this method
38 39 40 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 38 def mac @mac end |
#model ⇒ String
TODO: Write general description for this method
42 43 44 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 42 def model @model end |
#pod ⇒ Integer
Optionally, for distribution / access / esilag-access, they can be placed into different pods. e.g.
* for CLOS, to group dist / access switches into pods
* for ERB/CRB, to group dist / esilag-access into pods
49 50 51 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 49 def pod @pod end |
#pods ⇒ Array[Integer]
By default, core switches are assumed to be connecting all pods. if you want to limit the pods, you can specify pods.
54 55 56 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 54 def pods @pods end |
#role ⇒ EvpnTopologySwitchRoleEnum
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
59 60 61 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 59 def role @role end |
#router_id ⇒ String
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
64 65 66 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 64 def router_id @router_id end |
#site_id ⇒ UUID | String
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
69 70 71 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 69 def site_id @site_id end |
#suggested_downlinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
74 75 76 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 74 def suggested_downlinks @suggested_downlinks end |
#suggested_esilaglinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
79 80 81 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 79 def suggested_esilaglinks @suggested_esilaglinks end |
#suggested_uplinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
84 85 86 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 84 def suggested_uplinks @suggested_uplinks end |
#uplinks ⇒ Array[String]
use ‘role`==`none` to remove a switch from the topology. enum: `access`, `collapsed-core`, `core`, `distribution`, `esilag-access`, `none`
89 90 91 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 89 def uplinks @uplinks end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
167 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 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 167 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. mac = hash.key?('mac') ? hash['mac'] : nil role = hash.key?('role') ? hash['role'] : nil config = EvpnTopologySwitchConfig.from_hash(hash['config']) if hash['config'] deviceprofile_id = hash.key?('deviceprofile_id') ? hash['deviceprofile_id'] : SKIP downlink_ips = hash.key?('downlink_ips') ? hash['downlink_ips'] : SKIP downlinks = hash.key?('downlinks') ? hash['downlinks'] : SKIP esilaglinks = hash.key?('esilaglinks') ? hash['esilaglinks'] : SKIP evpn_id = hash.key?('evpn_id') ? hash['evpn_id'] : SKIP model = hash.key?('model') ? hash['model'] : SKIP pod = hash['pod'] ||= 1 pods = hash.key?('pods') ? hash['pods'] : SKIP router_id = hash.key?('router_id') ? hash['router_id'] : SKIP site_id = hash.key?('site_id') ? hash['site_id'] : SKIP suggested_downlinks = hash.key?('suggested_downlinks') ? hash['suggested_downlinks'] : SKIP suggested_esilaglinks = hash.key?('suggested_esilaglinks') ? hash['suggested_esilaglinks'] : SKIP suggested_uplinks = hash.key?('suggested_uplinks') ? hash['suggested_uplinks'] : SKIP uplinks = hash.key?('uplinks') ? hash['uplinks'] : SKIP # Create object from extracted values. EvpnTopologySwitch.new(mac, role, config, deviceprofile_id, downlink_ips, downlinks, esilaglinks, evpn_id, model, pod, pods, router_id, site_id, suggested_downlinks, suggested_esilaglinks, suggested_uplinks, uplinks) end |
.names ⇒ Object
A mapping from model property names to API property names.
92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 92 def self.names @_hash = {} if @_hash.nil? @_hash['config'] = 'config' @_hash['deviceprofile_id'] = 'deviceprofile_id' @_hash['downlink_ips'] = 'downlink_ips' @_hash['downlinks'] = 'downlinks' @_hash['esilaglinks'] = 'esilaglinks' @_hash['evpn_id'] = 'evpn_id' @_hash['mac'] = 'mac' @_hash['model'] = 'model' @_hash['pod'] = 'pod' @_hash['pods'] = 'pods' @_hash['role'] = 'role' @_hash['router_id'] = 'router_id' @_hash['site_id'] = 'site_id' @_hash['suggested_downlinks'] = 'suggested_downlinks' @_hash['suggested_esilaglinks'] = 'suggested_esilaglinks' @_hash['suggested_uplinks'] = 'suggested_uplinks' @_hash['uplinks'] = 'uplinks' @_hash end |
.nullables ⇒ Object
An array for nullable fields
136 137 138 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 136 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 115 def self.optionals %w[ config deviceprofile_id downlink_ips downlinks esilaglinks evpn_id model pod pods router_id site_id suggested_downlinks suggested_esilaglinks suggested_uplinks uplinks ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
225 226 227 228 229 230 231 232 233 234 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 225 def inspect class_name = self.class.name.split('::').last "<#{class_name} config: #{@config.inspect}, deviceprofile_id: #{@deviceprofile_id.inspect},"\ " downlink_ips: #{@downlink_ips.inspect}, downlinks: #{@downlinks.inspect}, esilaglinks:"\ " #{@esilaglinks.inspect}, evpn_id: #{@evpn_id.inspect}, mac: #{@mac.inspect}, model:"\ " #{@model.inspect}, pod: #{@pod.inspect}, pods: #{@pods.inspect}, role: #{@role.inspect},"\ " router_id: #{@router_id.inspect}, site_id: #{@site_id.inspect}, suggested_downlinks:"\ " #{@suggested_downlinks.inspect}, suggested_esilaglinks: #{@suggested_esilaglinks.inspect},"\ " suggested_uplinks: #{@suggested_uplinks.inspect}, uplinks: #{@uplinks.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
214 215 216 217 218 219 220 221 222 |
# File 'lib/mist_api/models/evpn_topology_switch.rb', line 214 def to_s class_name = self.class.name.split('::').last "<#{class_name} config: #{@config}, deviceprofile_id: #{@deviceprofile_id}, downlink_ips:"\ " #{@downlink_ips}, downlinks: #{@downlinks}, esilaglinks: #{@esilaglinks}, evpn_id:"\ " #{@evpn_id}, mac: #{@mac}, model: #{@model}, pod: #{@pod}, pods: #{@pods}, role: #{@role},"\ " router_id: #{@router_id}, site_id: #{@site_id}, suggested_downlinks:"\ " #{@suggested_downlinks}, suggested_esilaglinks: #{@suggested_esilaglinks},"\ " suggested_uplinks: #{@suggested_uplinks}, uplinks: #{@uplinks}>" end |