Class: OCI::Ocvp::Models::NetworkConfiguration

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/ocvp/models/network_configuration.rb

Overview

The network configurations used by Cluster, including OCIDs of the management subnet and VLANs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ NetworkConfiguration

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
285
286
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/oci/ocvp/models/network_configuration.rb', line 226

def initialize(attributes = {})
  return unless attributes.is_a?(Hash)

  # convert string to symbol for hash key
  attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }

  self.provisioning_subnet_id = attributes[:'provisioningSubnetId'] if attributes[:'provisioningSubnetId']

  raise 'You cannot provide both :provisioningSubnetId and :provisioning_subnet_id' if attributes.key?(:'provisioningSubnetId') && attributes.key?(:'provisioning_subnet_id')

  self.provisioning_subnet_id = attributes[:'provisioning_subnet_id'] if attributes[:'provisioning_subnet_id']

  self.vsphere_vlan_id = attributes[:'vsphereVlanId'] if attributes[:'vsphereVlanId']

  raise 'You cannot provide both :vsphereVlanId and :vsphere_vlan_id' if attributes.key?(:'vsphereVlanId') && attributes.key?(:'vsphere_vlan_id')

  self.vsphere_vlan_id = attributes[:'vsphere_vlan_id'] if attributes[:'vsphere_vlan_id']

  self.vmotion_vlan_id = attributes[:'vmotionVlanId'] if attributes[:'vmotionVlanId']

  raise 'You cannot provide both :vmotionVlanId and :vmotion_vlan_id' if attributes.key?(:'vmotionVlanId') && attributes.key?(:'vmotion_vlan_id')

  self.vmotion_vlan_id = attributes[:'vmotion_vlan_id'] if attributes[:'vmotion_vlan_id']

  self.vsan_vlan_id = attributes[:'vsanVlanId'] if attributes[:'vsanVlanId']

  raise 'You cannot provide both :vsanVlanId and :vsan_vlan_id' if attributes.key?(:'vsanVlanId') && attributes.key?(:'vsan_vlan_id')

  self.vsan_vlan_id = attributes[:'vsan_vlan_id'] if attributes[:'vsan_vlan_id']

  self.nsx_v_tep_vlan_id = attributes[:'nsxVTepVlanId'] if attributes[:'nsxVTepVlanId']

  raise 'You cannot provide both :nsxVTepVlanId and :nsx_v_tep_vlan_id' if attributes.key?(:'nsxVTepVlanId') && attributes.key?(:'nsx_v_tep_vlan_id')

  self.nsx_v_tep_vlan_id = attributes[:'nsx_v_tep_vlan_id'] if attributes[:'nsx_v_tep_vlan_id']

  self.nsx_edge_v_tep_vlan_id = attributes[:'nsxEdgeVTepVlanId'] if attributes[:'nsxEdgeVTepVlanId']

  raise 'You cannot provide both :nsxEdgeVTepVlanId and :nsx_edge_v_tep_vlan_id' if attributes.key?(:'nsxEdgeVTepVlanId') && attributes.key?(:'nsx_edge_v_tep_vlan_id')

  self.nsx_edge_v_tep_vlan_id = attributes[:'nsx_edge_v_tep_vlan_id'] if attributes[:'nsx_edge_v_tep_vlan_id']

  self.nsx_edge_uplink1_vlan_id = attributes[:'nsxEdgeUplink1VlanId'] if attributes[:'nsxEdgeUplink1VlanId']

  raise 'You cannot provide both :nsxEdgeUplink1VlanId and :nsx_edge_uplink1_vlan_id' if attributes.key?(:'nsxEdgeUplink1VlanId') && attributes.key?(:'nsx_edge_uplink1_vlan_id')

  self.nsx_edge_uplink1_vlan_id = attributes[:'nsx_edge_uplink1_vlan_id'] if attributes[:'nsx_edge_uplink1_vlan_id']

  self.nsx_edge_uplink2_vlan_id = attributes[:'nsxEdgeUplink2VlanId'] if attributes[:'nsxEdgeUplink2VlanId']

  raise 'You cannot provide both :nsxEdgeUplink2VlanId and :nsx_edge_uplink2_vlan_id' if attributes.key?(:'nsxEdgeUplink2VlanId') && attributes.key?(:'nsx_edge_uplink2_vlan_id')

  self.nsx_edge_uplink2_vlan_id = attributes[:'nsx_edge_uplink2_vlan_id'] if attributes[:'nsx_edge_uplink2_vlan_id']

  self.replication_vlan_id = attributes[:'replicationVlanId'] if attributes[:'replicationVlanId']

  raise 'You cannot provide both :replicationVlanId and :replication_vlan_id' if attributes.key?(:'replicationVlanId') && attributes.key?(:'replication_vlan_id')

  self.replication_vlan_id = attributes[:'replication_vlan_id'] if attributes[:'replication_vlan_id']

  self.provisioning_vlan_id = attributes[:'provisioningVlanId'] if attributes[:'provisioningVlanId']

  raise 'You cannot provide both :provisioningVlanId and :provisioning_vlan_id' if attributes.key?(:'provisioningVlanId') && attributes.key?(:'provisioning_vlan_id')

  self.provisioning_vlan_id = attributes[:'provisioning_vlan_id'] if attributes[:'provisioning_vlan_id']

  self.hcx_vlan_id = attributes[:'hcxVlanId'] if attributes[:'hcxVlanId']

  raise 'You cannot provide both :hcxVlanId and :hcx_vlan_id' if attributes.key?(:'hcxVlanId') && attributes.key?(:'hcx_vlan_id')

  self.hcx_vlan_id = attributes[:'hcx_vlan_id'] if attributes[:'hcx_vlan_id']
