Class: IntersightClient::NetworkElement

Inherits:
EquipmentBase show all
Defined in:
lib/intersight_client/models/network_element.rb

Overview

A Unified Computing Systems (UCS) Fabric Interconnect.

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Attributes inherited from EquipmentBase

#model, #presence, #previous_fru, #revision, #serial, #vendor

Attributes inherited from InventoryBase

#device_mo_id, #dn, #rn

Attributes inherited from MoBaseMo

#account_moid, #ancestors, #create_time, #display_names, #domain_group_moid, #mod_time, #moid, #owners, #parent, #permission_resources, #shared_scope, #tags, #version_context

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ NetworkElement

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash



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
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
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
# File 'lib/intersight_client/models/network_element.rb', line 301

def initialize(attributes = {})
  if (!attributes.is_a?(Hash))
    fail ArgumentError, "The input argument (attributes) must be a hash in `IntersightClient::NetworkElement` initialize method"
  end

  # check to see if the attribute exists and convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h|
    if (!self.class.acceptable_attribute_map.key?(k.to_sym))
      fail ArgumentError, "`#{k}` is not a valid attribute in `#{self.class.name}`. Please check the name to make sure it's valid. List of attributes: " + self.class.acceptable_attribute_map.keys.inspect
    end
    h[k.to_sym] = v
  }

  # call parent's initialize
  super(attributes)

  if attributes.key?(:'class_id')
    self.class_id = attributes[:'class_id']
  else
    self.class_id = 'network.Element'
  end

  if attributes.key?(:'object_type')
    self.object_type = attributes[:'object_type']
  else
    self.object_type = 'network.Element'
  end

  if attributes.key?(:'admin_evac_state')
    self.admin_evac_state = attributes[:'admin_evac_state']
  end

  if attributes.key?(:'admin_inband_interface_state')
    self.admin_inband_interface_state = attributes[:'admin_inband_interface_state']
  end

  if attributes.key?(:'alarm_summary')
    self.alarm_summary = attributes[:'alarm_summary']
  end

  if attributes.key?(:'available_memory')
    self.available_memory = attributes[:'available_memory']
  end

  if attributes.key?(:'ethernet_mode')
    self.ethernet_mode = attributes[:'ethernet_mode']
  end

  if attributes.key?(:'ethernet_switching_mode')
    self.ethernet_switching_mode = attributes[:'ethernet_switching_mode']
  else
    self.ethernet_switching_mode = 'end-host'
  end

  if attributes.key?(:'fault_summary')
    self.fault_summary = attributes[:'fault_summary']
  end

  if attributes.key?(:'fc_mode')
    self.fc_mode = attributes[:'fc_mode']
  end

  if attributes.key?(:'fc_switching_mode')
    self.fc_switching_mode = attributes[:'fc_switching_mode']
  else
    self.fc_switching_mode = 'end-host'
  end

  if attributes.key?(:'inband_ip_address')
    self.inband_ip_address = attributes[:'inband_ip_address']
  end

  if attributes.key?(:'inband_ip_gateway')
    self.inband_ip_gateway = attributes[:'inband_ip_gateway']
  end

  if attributes.key?(:'inband_ip_mask')
    self.inband_ip_mask = attributes[:'inband_ip_mask']
  end

  if attributes.key?(:'inband_vlan')
    self.inband_vlan = attributes[:'inband_vlan']
  end

  if attributes.key?(:'management_mode')
    self.management_mode = attributes[:'management_mode']
  else
    self.management_mode = 'IntersightStandalone'
  end

  if attributes.key?(:'oper_evac_state')
    self.oper_evac_state = attributes[:'oper_evac_state']
  end

  if attributes.key?(:'operability')
    self.operability = attributes[:'operability']
  end

  if attributes.key?(:'out_of_band_ip_address')
    self.out_of_band_ip_address = attributes[:'out_of_band_ip_address']
  end

  if attributes.key?(:'out_of_band_ip_gateway')
    self.out_of_band_ip_gateway = attributes[:'out_of_band_ip_gateway']
  end

  if attributes.key?(:'out_of_band_ip_mask')
    self.out_of_band_ip_mask = attributes[:'out_of_band_ip_mask']
  end

  if attributes.key?(:'out_of_band_ipv4_address')
    self.out_of_band_ipv4_address = attributes[:'out_of_band_ipv4_address']
  end

  if attributes.key?(:'out_of_band_ipv4_gateway')
    self.out_of_band_ipv4_gateway = attributes[:'out_of_band_ipv4_gateway']
  end

  if attributes.key?(:'out_of_band_ipv4_mask')
    self.out_of_band_ipv4_mask = attributes[:'out_of_band_ipv4_mask']
  end

  if attributes.key?(:'out_of_band_ipv6_address')
    self.out_of_band_ipv6_address = attributes[:'out_of_band_ipv6_address']
  end

  if attributes.key?(:'out_of_band_ipv6_gateway')
    self.out_of_band_ipv6_gateway = attributes[:'out_of_band_ipv6_gateway']
  end

  if attributes.key?(:'out_of_band_ipv6_prefix')
    self.out_of_band_ipv6_prefix = attributes[:'out_of_band_ipv6_prefix']
  end

  if attributes.key?(:'out_of_band_mac')
    self.out_of_band_mac = attributes[:'out_of_band_mac']
  end

  if attributes.key?(:'switch_id')
    self.switch_id = attributes[:'switch_id']
  end

  if attributes.key?(:'thermal')
    self.thermal = attributes[:'thermal']
  else
    self.thermal = 'unknown'
  end

  if attributes.key?(:'total_memory')
    self.total_memory = attributes[:'total_memory']
  end

  if attributes.key?(:'cards')
    if (value = attributes[:'cards']).is_a?(Array)
      self.cards = value
    end
  end

  if attributes.key?(:'fanmodules')
    if (value = attributes[:'fanmodules']).is_a?(Array)
      self.fanmodules = value
    end
  end

  if attributes.key?(:'inventory_device_info')
    self.inventory_device_info = attributes[:'inventory_device_info']
  end

  if attributes.key?(:'management_controller')
    self.management_controller = attributes[:'management_controller']
  end

  if attributes.key?(:'management_entity')
    self.management_entity = attributes[:'management_entity']
  end

  if attributes.key?(:'network_fc_zone_info')
    self.network_fc_zone_info = attributes[:'network_fc_zone_info']
  end

  if attributes.key?(:'network_vlan_port_info')
    self.network_vlan_port_info = attributes[:'network_vlan_port_info']
  end

  if attributes.key?(:'port_mac_bindings')
    if (value = attributes[:'port_mac_bindings']).is_a?(Array)
      self.port_mac_bindings = value
    end
  end

  if attributes.key?(:'psus')
    if (value = attributes[:'psus']).is_a?(Array)
      self.psus = value
    end
  end

  if attributes.key?(:'registered_device')
    self.registered_device = attributes[:'registered_device']
  end

  if attributes.key?(:'storage_items')
    if (value = attributes[:'storage_items']).is_a?(Array)
      self.storage_items = value
    end
  end

  if attributes.key?(:'top_system')
    self.top_system = attributes[:'top_system']
  end

  if attributes.key?(:'ucsm_running_firmware')
    self.ucsm_running_firmware = attributes[:'ucsm_running_firmware']
  end
