Class: MistApi::DeviceprofileSwitch

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/deviceprofile_switch.rb

Overview

Switch Device Profiles can be applied to one or multiple switches. The settings from the Device Profile will override the settings from the Switch Template and the Site Settings.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(name = nil, acl_policies = SKIP, acl_tags = SKIP, additional_config_cmds = SKIP, aggregate_routes = SKIP, aggregate_routes6 = SKIP, created_time = SKIP, dhcp_snooping = SKIP, dhcpd_config = SKIP, dns_servers = SKIP, dns_suffix = SKIP, evpn_config = SKIP, extra_routes = SKIP, extra_routes6 = SKIP, id = SKIP, iot_config = SKIP, ip_config = SKIP, mist_nac = SKIP, modified_time = SKIP, networks = SKIP, ntp_servers = SKIP, oob_ip_config = SKIP, org_id = SKIP, ospf_areas = SKIP, other_ip_configs = SKIP, port_config = SKIP, port_mirroring = SKIP, port_usages = SKIP, radius_config = SKIP, remote_syslog = SKIP, routing_policies = SKIP, site_id = SKIP, snmp_config = SKIP, stp_config = SKIP, switch_mgmt = SKIP, use_router_id_as_source_ip = false, vrf_config = SKIP, vrf_instances = SKIP, vrrp_config = SKIP, additional_properties = nil) ⇒ DeviceprofileSwitch

Returns a new instance of DeviceprofileSwitch.



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
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 291