end

Instance Attribute Details

#hcx_vlan_idString

The OCID of the VLAN used by the SDDC for the HCX component of the VMware environment. This VLAN is a mandatory attribute for Management Cluster when HCX is enabled.

This attribute is not guaranteed to reflect the HCX VLAN currently used by the ESXi hosts in the SDDC. The purpose of this attribute is to show the HCX VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this SDDC in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the SDDC to use a different VLAN for the HCX component of the VMware environment, you should use update_sddc to update the SDDC's hcxVlanId with that new VLAN's OCID.

Returns:

  • (String)


169
170
171
# File 'lib/oci/ocvp/models/network_configuration.rb', line 169

def hcx_vlan_id
  @hcx_vlan_id
end

#nsx_edge_uplink1_vlan_idString

The OCID of the VLAN used by the SDDC for the NSX Edge Uplink 1 component of the VMware environment. This VLAN is a mandatory attribute for Management Cluster.

This attribute is not guaranteed to reflect the NSX Edge Uplink 1 VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the NSX Edge Uplink 1 VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the NSX Edge Uplink 1 component of the VMware environment, you should use update_cluster to update the Cluster's nsxEdgeUplink1VlanId with that new VLAN's OCID.

Returns:

  • (String)


121
122
123
# File 'lib/oci/ocvp/models/network_configuration.rb', line 121

def nsx_edge_uplink1_vlan_id
  @nsx_edge_uplink1_vlan_id
end

#nsx_edge_uplink2_vlan_idString

The OCID of the VLAN used by the SDDC for the NSX Edge Uplink 2 component of the VMware environment. This VLAN is a mandatory attribute for Management Cluster.

This attribute is not guaranteed to reflect the NSX Edge Uplink 2 VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the NSX Edge Uplink 2 VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the NSX Edge Uplink 2 component of the VMware environment, you should use update_cluster to update the Cluster's nsxEdgeUplink2VlanId with that new VLAN's OCID.

Returns:

  • (String)


139
140
141
# File 'lib/oci/ocvp/models/network_configuration.rb', line 139

def nsx_edge_uplink2_vlan_id
  @nsx_edge_uplink2_vlan_id
end

