Class: NutanixClustermgmt::ClustermgmtV40ConfigHostNic

Inherits:
ApiModelBase
  • Object
show all
Defined in:
lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb

Overview

Host NIC details.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from ApiModelBase

_deserialize, #_to_hash, #to_body, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ ClustermgmtV40ConfigHostNic

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
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
273
274
275
276
277
278
279
280
281
282
283
284
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 171

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Instance Attribute Details

#attached_switch_interface_listObject

List of network switch interfaces attached to the host NIC.



79
80
81
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 79

def attached_switch_interface_list
  @attached_switch_interface_list
end

#discovery_protocolObject

Network discovery protocol (either LLDP or None).



59
60
61
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 59

def discovery_protocol
  @discovery_protocol
end

#ext_idObject

A globally unique identifier of an instance that is suitable for external consumption.



23
24
25
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 23

def ext_id
  @ext_id
end

#host_descriptionObject

Host description.



32
33
34
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 32

def host_description
  @host_description
end

#interface_statusObject

Operational status of the interface to the port associated with the NIC entity.



44
45
46
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 44

def interface_status
  @interface_status
end

#ipv4_addressesObject

List of IPv4 addresses associated with the NIC entity for the network connection.



38
39
40
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 38

def ipv4_addresses
  @ipv4_addresses
end

#ipv6_addressesObject

List of IPv6 addresses associated with the NIC entity for the network connection.



41
42
43
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 41

def ipv6_addresses
  @ipv6_addresses
end

#is_dhcp_enabledObject

Status of DHCP protocol.



47
48
49
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 47

def is_dhcp_enabled
  @is_dhcp_enabled
end

Link speed in Kbps.



50
51
52
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 50

def link_speed_in_kbps
  @link_speed_in_kbps
end

A HATEOAS style link for the response. Each link contains a user-friendly name identifying the link and an address for retrieving the particular resource.



26
27
28
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 26

def links
  @links
end

#mac_addressObject

Host Mac address.



35
36
37
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 35

def mac_address
  @mac_address
end

#mtu_in_bytesObject

Maximum transmission unit in bytes.



53
54
55
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 53

def mtu_in_bytes
  @mtu_in_bytes
end

#nameObject

Name of the host NIC.



29
30
31
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 29

def name
  @name
end

#node_uuidObject

UUID of the host.



56
57
58
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 56

def node_uuid
  @node_uuid
end

#rx_ring_size_in_bytesObject

Size of configured buffer (in bytes) to the port associated with NIC, storing the network packets received through the port.



82
83
84
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 82

def rx_ring_size_in_bytes
  @rx_ring_size_in_bytes
end

#switch_device_idObject

Switch device Id learned through the discovery protocol.



62
63
64
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 62

def switch_device_id
  @switch_device_id
end

#switch_mac_addressObject

Switch Mac address



76
77
78
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 76

def switch_mac_address
  @switch_mac_address
end

#switch_management_ipObject

Returns the value of attribute switch_management_ip.



73
74
75
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 73

def switch_management_ip
  @switch_management_ip
end

#switch_port_idObject

Switch port Id learned through the discovery protocol.



65
66
67
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 65

def switch_port_id
  @switch_port_id
end

#switch_vendor_infoObject

Switch vendor information learned through the discovery protocol.



68
69
70
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 68

def switch_vendor_info
  @switch_vendor_info
end

#switch_vlan_idObject

Switch VLAN Id learned through the discovery protocol.



71
72
73
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 71

def switch_vlan_id
  @switch_vlan_id
end

#tenant_idObject

A globally unique identifier that represents the tenant that owns this entity. The system automatically assigns it, and it and is immutable from an API consumer perspective (some use cases may cause this Id to change - For instance, a use case may require the transfer of ownership of the entity, but these cases are handled automatically on the server).



20
21
22
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 20

def tenant_id
  @tenant_id
end

#tx_ring_size_in_bytesObject

Size of configured buffer (in bytes) to the port associated with NIC, storing the network packets that would be transmitted through the port.



85
86
87
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 85

def tx_ring_size_in_bytes
  @tx_ring_size_in_bytes
end

Class Method Details

.acceptable_attribute_mapObject

Returns attribute mapping this model knows about



117
118
119
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 117

def self.acceptable_attribute_map
  attribute_map
end

.acceptable_attributesObject

Returns all the JSON keys this model knows about



122
123
124
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 122

def self.acceptable_attributes
  acceptable_attribute_map.values
end

.attribute_mapObject

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



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 88