def initialize(name = nil, acl_policies = SKIP, acl_tags = SKIP,
               additional_config_cmds = SKIP, aggregate_routes = SKIP,
               aggregate_routes6 = SKIP, created_time = SKIP,
               dhcp_snooping = SKIP, dhcpd_config = SKIP,
               dns_servers = SKIP, dns_suffix = SKIP, evpn_config = SKIP,
               extra_routes = SKIP, extra_routes6 = SKIP, id = SKIP,
               iot_config = SKIP, ip_config = SKIP, mist_nac = SKIP,
               modified_time = SKIP, networks = SKIP, ntp_servers = SKIP,
               oob_ip_config = SKIP, org_id = SKIP, ospf_areas = SKIP,
               other_ip_configs = SKIP, port_config = SKIP,
               port_mirroring = SKIP, port_usages = SKIP,
               radius_config = SKIP, remote_syslog = SKIP,
               routing_policies = SKIP, site_id = SKIP, snmp_config = SKIP,
               stp_config = SKIP, switch_mgmt = SKIP,
               use_router_id_as_source_ip = false, vrf_config = SKIP,
               vrf_instances = SKIP, vrrp_config = SKIP,
               additional_properties = nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @acl_policies = acl_policies unless acl_policies == SKIP
  @acl_tags = acl_tags unless acl_tags == SKIP
  @additional_config_cmds = additional_config_cmds unless additional_config_cmds == SKIP
  @aggregate_routes = aggregate_routes unless aggregate_routes == SKIP
  @aggregate_routes6 = aggregate_routes6 unless aggregate_routes6 == SKIP
  @created_time = created_time unless created_time == SKIP
  @dhcp_snooping = dhcp_snooping unless dhcp_snooping == SKIP
  @dhcpd_config = dhcpd_config unless dhcpd_config == SKIP
  @dns_servers = dns_servers unless dns_servers == SKIP
  @dns_suffix = dns_suffix unless dns_suffix == SKIP
  @evpn_config = evpn_config unless evpn_config == SKIP
  @extra_routes = extra_routes unless extra_routes == SKIP
  @extra_routes6 = extra_routes6 unless extra_routes6 == SKIP
  @id = id unless id == SKIP
  @iot_config = iot_config unless iot_config == SKIP
  @ip_config = ip_config unless ip_config == SKIP
  @mist_nac = mist_nac unless mist_nac == SKIP
  @modified_time = modified_time unless modified_time == SKIP
  @name = name
  @networks = networks unless networks == SKIP
  @ntp_servers = ntp_servers unless ntp_servers == SKIP
  @oob_ip_config = oob_ip_config unless oob_ip_config == SKIP
  @org_id = org_id unless org_id == SKIP
  @ospf_areas = ospf_areas unless ospf_areas == SKIP
  @other_ip_configs = other_ip_configs unless other_ip_configs == SKIP
  @port_config = port_config unless port_config == SKIP
  @port_mirroring = port_mirroring unless port_mirroring == SKIP
  @port_usages = port_usages unless port_usages == SKIP
  @radius_config = radius_config unless radius_config == SKIP
  @remote_syslog = remote_syslog unless remote_syslog == SKIP
  @routing_policies = routing_policies unless routing_policies == SKIP
  @site_id = site_id unless site_id == SKIP
  @snmp_config = snmp_config unless snmp_config == SKIP
  @stp_config = stp_config unless stp_config == SKIP
  @switch_mgmt = switch_mgmt unless switch_mgmt == SKIP
  @type = 'switch'
  unless use_router_id_as_source_ip == SKIP
    @use_router_id_as_source_ip =
      use_router_id_as_source_ip
  end
  @vrf_config = vrf_config unless vrf_config == SKIP
  @vrf_instances = vrf_instances unless vrf_instances == SKIP
  @vrrp_config = vrrp_config unless vrrp_config == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#acl_policiesArray[AclPolicy]

TODO: Write general description for this method

Returns:



16
17
18
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 16

def acl_policies
  @acl_policies
end

#acl_tagsHash[String, AclTag]

ACL Tags to identify traffic source or destination. Key name is the tag name

Returns:

  • (Hash[String, AclTag])


21
22
23
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 21

def acl_tags
  @acl_tags
end

#additional_config_cmdsArray[String]

additional CLI commands to append to the generated Junos config. Note: no check is done

Returns:

  • (Array[String])


26
27
28
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 26

def additional_config_cmds
  @additional_config_cmds
end

#aggregate_routesHash[String, AggregateRoute]

Property key is the destination subnet (e.g. “172.16.3.0/24”)

Returns:



30
31
32
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 30

def aggregate_routes
  @aggregate_routes
end

#aggregate_routes6Hash[String, AggregateRoute]

Property key is the destination subnet (e.g. “2a02:1234:420a:10c9::/64”)

Returns:



34
35
36
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 34

def aggregate_routes6
  @aggregate_routes6
end

#created_timeFloat

When the object has been created, in epoch

Returns:

  • (Float)


38
39
40
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 38

def created_time
  @created_time
end

#dhcp_snoopingDhcpSnooping

When the object has been created, in epoch

Returns:



42
43
44
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 42

def dhcp_snooping
  @dhcp_snooping
end

#dhcpd_configSwitchDhcpdConfig

When the object has been created, in epoch

Returns:



46
47
48
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 46

def dhcpd_config
  @dhcpd_config
end

#dns_serversArray[String]

Global dns settings. To keep compatibility, dns settings in ‘ip_config` and `oob_ip_config` will overwrite this setting

Returns:

  • (Array[String])


51
52
53
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 51

def dns_servers
  @dns_servers
end

#dns_suffixArray[String]

Global dns settings. To keep compatibility, dns settings in ‘ip_config` and `oob_ip_config` will overwrite this setting

Returns:

  • (Array[String])


56
57
58
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 56

def dns_suffix
  @dns_suffix
end

#evpn_configEvpnConfig

EVPN Junos settings

Returns:



60
61
62
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 60

def evpn_config
  @evpn_config
end

#extra_routesHash[String, ExtraRoute]

Property key is the destination CIDR (e.g. “10.0.0.0/8”)

Returns:



64
65
66
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 64

def extra_routes
  @extra_routes
end

#extra_routes6Hash[String, ExtraRoute6]

Property key is the destination CIDR (e.g. “2a02:1234:420a:10c9::/64”)

Returns:



68
69
70
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 68

def extra_routes6
  @extra_routes6
end

#idUUID | String

Unique ID of the object instance in the Mist Organization

Returns:

  • (UUID | String)


72
73
74
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 72

def id
  @id
end

#iot_configHash[String, SwitchIotPort]

Property Key is the IOT port name, e.g.:

* `IN0` or `IN1` for the FPC0 input port with 5V triggered inputs
* `OUT1` for the FPC0 output port (can only be triggered by either IN0

or IN1)

* "X/IN0`, `X/IN1` and `X/OUT` are used to define IOT ports on VC

members

Returns:



81
82
83
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 81

def iot_config
  @iot_config
end

#ip_configJunosIpConfig

Junos IP Config

Returns:



85
86
87
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 85

def ip_config
  @ip_config
end

#mist_nacSwitchMistNac

Enable mist_nac to use RadSec

Returns:



89
90
91
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 89

def mist_nac
  @mist_nac
end

#modified_timeFloat

When the object has been modified for the last time, in epoch

Returns:

  • (Float)


93
94
95
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 93

def modified_time
  @modified_time
end

#nameString

When the object has been modified for the last time, in epoch

Returns:

  • (String)


97
98
99
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 97

def name
  @name
end

#networksHash[String, SwitchNetwork]

Property key is network name

Returns:



101
102
103
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 101

def networks
  @networks
end

#ntp_serversArray[String]

List of NTP servers specific to this device. By default, those in Site Settings will be used

Returns:

  • (Array[String])


106
107
108
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 106

def ntp_servers
  @ntp_servers
end

#oob_ip_configSwitchOobIpConfig

Switch OOB IP Config:

- If HA configuration: key parameter will be nodeX (eg: node1)
- If there are 2 routing engines, re1 mgmt IP has to be set separately

(if desired): key parameter = ‘re1`

Returns:



113
114
115
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 113

def oob_ip_config
  @oob_ip_config
end

#org_idUUID | String

Switch OOB IP Config:

- If HA configuration: key parameter will be nodeX (eg: node1)
- If there are 2 routing engines, re1 mgmt IP has to be set separately

(if desired): key parameter = ‘re1`

Returns:

  • (UUID | String)


120
121
122
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 120

def org_id
  @org_id
end

#ospf_areasHash[String, OspfArea]

Junos OSPF areas. Property key is the OSPF Area (Area should be a number (0-255) / IP address)

Returns:



125
126
127
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 125

def ospf_areas
  @ospf_areas
end

#other_ip_configsHash[String, JunosOtherIpConfig]

Property key is the network name. Defines the additional IP Addresses configured on the device.

Returns:



130
131
132
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 130

def other_ip_configs
  @other_ip_configs
end

#port_configHash[String, JunosPortConfig]

Property key is the port name or range (e.g. “ge-0/0/0-10”)

Returns:



134
135
136
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 134

def port_config
  @port_config
end

#port_mirroringHash[String, SwitchPortMirroringProperty]

Property key is the port mirroring instance name. ‘port_mirroring` can be added under device/site settings. It takes interface and ports as input for ingress, interface as input for egress and can take interface and port as output. A maximum 4 mirroring ports is allowed

Returns:



141
142
143
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 141

def port_mirroring
  @port_mirroring
end

#port_usagesHash[String, SwitchPortUsage]

Property key is the port usage name. Defines the profiles of port configuration configured on the switch

Returns:



146
147
148
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 146

def port_usages
  @port_usages
end

#radius_configSwitchRadiusConfig

Junos Radius config

Returns:



150
151
152
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 150

def radius_config
  @radius_config
end

#remote_syslogRemoteSyslog

Junos Radius config

Returns:



154
155
156
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 154

def remote_syslog
  @remote_syslog
end

#routing_policiesHash[String, SwRoutingPolicy]

Property key is the routing policy name

Returns:



158
159
160
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 158

def routing_policies
  @routing_policies
end

#site_idUUID | String

Property key is the routing policy name

Returns:

  • (UUID | String)


162
163
164
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 162

def site_id
  @site_id
end

#snmp_configSnmpConfig

Property key is the routing policy name

Returns:



166
167
168
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 166

def snmp_config
  @snmp_config
end

#stp_configSwitchStpConfig

Property key is the routing policy name

Returns:



170
171
172
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 170

def stp_config
  @stp_config
end

#switch_mgmtSwitchMgmt

Switch Management settings

Returns:



174
175
176
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 174

def switch_mgmt
  @switch_mgmt
end

#typeString (readonly)

Device Type. enum: ‘switch`

Returns:

  • (String)


178
179
180
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 178

def type
  @type
end

#use_router_id_as_source_ipTrueClass | FalseClass

Whether to use it for snmp / syslog / tacplus / radius

Returns:

  • (TrueClass | FalseClass)


182
183
184
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 182

def use_router_id_as_source_ip
  @use_router_id_as_source_ip
end

#vrf_configVrfConfig

Whether to use it for snmp / syslog / tacplus / radius

Returns:



186
187
188
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 186

def vrf_config
  @vrf_config
end

#vrf_instancesHash[String, SwitchVrfInstance]

Property key is the network name

Returns:



190
191
192
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 190

def vrf_instances
  @vrf_instances
end

#vrrp_configVrrpConfig

Junos VRRP config

Returns:



194
195
196
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 194

def vrrp_config
  @vrrp_config
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



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
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
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 358

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  name = hash.key?('name') ? hash['name'] : nil
  # Parameter is an array, so we need to iterate through it
  acl_policies = nil
  unless hash['acl_policies'].nil?
    acl_policies = []
    hash['acl_policies'].each do |structure|
      acl_policies << (AclPolicy.from_hash(structure) if structure)
    end
  end

  acl_policies = SKIP unless hash.key?('acl_policies')
  acl_tags = AclTag.from_hash(hash['acl_tags']) if hash['acl_tags']

  acl_tags = SKIP unless hash.key?('acl_tags')
  additional_config_cmds =
    hash.key?('additional_config_cmds') ? hash['additional_config_cmds'] : SKIP
  aggregate_routes = AggregateRoute.from_hash(hash['aggregate_routes']) if
    hash['aggregate_routes']

  aggregate_routes = SKIP unless hash.key?('aggregate_routes')
  aggregate_routes6 = AggregateRoute.from_hash(hash['aggregate_routes6']) if
    hash['aggregate_routes6']

  aggregate_routes6 = SKIP unless hash.key?('aggregate_routes6')
  created_time = hash.key?('created_time') ? hash['created_time'] : SKIP
  dhcp_snooping = DhcpSnooping.from_hash(hash['dhcp_snooping']) if hash['dhcp_snooping']
  dhcpd_config = SwitchDhcpdConfig.from_hash(hash['dhcpd_config']) if hash['dhcpd_config']
  dns_servers = hash.key?('dns_servers') ? hash['dns_servers'] : SKIP
  dns_suffix = hash.key?('dns_suffix') ? hash['dns_suffix'] : SKIP
  evpn_config = EvpnConfig.from_hash(hash['evpn_config']) if hash['evpn_config']
  extra_routes = ExtraRoute.from_hash(hash['extra_routes']) if hash['extra_routes']

  extra_routes = SKIP unless hash.key?('extra_routes')
  extra_routes6 = ExtraRoute6.from_hash(hash['extra_routes6']) if hash['extra_routes6']

  extra_routes6 = SKIP unless hash.key?('extra_routes6')
  id = hash.key?('id') ? hash['id'] : SKIP
  iot_config = SwitchIotPort.from_hash(hash['iot_config']) if hash['iot_config']

  iot_config = SKIP unless hash.key?('iot_config')
  ip_config = JunosIpConfig.from_hash(hash['ip_config']) if hash['ip_config']
  mist_nac = SwitchMistNac.from_hash(hash['mist_nac']) if hash['mist_nac']
  modified_time = hash.key?('modified_time') ? hash['modified_time'] : SKIP
  networks = SwitchNetwork.from_hash(hash['networks']) if hash['networks']

  networks = SKIP unless hash.key?('networks')
  ntp_servers = hash.key?('ntp_servers') ? hash['ntp_servers'] : SKIP
  oob_ip_config = SwitchOobIpConfig.from_hash(hash['oob_ip_config']) if hash['oob_ip_config']
  org_id = hash.key?('org_id') ? hash['org_id'] : SKIP
  ospf_areas = OspfArea.from_hash(hash['ospf_areas']) if hash['ospf_areas']

  ospf_areas = SKIP unless hash.key?('ospf_areas')
  other_ip_configs = JunosOtherIpConfig.from_hash(hash['other_ip_configs']) if
    hash['other_ip_configs']

  other_ip_configs = SKIP unless hash.key?('other_ip_configs')
  port_config = JunosPortConfig.from_hash(hash['port_config']) if hash['port_config']

  port_config = SKIP unless hash.key?('port_config')
  port_mirroring = SwitchPortMirroringProperty.from_hash(hash['port_mirroring']) if
    hash['port_mirroring']

  port_mirroring = SKIP unless hash.key?('port_mirroring')
  port_usages = SwitchPortUsage.from_hash(hash['port_usages']) if hash['port_usages']

  port_usages = SKIP unless hash.key?('port_usages')
  radius_config = SwitchRadiusConfig.from_hash(hash['radius_config']) if hash['radius_config']
  remote_syslog = RemoteSyslog.from_hash(hash['remote_syslog']) if hash['remote_syslog']
  routing_policies = SwRoutingPolicy.from_hash(hash['routing_policies']) if
    hash['routing_policies']

  routing_policies = SKIP unless hash.key?('routing_policies')
  site_id = hash.key?('site_id') ? hash['site_id'] : SKIP
  snmp_config = SnmpConfig.from_hash(hash['snmp_config']) if hash['snmp_config']
  stp_config = SwitchStpConfig.from_hash(hash['stp_config']) if hash['stp_config']
  switch_mgmt = SwitchMgmt.from_hash(hash['switch_mgmt']) if hash['switch_mgmt']
  use_router_id_as_source_ip = hash['use_router_id_as_source_ip'] ||= false
  vrf_config = VrfConfig.from_hash(hash['vrf_config']) if hash['vrf_config']
  vrf_instances = SwitchVrfInstance.from_hash(hash['vrf_instances']) if hash['vrf_instances']

  vrf_instances = SKIP unless hash.key?('vrf_instances')
  vrrp_config = VrrpConfig.from_hash(hash['vrrp_config']) if hash['vrrp_config']

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  DeviceprofileSwitch.new(name,
                          acl_policies,
                          acl_tags,
                          additional_config_cmds,
                          aggregate_routes,
                          aggregate_routes6,
                          created_time,
                          dhcp_snooping,
                          dhcpd_config,
                          dns_servers,
                          dns_suffix,
                          evpn_config,
                          extra_routes,
                          extra_routes6,
                          id,
                          iot_config,
                          ip_config,
                          mist_nac,
                          modified_time,
                          networks,
                          ntp_servers,
                          oob_ip_config,
                          org_id,
                          ospf_areas,
                          other_ip_configs,
                          port_config,
                          port_mirroring,
                          port_usages,
                          radius_config,
                          remote_syslog,
                          routing_policies,
                          site_id,
                          snmp_config,
                          stp_config,
                          switch_mgmt,
                          use_router_id_as_source_ip,
                          vrf_config,
                          vrf_instances,
                          vrrp_config,
                          additional_properties)
end

.namesObject

A mapping from model property names to API property names.



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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 197

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['acl_policies'] = 'acl_policies'
  @_hash['acl_tags'] = 'acl_tags'
  @_hash['additional_config_cmds'] = 'additional_config_cmds'
  @_hash['aggregate_routes'] = 'aggregate_routes'
  @_hash['aggregate_routes6'] = 'aggregate_routes6'
  @_hash['created_time'] = 'created_time'
  @_hash['dhcp_snooping'] = 'dhcp_snooping'
  @_hash['dhcpd_config'] = 'dhcpd_config'
  @_hash['dns_servers'] = 'dns_servers'
  @_hash['dns_suffix'] = 'dns_suffix'
  @_hash['evpn_config'] = 'evpn_config'
  @_hash['extra_routes'] = 'extra_routes'
  @_hash['extra_routes6'] = 'extra_routes6'
  @_hash['id'] = 'id'
  @_hash['iot_config'] = 'iot_config'
  @_hash['ip_config'] = 'ip_config'
  @_hash['mist_nac'] = 'mist_nac'
  @_hash['modified_time'] = 'modified_time'
  @_hash['name'] = 'name'
  @_hash['networks'] = 'networks'
  @_hash['ntp_servers'] = 'ntp_servers'
  @_hash['oob_ip_config'] = 'oob_ip_config'
  @_hash['org_id'] = 'org_id'
  @_hash['ospf_areas'] = 'ospf_areas'
  @_hash['other_ip_configs'] = 'other_ip_configs'
  @_hash['port_config'] = 'port_config'
  @_hash['port_mirroring'] = 'port_mirroring'
  @_hash['port_usages'] = 'port_usages'
  @_hash['radius_config'] = 'radius_config'
  @_hash['remote_syslog'] = 'remote_syslog'
  @_hash['routing_policies'] = 'routing_policies'
  @_hash['site_id'] = 'site_id'
  @_hash['snmp_config'] = 'snmp_config'
  @_hash['stp_config'] = 'stp_config'
  @_hash['switch_mgmt'] = 'switch_mgmt'
  @_hash['type'] = 'type'
  @_hash['use_router_id_as_source_ip'] = 'use_router_id_as_source_ip'
  @_hash['vrf_config'] = 'vrf_config'
  @_hash['vrf_instances'] = 'vrf_instances'
  @_hash['vrrp_config'] = 'vrrp_config'
  @_hash
end

.nullablesObject

An array for nullable fields



287
288
289
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 287

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 243

def self.optionals
  %w[
    acl_policies
    acl_tags
    additional_config_cmds
    aggregate_routes
    aggregate_routes6
    created_time
    dhcp_snooping
    dhcpd_config
    dns_servers
    dns_suffix
    evpn_config
    extra_routes
    extra_routes6
    id
    iot_config
    ip_config
    mist_nac
    modified_time
    networks
    ntp_servers
    oob_ip_config
    org_id
    ospf_areas
    other_ip_configs
    port_config
    port_mirroring
    port_usages
    radius_config
    remote_syslog
    routing_policies
    site_id
    snmp_config
    stp_config
    switch_mgmt
    use_router_id_as_source_ip
    vrf_config
    vrf_instances
    vrrp_config
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 518

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} acl_policies: #{@acl_policies.inspect}, acl_tags: #{@acl_tags.inspect},"\
  " additional_config_cmds: #{@additional_config_cmds.inspect}, aggregate_routes:"\
  " #{@aggregate_routes.inspect}, aggregate_routes6: #{@aggregate_routes6.inspect},"\
  " created_time: #{@created_time.inspect}, dhcp_snooping: #{@dhcp_snooping.inspect},"\
  " dhcpd_config: #{@dhcpd_config.inspect}, dns_servers: #{@dns_servers.inspect}, dns_suffix:"\
  " #{@dns_suffix.inspect}, evpn_config: #{@evpn_config.inspect}, extra_routes:"\
  " #{@extra_routes.inspect}, extra_routes6: #{@extra_routes6.inspect}, id: #{@id.inspect},"\
  " iot_config: #{@iot_config.inspect}, ip_config: #{@ip_config.inspect}, mist_nac:"\
  " #{@mist_nac.inspect}, modified_time: #{@modified_time.inspect}, name: #{@name.inspect},"\
  " networks: #{@networks.inspect}, ntp_servers: #{@ntp_servers.inspect}, oob_ip_config:"\
  " #{@oob_ip_config.inspect}, org_id: #{@org_id.inspect}, ospf_areas: #{@ospf_areas.inspect},"\
  " other_ip_configs: #{@other_ip_configs.inspect}, port_config: #{@port_config.inspect},"\
  " port_mirroring: #{@port_mirroring.inspect}, port_usages: #{@port_usages.inspect},"\
  " radius_config: #{@radius_config.inspect}, remote_syslog: #{@remote_syslog.inspect},"\
  " routing_policies: #{@routing_policies.inspect}, site_id: #{@site_id.inspect}, snmp_config:"\
  " #{@snmp_config.inspect}, stp_config: #{@stp_config.inspect}, switch_mgmt:"\
  " #{@switch_mgmt.inspect}, type: #{@type.inspect}, use_router_id_as_source_ip:"\
  " #{@use_router_id_as_source_ip.inspect}, vrf_config: #{@vrf_config.inspect}, vrf_instances:"\
  " #{@vrf_instances.inspect}, vrrp_config: #{@vrrp_config.inspect}, additional_properties:"\
  " #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
# File 'lib/mist_api/models/deviceprofile_switch.rb', line 496

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} acl_policies: #{@acl_policies}, acl_tags: #{@acl_tags},"\
  " additional_config_cmds: #{@additional_config_cmds}, aggregate_routes:"\
  " #{@aggregate_routes}, aggregate_routes6: #{@aggregate_routes6}, created_time:"\
  " #{@created_time}, dhcp_snooping: #{@dhcp_snooping}, dhcpd_config: #{@dhcpd_config},"\
  " dns_servers: #{@dns_servers}, dns_suffix: #{@dns_suffix}, evpn_config: #{@evpn_config},"\
  " extra_routes: #{@extra_routes}, extra_routes6: #{@extra_routes6}, id: #{@id}, iot_config:"\
  " #{@iot_config}, ip_config: #{@ip_config}, mist_nac: #{@mist_nac}, modified_time:"\
  " #{@modified_time}, name: #{@name}, networks: #{@networks}, ntp_servers: #{@ntp_servers},"\
  " oob_ip_config: #{@oob_ip_config}, org_id: #{@org_id}, ospf_areas: #{@ospf_areas},"\
  " other_ip_configs: #{@other_ip_configs}, port_config: #{@port_config}, port_mirroring:"\
  " #{@port_mirroring}, port_usages: #{@port_usages}, radius_config: #{@radius_config},"\
  " remote_syslog: #{@remote_syslog}, routing_policies: #{@routing_policies}, site_id:"\
  " #{@site_id}, snmp_config: #{@snmp_config}, stp_config: #{@stp_config}, switch_mgmt:"\
  " #{@switch_mgmt}, type: #{@type}, use_router_id_as_source_ip:"\
  " #{@use_router_id_as_source_ip}, vrf_config: #{@vrf_config}, vrf_instances:"\
  " #{@vrf_instances}, vrrp_config: #{@vrrp_config}, additional_properties:"\
  " #{@additional_properties}>"
end