end

Instance Attribute Details

#admin_evac_stateObject

Administratively configured state of Fabric Evacuation feature, for this switch.



26
27
28
# File 'lib/intersight_client/models/network_element.rb', line 26

def admin_evac_state
  @admin_evac_state
end

#admin_inband_interface_stateObject

The administrative state of the network Element inband management interface.



29
30
31
# File 'lib/intersight_client/models/network_element.rb', line 29

def admin_inband_interface_state
  @admin_inband_interface_state
end

#alarm_summaryObject

Returns the value of attribute alarm_summary.



31
32
33
# File 'lib/intersight_client/models/network_element.rb', line 31

def alarm_summary
  @alarm_summary
end

#available_memoryObject

Available memory (un-used) on this switch platform.



34
35
36
# File 'lib/intersight_client/models/network_element.rb', line 34

def available_memory
  @available_memory
end

#cardsObject

An array of relationships to equipmentSwitchCard resources.



112
113
114
# File 'lib/intersight_client/models/network_element.rb', line 112

def cards
  @cards
end

#class_idObject

The fully-qualified name of the instantiated, concrete type. This property is used as a discriminator to identify the type of the payload when marshaling and unmarshaling data.



20
21
22
# File 'lib/intersight_client/models/network_element.rb', line 20

def class_id
  @class_id