def self.attribute_map
  {
    :'tenant_id' => :'tenantId',
    :'ext_id' => :'extId',
    :'links' => :'links',
    :'name' => :'name',
    :'host_description' => :'hostDescription',
    :'mac_address' => :'macAddress',
    :'ipv4_addresses' => :'ipv4Addresses',
    :'ipv6_addresses' => :'ipv6Addresses',
    :'interface_status' => :'interfaceStatus',
    :'is_dhcp_enabled' => :'isDhcpEnabled',
    :'link_speed_in_kbps' => :'linkSpeedInKbps',
    :'mtu_in_bytes' => :'mtuInBytes',
    :'node_uuid' => :'nodeUuid',
    :'discovery_protocol' => :'discoveryProtocol',
    :'switch_device_id' => :'switchDeviceId',
    :'switch_port_id' => :'switchPortId',
    :'switch_vendor_info' => :'switchVendorInfo',
    :'switch_vlan_id' => :'switchVlanId',
    :'switch_management_ip' => :'switchManagementIp',
    :'switch_mac_address' => :'switchMacAddress',
    :'attached_switch_interface_list' => :'attachedSwitchInterfaceList',
    :'rx_ring_size_in_bytes' => :'rxRingSizeInBytes',
    :'tx_ring_size_in_bytes' => :'txRingSizeInBytes'
  }
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



578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 578

def self.build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  attributes = attributes.transform_keys(&:to_sym)
  transformed_hash = {}
  openapi_types.each_pair do |key, type|
    if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil?
      transformed_hash["#{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[attribute_map[key]].is_a?(Array)
        transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) }
      end
    elsif !attributes[attribute_map[key]].nil?
      transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]])
    end
  end
  new(transformed_hash)
end

.openapi_all_ofObject

List of class defined in allOf (OpenAPI v3)



163
164
165
166
167
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 163

def self.openapi_all_of
  [
  :'CommonV10ResponseExternalizableAbstractModel'
  ]
end

.openapi_nullableObject

List of attributes with nullable: true



156
157
158
159
160
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 156

def self.openapi_nullable
  Set.new([
    :'ext_id',
  ])
end

.openapi_typesObject

Attribute type mapping.



127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 127

