Class: OCI::Core::Models::ComputeHostSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/core/models/compute_host_summary.rb

Overview

Summary information for a compute host.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ComputeHostSummary

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :availability_domain (String)

    The value to assign to the #availability_domain property

  • :compartment_id (String)

    The value to assign to the #compartment_id property

  • :id (String)

    The value to assign to the #id property

  • :fault_domain (String)

    The value to assign to the #fault_domain property

  • :hpc_island_id (String)

    The value to assign to the #hpc_island_id property

  • :host_correlation_id (String)

    The value to assign to the #host_correlation_id property

  • :compute_host_group_id (String)

    The value to assign to the #compute_host_group_id property

  • :recycle_details (OCI::Core::Models::RecycleDetails)

    The value to assign to the #recycle_details property

  • :network_block_id (String)

    The value to assign to the #network_block_id property

  • :local_block_id (String)

    The value to assign to the #local_block_id property

  • :gpu_memory_fabric_id (String)

    The value to assign to the #gpu_memory_fabric_id property

  • :instance_id (String)

    The value to assign to the #instance_id property

  • :shape (String)

    The value to assign to the #shape property

  • :platform (String)

    The value to assign to the #platform property

  • :health (String)

    The value to assign to the #health property

  • :lifecycle_state (String)

    The value to assign to the #lifecycle_state property

  • :capacity_reservation_id (String)

    The value to assign to the #capacity_reservation_id property

  • :has_impacted_components (BOOLEAN)

    The value to assign to the #has_impacted_components property

  • :time_created (DateTime)

    The value to assign to the #time_created property

  • :time_updated (DateTime)

    The value to assign to the #time_updated property

  • :defined_tags (Hash<String, Hash<String, Object>>)

    The value to assign to the #defined_tags property

  • :display_name (String)

    The value to assign to the #display_name property

  • :freeform_tags (Hash<String, String>)

    The value to assign to the #freeform_tags property



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
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
356
357
358
359
360
361
362
363
364
365
# File 'lib/oci/core/models/compute_host_summary.rb', line 238

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.availability_domain = attributes[:'availabilityDomain'] if attributes[:'availabilityDomain']

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

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

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

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

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

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

  self.fault_domain = attributes[:'faultDomain'] if attributes[:'faultDomain']

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

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

  self.hpc_island_id = attributes[:'hpcIslandId'] if attributes[:'hpcIslandId']

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

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

  self.host_correlation_id = attributes[:'hostCorrelationId'] if attributes[:'hostCorrelationId']

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

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

  self.compute_host_group_id = attributes[:'computeHostGroupId'] if attributes[:'computeHostGroupId']

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

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

  self.recycle_details = attributes[:'recycleDetails'] if attributes[:'recycleDetails']

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

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

  self.network_block_id = attributes[:'networkBlockId'] if attributes[:'networkBlockId']

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

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

  self.local_block_id = attributes[:'localBlockId'] if attributes[:'localBlockId']

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

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

  self.gpu_memory_fabric_id = attributes[:'gpuMemoryFabricId'] if attributes[:'gpuMemoryFabricId']

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

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

  self.instance_id = attributes[:'instanceId'] if attributes[:'instanceId']

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

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

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

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

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

  self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']

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

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

  self.capacity_reservation_id = attributes[:'capacityReservationId'] if attributes[:'capacityReservationId']

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

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

  self.has_impacted_components = attributes[:'hasImpactedComponents'] unless attributes[:'hasImpactedComponents'].nil?

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

  self.has_impacted_components = attributes[:'has_impacted_components'] unless attributes[:'has_impacted_components'].nil?

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

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

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

  self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.display_name = attributes[:'displayName'] if attributes[:'displayName']

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

Instance Attribute Details

#availability_domainString

[Required] The availability domain of the compute host.

Example: Uocm:US-CHICAGO-1-AD-2

Returns:

  • (String)


17
18
19
# File 'lib/oci/core/models/compute_host_summary.rb', line 17

def availability_domain
  @availability_domain
end

#capacity_reservation_idString

The OCID for the Capacity Reserver that is currently on host

Returns:

  • (String)


102
103
104
# File 'lib/oci/core/models/compute_host_summary.rb', line 102

def capacity_reservation_id
  @capacity_reservation_id
end

#compartment_idString

[Required] The OCID for the compartment. This should always be the root compartment.