end

#ethernet_modeObject

The user configured Ethernet operational mode for this switch (End-Host or Switching).



37
38
39
# File 'lib/intersight_client/models/network_element.rb', line 37

def ethernet_mode
  @ethernet_mode
end

#ethernet_switching_modeObject

The user configured Ethernet operational mode for this switch (End-Host or Switching). * ‘end-host` - In end-host mode, the fabric interconnects appear to the upstream devices as end hosts with multiple links.In this mode, the switch does not run Spanning Tree Protocol and avoids loops by following a set of rules for traffic forwarding.In case of ethernet switching mode - Ethernet end-host mode is also known as Ethernet host virtualizer. * `switch` - In switch mode, the switch runs Spanning Tree Protocol to avoid loops, and broadcast and multicast packets are handled in the traditional way.This is the traditional switch mode.



40
41
42
# File 'lib/intersight_client/models/network_element.rb', line 40

def ethernet_switching_mode
  @ethernet_switching_mode
end

#fanmodulesObject

An array of relationships to equipmentFanModule resources.



115
116
117
# File 'lib/intersight_client/models/network_element.rb', line 115

def fanmodules
  @fanmodules
end

#fault_summaryObject

The fault summary of the network Element out-of-band management interface.



43
44
45
# File 'lib/intersight_client/models/network_element.rb', line 43

def fault_summary
  @fault_summary
end

#fc_modeObject

The user configured FC operational mode for this switch (End-Host or Switching).



46
47
48
# File 'lib/intersight_client/models/network_element.rb', line 46

def fc_mode
  @fc_mode
end

#fc_switching_modeObject

The user configured FC operational mode for this switch (End-Host or Switching). * ‘end-host` - In end-host mode, the fabric interconnects appear to the upstream devices as end hosts with multiple links.In this mode, the switch does not run Spanning Tree Protocol and avoids loops by following a set of rules for traffic forwarding.In case of ethernet switching mode - Ethernet end-host mode is also known as Ethernet host virtualizer. * `switch` - In switch mode, the switch runs Spanning Tree Protocol to avoid loops, and broadcast and multicast packets are handled in the traditional way.This is the traditional switch mode.



49
50
51
# File 'lib/intersight_client/models/network_element.rb', line 49

def fc_switching_mode
  @fc_switching_mode
end

#inband_ip_addressObject

The IP address of the network Element inband management interface.



52
53
54
# File 'lib/intersight_client/models/network_element.rb', line 52

def inband_ip_address
  @inband_ip_address
end

#inband_ip_gatewayObject

The default gateway of the network Element inband management interface.



55
56
57
# File 'lib/intersight_client/models/network_element.rb', line 55

def inband_ip_gateway
  @inband_ip_gateway
end

#inband_ip_maskObject

The network mask of the network Element inband management interface.



58
59
60
# File 'lib/intersight_client/models/network_element.rb', line 58

def inband_ip_mask
  @inband_ip_mask
end

#inband_vlanObject

The VLAN ID of the network Element inband management interface.



61
62
63
# File 'lib/intersight_client/models/network_element.rb', line 61

def inband_vlan
  @inband_vlan
end

#inventory_device_infoObject

Returns the value of attribute inventory_device_info.



117
118
119
# File 'lib/intersight_client/models/network_element.rb', line 117

def inventory_device_info
  @inventory_device_info
end