def self.openapi_types
  {
    :'tenant_id' => :'String',
    :'ext_id' => :'String',
    :'links' => :'Array<CommonV10ResponseApiLink>',
    :'name' => :'String',
    :'host_description' => :'String',
    :'mac_address' => :'String',
    :'ipv4_addresses' => :'Array<CommonV10ConfigIPAddress>',
    :'ipv6_addresses' => :'Array<CommonV10ConfigIPAddress>',
    :'interface_status' => :'String',
    :'is_dhcp_enabled' => :'Boolean',
    :'link_speed_in_kbps' => :'Integer',
    :'mtu_in_bytes' => :'Integer',
    :'node_uuid' => :'String',
    :'discovery_protocol' => :'String',
    :'switch_device_id' => :'String',
    :'switch_port_id' => :'String',
    :'switch_vendor_info' => :'String',
    :'switch_vlan_id' => :'String',
    :'switch_management_ip' => :'CommonV10ConfigIPAddress',
    :'switch_mac_address' => :'String',
    :'attached_switch_interface_list' => :'Array<ClustermgmtV40ConfigNetworkSwitchInterface>',
    :'rx_ring_size_in_bytes' => :'Integer',
    :'tx_ring_size_in_bytes' => :'Integer'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 535

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
      tenant_id == o.tenant_id &&
      ext_id == o.ext_id &&
      links == o.links &&
      name == o.name &&
      host_description == o.host_description &&
      mac_address == o.mac_address &&
      ipv4_addresses == o.ipv4_addresses &&
      ipv6_addresses == o.ipv6_addresses &&
      interface_status == o.interface_status &&
      is_dhcp_enabled == o.is_dhcp_enabled &&
      link_speed_in_kbps == o.link_speed_in_kbps &&
      mtu_in_bytes == o.mtu_in_bytes &&
      node_uuid == o.node_uuid &&
      discovery_protocol == o.discovery_protocol &&
      switch_device_id == o.switch_device_id &&
      switch_port_id == o.switch_port_id &&
      switch_vendor_info == o.switch_vendor_info &&
      switch_vlan_id == o.switch_vlan_id &&
      switch_management_ip == o.switch_management_ip &&
      switch_mac_address == o.switch_mac_address &&
      attached_switch_interface_list == o.attached_switch_interface_list &&
      rx_ring_size_in_bytes == o.rx_ring_size_in_bytes &&
      tx_ring_size_in_bytes == o.tx_ring_size_in_bytes
end

#eql?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


565
566
567
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 565

def eql?(o)
  self == o
end

#hashInteger

Calculates hash code according to all attributes.

Returns:

  • (Integer)

    Hash code



571
572
573
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 571

def hash
  [tenant_id, ext_id, links, name, host_description, mac_address, ipv4_addresses, ipv6_addresses, interface_status, is_dhcp_enabled, link_speed_in_kbps, mtu_in_bytes, node_uuid, discovery_protocol, switch_device_id, switch_port_id, switch_vendor_info, switch_vlan_id, switch_management_ip, switch_mac_address, attached_switch_interface_list, rx_ring_size_in_bytes, tx_ring_size_in_bytes].hash
end

#list_invalid_propertiesObject

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

Returns:

  • Array for valid properties with the reasons



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

def list_invalid_properties
  warn '[DEPRECATED] the `list_invalid_properties` method is obsolete'
  invalid_properties = Array.new
  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if !@tenant_id.nil? && @tenant_id !~ pattern
    invalid_properties.push("invalid value for \"tenant_id\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if !@ext_id.nil? && @ext_id !~ pattern
    invalid_properties.push("invalid value for \"ext_id\", must conform to the pattern #{pattern}.")
  end

  if !@links.nil? && @links.length > 20
    invalid_properties.push('invalid value for "links", number of items must be less than or equal to 20.')
  end

  if !@links.nil? && @links.length < 0
    invalid_properties.push('invalid value for "links", number of items must be greater than or equal to 0.')
  end

  if !@name.nil? && @name.to_s.length > 64
    invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 64.')
  end

  pattern = Regexp.new(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/)
  if !@mac_address.nil? && @mac_address !~ pattern
    invalid_properties.push("invalid value for \"mac_address\", must conform to the pattern #{pattern}.")
  end

  if !@ipv4_addresses.nil? && @ipv4_addresses.length > 1024
    invalid_properties.push('invalid value for "ipv4_addresses", number of items must be less than or equal to 1024.')
  end

  if !@ipv4_addresses.nil? && @ipv4_addresses.length < 0
    invalid_properties.push('invalid value for "ipv4_addresses", number of items must be greater than or equal to 0.')
  end

  if !@ipv6_addresses.nil? && @ipv6_addresses.length > 1024
    invalid_properties.push('invalid value for "ipv6_addresses", number of items must be less than or equal to 1024.')
  end

  if !@ipv6_addresses.nil? && @ipv6_addresses.length < 0
    invalid_properties.push('invalid value for "ipv6_addresses", number of items must be greater than or equal to 0.')
  end

  pattern = Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  if !@node_uuid.nil? && @node_uuid !~ pattern
    invalid_properties.push("invalid value for \"node_uuid\", must conform to the pattern #{pattern}.")
  end

  pattern = Regexp.new(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/)
  if !@switch_mac_address.nil? && @switch_mac_address !~ pattern
    invalid_properties.push("invalid value for \"switch_mac_address\", must conform to the pattern #{pattern}.")
  end

  if !@attached_switch_interface_list.nil? && @attached_switch_interface_list.length > 1024
    invalid_properties.push('invalid value for "attached_switch_interface_list", number of items must be less than or equal to 1024.')
  end

  if !@attached_switch_interface_list.nil? && @attached_switch_interface_list.length < 0
    invalid_properties.push('invalid value for "attached_switch_interface_list", number of items must be greater than or equal to 0.')
  end

  invalid_properties
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



600
601
602
603
604
605
606
607
608
609
610
611
612
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 600

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

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

#valid?Boolean

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

Returns:

  • (Boolean)

    true if the model is valid



357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# File 'lib/nutanix_clustermgmt/models/clustermgmt_v40_config_host_nic.rb', line 357

def valid?
  warn '[DEPRECATED] the `valid?` method is obsolete'
  return false if !@tenant_id.nil? && @tenant_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  return false if !@ext_id.nil? && @ext_id !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  return false if !@links.nil? && @links.length > 20
  return false if !@links.nil? && @links.length < 0
  return false if !@name.nil? && @name.to_s.length > 64
  return false if !@mac_address.nil? && @mac_address !~ Regexp.new(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/)
  return false if !@ipv4_addresses.nil? && @ipv4_addresses.length > 1024
  return false if !@ipv4_addresses.nil? && @ipv4_addresses.length < 0
  return false if !@ipv6_addresses.nil? && @ipv6_addresses.length > 1024
  return false if !@ipv6_addresses.nil? && @ipv6_addresses.length < 0
  return false if !@node_uuid.nil? && @node_uuid !~ Regexp.new(/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/)
  return false if !@switch_mac_address.nil? && @switch_mac_address !~ Regexp.new(/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/)
  return false if !@attached_switch_interface_list.nil? && @attached_switch_interface_list.length > 1024
  return false if !@attached_switch_interface_list.nil? && @attached_switch_interface_list.length < 0
  true
end