#nsx_edge_v_tep_vlan_idString

[Required] The OCID of the VLAN used by the Cluster for the NSX Edge VTEP component of the VMware environment.

This attribute is not guaranteed to reflect the NSX Edge VTEP VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the NSX Edge VTEP VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the NSX Edge VTEP component of the VMware environment, you should use update_cluster to update the Cluster's nsxEdgeVTepVlanId with that new VLAN's OCID.

Returns:

  • (String)


103
104
105
# File 'lib/oci/ocvp/models/network_configuration.rb', line 103

def nsx_edge_v_tep_vlan_id
  @nsx_edge_v_tep_vlan_id
end

#nsx_v_tep_vlan_idString

[Required] The OCID of the VLAN used by the Cluster for the NSX VTEP component of the VMware environment.

This attribute is not guaranteed to reflect the NSX VTEP VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the NSX VTEP VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the NSX VTEP component of the VMware environment, you should use update_cluster to update the Cluster's nsxVTepVlanId with that new VLAN's OCID.

Returns:

  • (String)


86
87
88
# File 'lib/oci/ocvp/models/network_configuration.rb', line 86

def nsx_v_tep_vlan_id
  @nsx_v_tep_vlan_id
end

#provisioning_subnet_idString

[Required] The OCID of the management subnet used to provision the Cluster.

Returns:

  • (String)


17
18
19
# File 'lib/oci/ocvp/models/network_configuration.rb', line 17

def provisioning_subnet_id
  @provisioning_subnet_id
end

#provisioning_vlan_idString

The OCID of the VLAN used by the Cluster for the Provisioning component of the VMware environment.

Returns:

  • (String)


151
152
153
# File 'lib/oci/ocvp/models/network_configuration.rb', line 151

def provisioning_vlan_id
  @provisioning_vlan_id
end

#replication_vlan_idString

The OCID of the VLAN used by the Cluster for the vSphere Replication component of the VMware environment.

Returns:

  • (String)


145
146
147
# File 'lib/oci/ocvp/models/network_configuration.rb', line 145

def replication_vlan_id
  @replication_vlan_id
end

#vmotion_vlan_idString

[Required] The OCID of the VLAN used by the Cluster for the vMotion component of the VMware environment.

This attribute is not guaranteed to reflect the vMotion VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the vMotion VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the vMotion component of the VMware environment, you should use update_cluster to update the Cluster's vmotionVlanId with that new VLAN's OCID.

Returns:

  • (String)


52
53
54
# File 'lib/oci/ocvp/models/network_configuration.rb', line 52

def vmotion_vlan_id
  @vmotion_vlan_id
end

#vsan_vlan_idString

[Required] The OCID of the VLAN used by the Cluster for the vSAN component of the VMware environment.

This attribute is not guaranteed to reflect the vSAN VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the vSAN VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the vSAN component of the VMware environment, you should use update_cluster to update the Cluster's vsanVlanId with that new VLAN's OCID.

Returns:

  • (String)


69
70
71
# File 'lib/oci/ocvp/models/network_configuration.rb', line 69

def vsan_vlan_id
  @vsan_vlan_id
end

#vsphere_vlan_idString

The OCID of the VLAN used by the SDDC for the vSphere component of the VMware environment. This VLAN is a mandatory attribute for Management Cluster.

This attribute is not guaranteed to reflect the vSphere VLAN currently used by the ESXi hosts in the Cluster. The purpose of this attribute is to show the vSphere VLAN that the Oracle Cloud VMware Solution will use for any new ESXi hosts that you add to this Cluster in the future with create_esxi_host.

Therefore, if you change the existing ESXi hosts in the Cluster to use a different VLAN for the vSphere component of the VMware environment, you should use update_sddc to update the Cluster's vsphereVlanId with that new VLAN's OCID.

Returns:

  • (String)


35
36
37
# File 'lib/oci/ocvp/models/network_configuration.rb', line 35

def vsphere_vlan_id
  @vsphere_vlan_id