Returns:

  • (String)


23
24
25
# File 'lib/oci/core/models/compute_host_summary.rb', line 23

def compartment_id
  @compartment_id
end

#compute_host_group_idString

The OCID for the Customer-unique host group

Returns:

  • (String)


54
55
56
# File 'lib/oci/core/models/compute_host_summary.rb', line 54

def compute_host_group_id
  @compute_host_group_id
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags.

Example: {\"Operations\": {\"CostCenter\": \"42\"}}

Returns:

  • (Hash<String, Hash<String, Object>>)


131
132
133
# File 'lib/oci/core/models/compute_host_summary.rb', line 131

def defined_tags
  @defined_tags
end

#display_nameString

A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.

Returns:

  • (String)


137
138
139
# File 'lib/oci/core/models/compute_host_summary.rb', line 137

def display_name
  @display_name
end

#fault_domainString

[Required] A fault domain is a grouping of hardware and infrastructure within an availability domain. Each availability domain contains three fault domains. Fault domains let you distribute your instances so that they are not on the same physical hardware within a single availability domain. A hardware failure or Compute hardware maintenance that affects one fault domain does not affect instances in other fault domains.

This field is the Fault domain of the host

Returns:

  • (String)


39
40
41
# File 'lib/oci/core/models/compute_host_summary.rb', line 39

def fault_domain
  @fault_domain
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags.

Example: {\"Department\": \"Finance\"}

Returns:

  • (Hash<String, String>)


145
146
147
# File 'lib/oci/core/models/compute_host_summary.rb', line 145

def freeform_tags
  @freeform_tags
end

#gpu_memory_fabric_idString

The OCID for Customer-unique GPU Memory Fabric

Returns:

  • (String)


72
73
74
# File 'lib/oci/core/models/compute_host_summary.rb', line 72

def gpu_memory_fabric_id
  @gpu_memory_fabric_id
end

#has_impacted_componentsBOOLEAN

[Required] While listing a host the user will know if they have an impacted component or not. The user will have to issue a get host to see details.

Returns:

  • (BOOLEAN)


108
109
110
# File 'lib/oci/core/models/compute_host_summary.rb', line 108

def has_impacted_components
  @has_impacted_components
end

#healthString

[Required] The heathy state of the host

Returns:

  • (String)


92
93
94
# File 'lib/oci/core/models/compute_host_summary.rb', line 92

def health
  @health
end

#host_correlation_idString

The ID that remains consistent when a host moves between capacity pools within the same tenancy.

Returns:

  • (String)


49
50
51
# File 'lib/oci/core/models/compute_host_summary.rb', line 49

def host_correlation_id
  @host_correlation_id
end

#hpc_island_idString

The OCID for Customer-unique HPC Island

Returns:

  • (String)


44
45
46
# File 'lib/oci/core/models/compute_host_summary.rb', line 44

def hpc_island_id
  @hpc_island_id
end

#idString

[Required] The OCID for the Customer-unique host

Returns:

  • (String)


28
29
30
# File 'lib/oci/core/models/compute_host_summary.rb', line 28

def id
  @id
end

#instance_idString

The public OCID for the Virtual Machine or Bare Metal instance

Returns:

  • (String)


77
78
79
# File 'lib/oci/core/models/compute_host_summary.rb', line 77

def instance_id
  @instance_id
end

#lifecycle_stateString

[Required] The lifecycle state of the host

Returns:

  • (String)


97
98
99
# File 'lib/oci/core/models/compute_host_summary.rb', line 97

def lifecycle_state
  @lifecycle_state
end

#local_block_idString

The OCID for Customer-unique Local Block

Returns:

  • (String)


67
68
69
# File 'lib/oci/core/models/compute_host_summary.rb', line 67

def local_block_id
  @local_block_id
end

#network_block_idString

The OCID for Customer-unique Network Block

Returns:

  • (String)


62
63
64
# File 'lib/oci/core/models/compute_host_summary.rb', line 62

def network_block_id
  @network_block_id
end

#platformString

The platform of the host

Returns:

  • (String)


87
88
89
# File 'lib/oci/core/models/compute_host_summary.rb', line 87

def platform
  @platform
end

#recycle_detailsOCI::Core::Models::RecycleDetails



57
58
59
# File 'lib/oci/core/models/compute_host_summary.rb', line 57

def recycle_details
  @recycle_details
end

#shapeString

[Required] The shape of host

Returns:

  • (String)


82
83
84
# File 'lib/oci/core/models/compute_host_summary.rb', line 82

def shape
  @shape
end

#time_createdDateTime

[Required] The date and time that the compute host record was created, in the format defined by [RFC3339](tools .ietf.org/html/rfc3339).

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


116
117
118
# File 'lib/oci/core/models/compute_host_summary.rb', line 116

def time_created
  @time_created
end

#time_updatedDateTime

[Required] The date and time that the compute host record was updated, in the format defined by RFC3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


123
124
125
# File 'lib/oci/core/models/compute_host_summary.rb', line 123

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
# File 'lib/oci/core/models/compute_host_summary.rb', line 148

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'availabilityDomain',
    'compartment_id': :'compartmentId',
    'id': :'id',
    'fault_domain': :'faultDomain',
    'hpc_island_id': :'hpcIslandId',
    'host_correlation_id': :'hostCorrelationId',
    'compute_host_group_id': :'computeHostGroupId',
    'recycle_details': :'recycleDetails',
    'network_block_id': :'networkBlockId',
    'local_block_id': :'localBlockId',
    'gpu_memory_fabric_id': :'gpuMemoryFabricId',
    'instance_id': :'instanceId',
    'shape': :'shape',
    'platform': :'platform',
    'health': :'health',
    'lifecycle_state': :'lifecycleState',
    'capacity_reservation_id': :'capacityReservationId',
    'has_impacted_components': :'hasImpactedComponents',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'defined_tags': :'definedTags',
    'display_name': :'displayName',
    'freeform_tags': :'freeformTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/core/models/compute_host_summary.rb', line 179

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'availability_domain': :'String',
    'compartment_id': :'String',
    'id': :'String',
    'fault_domain': :'String',
    'hpc_island_id': :'String',
    'host_correlation_id': :'String',
    'compute_host_group_id': :'String',
    'recycle_details': :'OCI::Core::Models::RecycleDetails',
    'network_block_id': :'String',
    'local_block_id': :'String',
    'gpu_memory_fabric_id': :'String',
    'instance_id': :'String',
    'shape': :'String',
    'platform': :'String',
    'health': :'String',
    'lifecycle_state': :'String',
    'capacity_reservation_id': :'String',
    'has_impacted_components': :'BOOLEAN',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'display_name': :'String',
    'freeform_tags': :'Hash<String, 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



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
# File 'lib/oci/core/models/compute_host_summary.rb', line 374

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

  self.class == other.class &&
    availability_domain == other.availability_domain &&
    compartment_id == other.compartment_id &&
    id == other.id &&
    fault_domain == other.fault_domain &&
    hpc_island_id == other.hpc_island_id &&
    host_correlation_id == other.host_correlation_id &&
    compute_host_group_id == other.compute_host_group_id &&
    recycle_details == other.recycle_details &&
    network_block_id == other.network_block_id &&
    local_block_id == other.local_block_id &&
    gpu_memory_fabric_id == other.gpu_memory_fabric_id &&
    instance_id == other.instance_id &&
    shape == other.shape &&
    platform == other.platform &&
    health == other.health &&
    lifecycle_state == other.lifecycle_state &&
    capacity_reservation_id == other.capacity_reservation_id &&
    has_impacted_components == other.has_impacted_components &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    defined_tags == other.defined_tags &&
    display_name == other.display_name &&
    freeform_tags == other.freeform_tags
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



426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
# File 'lib/oci/core/models/compute_host_summary.rb', line 426

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


406
407
408
# File 'lib/oci/core/models/compute_host_summary.rb', line 406

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



415
416
417
# File 'lib/oci/core/models/compute_host_summary.rb', line 415

def hash
  [availability_domain, compartment_id, id, fault_domain, hpc_island_id, host_correlation_id, compute_host_group_id, recycle_details, network_block_id, local_block_id, gpu_memory_fabric_id, instance_id, shape, platform, health, lifecycle_state, capacity_reservation_id, has_impacted_components, time_created, time_updated, defined_tags, display_name, freeform_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



459
460
461
462
463
464
465
466
467
468
# File 'lib/oci/core/models/compute_host_summary.rb', line 459

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



453
454
455
# File 'lib/oci/core/models/compute_host_summary.rb', line 453

def to_s
  to_hash.to_s
end