#management_controllerObject

Returns the value of attribute management_controller.



119
120
121
# File 'lib/intersight_client/models/network_element.rb', line 119

def management_controller
  @management_controller
end

#management_entityObject

Returns the value of attribute management_entity.



121
122
123
# File 'lib/intersight_client/models/network_element.rb', line 121

def management_entity
  @management_entity
end

#management_modeObject

The management mode of the fabric interconnect. * ‘IntersightStandalone` - Intersight Standalone mode of operation. * `UCSM` - Unified Computing System Manager mode of operation. * `Intersight` - Intersight managed mode of operation.



64
65
66
# File 'lib/intersight_client/models/network_element.rb', line 64

def management_mode
  @management_mode
end

#network_fc_zone_infoObject

Returns the value of attribute network_fc_zone_info.



123
124
125
# File 'lib/intersight_client/models/network_element.rb', line 123

def network_fc_zone_info
  @network_fc_zone_info
end

#network_vlan_port_infoObject

Returns the value of attribute network_vlan_port_info.



125
126
127
# File 'lib/intersight_client/models/network_element.rb', line 125

def network_vlan_port_info
  @network_vlan_port_info
end

#object_typeObject

The fully-qualified name of the instantiated, concrete type. The value should be the same as the ‘ClassId’ property.



23
24
25
# File 'lib/intersight_client/models/network_element.rb', line 23

def object_type
  @object_type
end

#oper_evac_stateObject

Operational state of the Fabric Evacuation feature, for this switch.



67
68
69
# File 'lib/intersight_client/models/network_element.rb', line 67

def oper_evac_state
  @oper_evac_state
end

#operabilityObject

The switch’s current overall operational/health state.



70
71
72
# File 'lib/intersight_client/models/network_element.rb', line 70

def operability
  @operability
end

#out_of_band_ip_addressObject

The IP address of the network Element out-of-band management interface.



73
74
75
# File 'lib/intersight_client/models/network_element.rb', line 73

def out_of_band_ip_address
  @out_of_band_ip_address
end

#out_of_band_ip_gatewayObject

The default gateway of the network Element out-of-band management interface.



76
77
78
# File 'lib/intersight_client/models/network_element.rb', line 76

def out_of_band_ip_gateway
  @out_of_band_ip_gateway
end

#out_of_band_ip_maskObject

The network mask of the network Element out-of-band management interface.



79
80
81
# File 'lib/intersight_client/models/network_element.rb', line 79

def out_of_band_ip_mask
  @out_of_band_ip_mask
end

#out_of_band_ipv4_addressObject

The IPv4 address of the network Element out-of-band management interface.



82
83
84
# File 'lib/intersight_client/models/network_element.rb', line 82

def out_of_band_ipv4_address
  @out_of_band_ipv4_address
end

#out_of_band_ipv4_gatewayObject

The default IPv4 gateway of the network Element out-of-band management interface.



85
86
87
# File 'lib/intersight_client/models/network_element.rb', line 85

def out_of_band_ipv4_gateway
  @out_of_band_ipv4_gateway
end

#out_of_band_ipv4_maskObject

The network mask of the network Element out-of-band management interface.



88
89
90
# File 'lib/intersight_client/models/network_element.rb', line 88

def out_of_band_ipv4_mask
  @out_of_band_ipv4_mask
end

#out_of_band_ipv6_addressObject

The IPv6 address of the network Element out-of-band management interface.



91
92
93
# File 'lib/intersight_client/models/network_element.rb', line 91

def out_of_band_ipv6_address
  @out_of_band_ipv6_address
end

#out_of_band_ipv6_gatewayObject

The default IPv6 gateway of the network Element out-of-band management interface.



94
95
96
# File 'lib/intersight_client/models/network_element.rb', line 94

def out_of_band_ipv6_gateway
  @out_of_band_ipv6_gateway
end

#out_of_band_ipv6_prefixObject

The network mask of the network Element out-of-band management interface.



97
98
99
# File 'lib/intersight_client/models/network_element.rb', line 97

def out_of_band_ipv6_prefix
  @out_of_band_ipv6_prefix
end

#out_of_band_macObject

The MAC address of the network Element out-of-band management interface.



100
101
102
# File 'lib/intersight_client/models/network_element.rb', line 100

def out_of_band_mac
  @out_of_band_mac
end

#port_mac_bindingsObject

An array of relationships to portMacBinding resources.



128
129
130
# File 'lib/intersight_client/models/network_element.rb', line 128

def port_mac_bindings
  @port_mac_bindings
end

#psusObject

An array of relationships to equipmentPsu resources.



131
132
133
# File 'lib/intersight_client/models/network_element.rb', line 131

def psus
  @psus
end

#registered_deviceObject

Returns the value of attribute registered_device.



133
134
135
# File 'lib/intersight_client/models/network_element.rb', line 133

def registered_device
  @registered_device
end

#storage_itemsObject

An array of relationships to storageItem resources.



136
137
138
# File 'lib/intersight_client/models/network_element.rb', line 136

def storage_items
  @storage_items
end

#switch_idObject

The Switch Id of the network Element.



103
104
105
# File 'lib/intersight_client/models/network_element.rb', line 103

def switch_id
  @switch_id
end

#thermalObject

The Thermal status of the fabric interconnect. * ‘unknown` - The default state of the sensor (in case no data is received). * `ok` - State of the sensor indicating the sensor’s temperature range is okay. * ‘upper-non-recoverable` - State of the sensor indicating that the temperature is extremely high above normal range. * `upper-critical` - State of the sensor indicating that the temperature is above normal range. * `upper-non-critical` - State of the sensor indicating that the temperature is a little above the normal range. * `lower-non-critical` - State of the sensor indicating that the temperature is a little below the normal range. * `lower-critical` - State of the sensor indicating that the temperature is below normal range. * `lower-non-recoverable` - State of the sensor indicating that the temperature is extremely below normal range.



106
107
108
# File 'lib/intersight_client/models/network_element.rb', line 106

def thermal
  @thermal
end

#top_systemObject

Returns the value of attribute top_system.



138
139
140
# File 'lib/intersight_client/models/network_element.rb', line 138

def top_system
  @top_system
end

#total_memoryObject

Total available memory on this switch platform.



109
110
111
# File 'lib/intersight_client/models/network_element.rb', line 109

def total_memory
  @total_memory
end

#ucsm_running_firmwareObject

Returns the value of attribute ucsm_running_firmware.



140
141
142
# File 'lib/intersight_client/models/network_element.rb', line 140

def ucsm_running_firmware
  @ucsm_running_firmware
end

Class Method Details

.acceptable_attribute_mapObject

Returns the key-value map of all the JSON attributes this model knows about, including the ones defined in its parent(s)



220
221
222
# File 'lib/intersight_client/models/network_element.rb', line 220

def self.acceptable_attribute_map
  attribute_map.merge(superclass.acceptable_attribute_map)
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about, including the ones defined in its parent(s)



215
216
217
# File 'lib/intersight_client/models/network_element.rb', line 215

def self.acceptable_attributes
  attribute_map.values.concat(superclass.acceptable_attributes)
end

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



165
166
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
212
# File 'lib/intersight_client/models/network_element.rb', line 165

def self.attribute_map
  {
    :'class_id' => :'ClassId',
    :'object_type' => :'ObjectType',
    :'admin_evac_state' => :'AdminEvacState',
    :'admin_inband_interface_state' => :'AdminInbandInterfaceState',
    :'alarm_summary' => :'AlarmSummary',
    :'available_memory' => :'AvailableMemory',
    :'ethernet_mode' => :'EthernetMode',
    :'ethernet_switching_mode' => :'EthernetSwitchingMode',
    :'fault_summary' => :'FaultSummary',
    :'fc_mode' => :'FcMode',
    :'fc_switching_mode' => :'FcSwitchingMode',
    :'inband_ip_address' => :'InbandIpAddress',
    :'inband_ip_gateway' => :'InbandIpGateway',
    :'inband_ip_mask' => :'InbandIpMask',
    :'inband_vlan' => :'InbandVlan',
    :'management_mode' => :'ManagementMode',
    :'oper_evac_state' => :'OperEvacState',
    :'operability' => :'Operability',
    :'out_of_band_ip_address' => :'OutOfBandIpAddress',
    :'out_of_band_ip_gateway' => :'OutOfBandIpGateway',
    :'out_of_band_ip_mask' => :'OutOfBandIpMask',
    :'out_of_band_ipv4_address' => :'OutOfBandIpv4Address',
    :'out_of_band_ipv4_gateway' => :'OutOfBandIpv4Gateway',
    :'out_of_band_ipv4_mask' => :'OutOfBandIpv4Mask',
    :'out_of_band_ipv6_address' => :'OutOfBandIpv6Address',
    :'out_of_band_ipv6_gateway' => :'OutOfBandIpv6Gateway',
    :'out_of_band_ipv6_prefix' => :'OutOfBandIpv6Prefix',
    :'out_of_band_mac' => :'OutOfBandMac',
    :'switch_id' => :'SwitchId',
    :'thermal' => :'Thermal',
    :'total_memory' => :'TotalMemory',
    :'cards' => :'Cards',
    :'fanmodules' => :'Fanmodules',
    :'inventory_device_info' => :'InventoryDeviceInfo',
    :'management_controller' => :'ManagementController',
    :'management_entity' => :'ManagementEntity',
    :'network_fc_zone_info' => :'NetworkFcZoneInfo',
    :'network_vlan_port_info' => :'NetworkVlanPortInfo',
    :'port_mac_bindings' => :'PortMacBindings',
    :'psus' => :'Psus',
    :'registered_device' => :'RegisteredDevice',
    :'storage_items' => :'StorageItems',
    :'top_system' => :'TopSystem',
    :'ucsm_running_firmware' => :'UcsmRunningFirmware'
  }
end

.build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



677
678
679
# File 'lib/intersight_client/models/network_element.rb', line 677

def self.build_from_hash(attributes)
  new.build_from_hash(attributes)
end

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



287
288
289
290
291
292
# File 'lib/intersight_client/models/network_element.rb', line 287

def self.openapi_all_of
  [
  :'EquipmentBase',
  :'NetworkElementAllOf'
  ]
end

.openapi_discriminator_nameObject

discriminator’s property name in OpenAPI v3



295
296
297
# File 'lib/intersight_client/models/network_element.rb', line 295

def self.openapi_discriminator_name
  :'ClassId'
end

.openapi_nullableObject

List of attributes with nullable: true



275
276
277
278
279
280
281
282
283
284
# File 'lib/intersight_client/models/network_element.rb', line 275

def self.openapi_nullable
  Set.new([
    :'alarm_summary',
    :'cards',
    :'fanmodules',
    :'port_mac_bindings',
    :'psus',
    :'storage_items',
  ])
end

.openapi_typesObject

Attribute type mapping.



225
226
227
228
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
# File 'lib/intersight_client/models/network_element.rb', line 225

def self.openapi_types
  {
    :'class_id' => :'String',
    :'object_type' => :'String',
    :'admin_evac_state' => :'String',
    :'admin_inband_interface_state' => :'String',
    :'alarm_summary' => :'ComputeAlarmSummary',
    :'available_memory' => :'String',
    :'ethernet_mode' => :'String',
    :'ethernet_switching_mode' => :'String',
    :'fault_summary' => :'Integer',
    :'fc_mode' => :'String',
    :'fc_switching_mode' => :'String',
    :'inband_ip_address' => :'String',
    :'inband_ip_gateway' => :'String',
    :'inband_ip_mask' => :'String',
    :'inband_vlan' => :'Integer',
    :'management_mode' => :'String',
    :'oper_evac_state' => :'String',
    :'operability' => :'String',
    :'out_of_band_ip_address' => :'String',
    :'out_of_band_ip_gateway' => :'String',
    :'out_of_band_ip_mask' => :'String',
    :'out_of_band_ipv4_address' => :'String',
    :'out_of_band_ipv4_gateway' => :'String',
    :'out_of_band_ipv4_mask' => :'String',
    :'out_of_band_ipv6_address' => :'String',
    :'out_of_band_ipv6_gateway' => :'String',
    :'out_of_band_ipv6_prefix' => :'String',
    :'out_of_band_mac' => :'String',
    :'switch_id' => :'String',
    :'thermal' => :'String',
    :'total_memory' => :'Integer',
    :'cards' => :'Array<EquipmentSwitchCardRelationship>',
    :'fanmodules' => :'Array<EquipmentFanModuleRelationship>',
    :'inventory_device_info' => :'InventoryDeviceInfoRelationship',
    :'management_controller' => :'ManagementControllerRelationship',
    :'management_entity' => :'ManagementEntityRelationship',
    :'network_fc_zone_info' => :'NetworkFcZoneInfoRelationship',
    :'network_vlan_port_info' => :'NetworkVlanPortInfoRelationship',
    :'port_mac_bindings' => :'Array<PortMacBindingRelationship>',
    :'psus' => :'Array<EquipmentPsuRelationship>',
    :'registered_device' => :'AssetDeviceRegistrationRelationship',
    :'storage_items' => :'Array<StorageItemRelationship>',
    :'top_system' => :'TopSystemRelationship',
    :'ucsm_running_firmware' => :'FirmwareRunningFirmwareRelationship'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
# File 'lib/intersight_client/models/network_element.rb', line 613

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      class_id == o.class_id &&
      object_type == o.object_type &&
      admin_evac_state == o.admin_evac_state &&
      admin_inband_interface_state == o.admin_inband_interface_state &&
      alarm_summary == o.alarm_summary &&
      available_memory == o.available_memory &&
      ethernet_mode == o.ethernet_mode &&
      ethernet_switching_mode == o.ethernet_switching_mode &&
      fault_summary == o.fault_summary &&
      fc_mode == o.fc_mode &&
      fc_switching_mode == o.fc_switching_mode &&
      inband_ip_address == o.inband_ip_address &&
      inband_ip_gateway == o.inband_ip_gateway &&
      inband_ip_mask == o.inband_ip_mask &&
      inband_vlan == o.inband_vlan &&
      management_mode == o.management_mode &&
      oper_evac_state == o.oper_evac_state &&
      operability == o.operability &&
      out_of_band_ip_address == o.out_of_band_ip_address &&
      out_of_band_ip_gateway == o.out_of_band_ip_gateway &&
      out_of_band_ip_mask == o.out_of_band_ip_mask &&
      out_of_band_ipv4_address == o.out_of_band_ipv4_address &&
      out_of_band_ipv4_gateway == o.out_of_band_ipv4_gateway &&
      out_of_band_ipv4_mask == o.out_of_band_ipv4_mask &&
      out_of_band_ipv6_address == o.out_of_band_ipv6_address &&
      out_of_band_ipv6_gateway == o.out_of_band_ipv6_gateway &&
      out_of_band_ipv6_prefix == o.out_of_band_ipv6_prefix &&
      out_of_band_mac == o.out_of_band_mac &&
      switch_id == o.switch_id &&
      thermal == o.thermal &&
      total_memory == o.total_memory &&
      cards == o.cards &&
      fanmodules == o.fanmodules &&
      inventory_device_info == o.inventory_device_info &&
      management_controller == o.management_controller &&
      management_entity == o.management_entity &&
      network_fc_zone_info == o.network_fc_zone_info &&
      network_vlan_port_info == o.network_vlan_port_info &&
      port_mac_bindings == o.port_mac_bindings &&
      psus == o.psus &&
      registered_device == o.registered_device &&
      storage_items == o.storage_items &&
      top_system == o.top_system &&
      ucsm_running_firmware == o.ucsm_running_firmware && super(o)
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
# File 'lib/intersight_client/models/network_element.rb', line 708

def _deserialize(type, value)
  case type.to_sym
  when :Time
    Time.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :Boolean
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    # models (e.g. Pet) or oneOf
    klass = IntersightClient.const_get(type)
    klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



779
780
781
782
783
784
785
786
787
788
789
790
791
# File 'lib/intersight_client/models/network_element.rb', line 779

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  end
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/intersight_client/models/network_element.rb', line 684

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  super(attributes)
  NetworkElement.openapi_types.each_pair do |key, type|
    if attributes[NetworkElement.attribute_map[key]].nil? && NetworkElement.openapi_nullable.include?(key)
      self.send("#{key}=", nil)
    elsif type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[NetworkElement.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[NetworkElement.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[NetworkElement.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(type, attributes[NetworkElement.attribute_map[key]]))
    end
  end

  self
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


664
665
666
# File 'lib/intersight_client/models/network_element.rb', line 664

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



670
671
672
# File 'lib/intersight_client/models/network_element.rb', line 670

def hash
  [class_id, object_type, admin_evac_state, admin_inband_interface_state, alarm_summary, available_memory, ethernet_mode, ethernet_switching_mode, fault_summary, fc_mode, fc_switching_mode, inband_ip_address, inband_ip_gateway, inband_ip_mask, inband_vlan, management_mode, oper_evac_state, operability, out_of_band_ip_address, out_of_band_ip_gateway, out_of_band_ip_mask, out_of_band_ipv4_address, out_of_band_ipv4_gateway, out_of_band_ipv4_mask, out_of_band_ipv6_address, out_of_band_ipv6_gateway, out_of_band_ipv6_prefix, out_of_band_mac, switch_id, thermal, total_memory, cards, fanmodules, inventory_device_info, management_controller, management_entity, network_fc_zone_info, network_vlan_port_info, port_mac_bindings, psus, registered_device, storage_items, top_system, ucsm_running_firmware].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



518
519
520
521
522
523
524
525
526
527
528
529
# File 'lib/intersight_client/models/network_element.rb', line 518

def list_invalid_properties
  invalid_properties = super
  if @class_id.nil?
    invalid_properties.push('invalid value for "class_id", class_id cannot be nil.')
  end

  if @object_type.nil?
    invalid_properties.push('invalid value for "object_type", object_type cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



755
756
757
# File 'lib/intersight_client/models/network_element.rb', line 755

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



761
762
763
764
765
766
767
768
769
770
771
772
773
# File 'lib/intersight_client/models/network_element.rb', line 761

def to_hash
  hash = super
  NetworkElement.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    if value.nil?
      is_nullable = NetworkElement.openapi_nullable.include?(attr)
      next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
    end

    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



749
750
751
# File 'lib/intersight_client/models/network_element.rb', line 749

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
# File 'lib/intersight_client/models/network_element.rb', line 533

def valid?
  return false if @class_id.nil?
  class_id_validator = EnumAttributeValidator.new('String', ["network.Element"])
  return false unless class_id_validator.valid?(@class_id)
  return false if @object_type.nil?
  object_type_validator = EnumAttributeValidator.new('String', ["network.Element"])
  return false unless object_type_validator.valid?(@object_type)
  ethernet_switching_mode_validator = EnumAttributeValidator.new('String', ["end-host", "switch"])
  return false unless ethernet_switching_mode_validator.valid?(@ethernet_switching_mode)
  fc_switching_mode_validator = EnumAttributeValidator.new('String', ["end-host", "switch"])
  return false unless fc_switching_mode_validator.valid?(@fc_switching_mode)
  management_mode_validator = EnumAttributeValidator.new('String', ["IntersightStandalone", "UCSM", "Intersight"])
  return false unless management_mode_validator.valid?(@management_mode)
  thermal_validator = EnumAttributeValidator.new('String', ["unknown", "ok", "upper-non-recoverable", "upper-critical", "upper-non-critical", "lower-non-critical", "lower-critical", "lower-non-recoverable"])
  return false unless thermal_validator.valid?(@thermal)
  true && super
end