end

Class Method Details

.attribute_mapObject

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



172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
# File 'lib/oci/ocvp/models/network_configuration.rb', line 172

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'provisioning_subnet_id': :'provisioningSubnetId',
    'vsphere_vlan_id': :'vsphereVlanId',
    'vmotion_vlan_id': :'vmotionVlanId',
    'vsan_vlan_id': :'vsanVlanId',
    'nsx_v_tep_vlan_id': :'nsxVTepVlanId',
    'nsx_edge_v_tep_vlan_id': :'nsxEdgeVTepVlanId',
    'nsx_edge_uplink1_vlan_id': :'nsxEdgeUplink1VlanId',
    'nsx_edge_uplink2_vlan_id': :'nsxEdgeUplink2VlanId',
    'replication_vlan_id': :'replicationVlanId',
    'provisioning_vlan_id': :'provisioningVlanId',
    'hcx_vlan_id': :'hcxVlanId'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
# File 'lib/oci/ocvp/models/network_configuration.rb', line 191

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'provisioning_subnet_id': :'String',
    'vsphere_vlan_id': :'String',
    'vmotion_vlan_id': :'String',
    'vsan_vlan_id': :'String',
    'nsx_v_tep_vlan_id': :'String',
    'nsx_edge_v_tep_vlan_id': :'String',
    'nsx_edge_uplink1_vlan_id': :'String',
    'nsx_edge_uplink2_vlan_id': :'String',
    'replication_vlan_id': :'String',
    'provisioning_vlan_id': :'String',
    'hcx_vlan_id': :'String'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# File 'lib/oci/ocvp/models/network_configuration.rb', line 306

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    provisioning_subnet_id == other.provisioning_subnet_id &&
    vsphere_vlan_id == other.vsphere_vlan_id &&
    vmotion_vlan_id == other.vmotion_vlan_id &&
    vsan_vlan_id == other.vsan_vlan_id &&
    nsx_v_tep_vlan_id == other.nsx_v_tep_vlan_id &&
    nsx_edge_v_tep_vlan_id == other.nsx_edge_v_tep_vlan_id &&
    nsx_edge_uplink1_vlan_id == other.nsx_edge_uplink1_vlan_id &&
    nsx_edge_uplink2_vlan_id == other.nsx_edge_uplink2_vlan_id &&
    replication_vlan_id == other.replication_vlan_id &&
    provisioning_vlan_id == other.provisioning_vlan_id &&
    hcx_vlan_id == other.hcx_vlan_id
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



346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
# File 'lib/oci/ocvp/models/network_configuration.rb', line 346

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)

  self.class.swagger_types.each_pair do |key, type|
    if type =~ /^Array<(.*)>/i
      # check to ensure the input is an array given that the the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        public_method("#{key}=").call(
          attributes[self.class.attribute_map[key]]
            .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
        )
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      public_method("#{key}=").call(
        OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
      )
    end
    # or else data not found in attributes(hash), not an issue as the data can be optional
  end

  self
end

#eql?(other) ⇒ Boolean

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


326
327
328
# File 'lib/oci/ocvp/models/network_configuration.rb', line 326

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



335
336
337
# File 'lib/oci/ocvp/models/network_configuration.rb', line 335

def hash
  [provisioning_subnet_id, vsphere_vlan_id, vmotion_vlan_id, vsan_vlan_id, nsx_v_tep_vlan_id, nsx_edge_v_tep_vlan_id, nsx_edge_uplink1_vlan_id, nsx_edge_uplink2_vlan_id, replication_vlan_id, provisioning_vlan_id, hcx_vlan_id].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



379
380
381
382
383
384
385
386
387
388
# File 'lib/oci/ocvp/models/network_configuration.rb', line 379

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = public_method(attr).call
    next if value.nil? && !instance_variable_defined?("@#{attr}")

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

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



373
374
375
# File 'lib/oci/ocvp/models/network_configuration.rb', line 373

def to_s
  to_hash.to_s
end