Class: OCI::Core::Models::ComputeHostSummary
- Inherits:
-
Object
- Object
- OCI::Core::Models::ComputeHostSummary
- Defined in:
- lib/oci/core/models/compute_host_summary.rb
Overview
Summary information for a compute host.
Instance Attribute Summary collapse
-
#availability_domain ⇒ String
[Required] The availability domain of the compute host.
-
#capacity_reservation_id ⇒ String
The OCID for the Capacity Reserver that is currently on host.
-
#compartment_id ⇒ String
[Required] The OCID for the compartment.
-
#compute_host_group_id ⇒ String
The OCID for the Customer-unique host group.
-
#defined_tags ⇒ Hash<String, Hash<String, Object>>
Defined tags for this resource.
-
#display_name ⇒ String
A user-friendly name.
-
#fault_domain ⇒ String
[Required] A fault domain is a grouping of hardware and infrastructure within an availability domain.
-
#freeform_tags ⇒ Hash<String, String>
Free-form tags for this resource.
-
#gpu_memory_fabric_id ⇒ String
The OCID for Customer-unique GPU Memory Fabric.
-
#has_impacted_components ⇒ BOOLEAN
[Required] While listing a host the user will know if they have an impacted component or not.
-
#health ⇒ String
[Required] The heathy state of the host.
-
#hpc_island_id ⇒ String
The OCID for Customer-unique HPC Island.
-
#id ⇒ String
[Required] The OCID for the Customer-unique host.
-
#instance_id ⇒ String
The public OCID for the Virtual Machine or Bare Metal instance.
-
#lifecycle_state ⇒ String
[Required] The lifecycle state of the host.
-
#local_block_id ⇒ String
The OCID for Customer-unique Local Block.
-
#network_block_id ⇒ String
The OCID for Customer-unique Network Block.
- #recycle_details ⇒ OCI::Core::Models::RecycleDetails
-
#shape ⇒ String
[Required] The shape of host.
-
#time_created ⇒ DateTime
[Required] The date and time that the compute host record was created, in the format defined by [RFC3339](tools .ietf.org/html/rfc3339).
-
#time_updated ⇒ DateTime
[Required] The date and time that the compute host record was updated, in the format defined by RFC3339.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ComputeHostSummary
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ComputeHostSummary
Initializes the object
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 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 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 222 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.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.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. = attributes[:'definedTags'] if attributes[:'definedTags'] raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags') self. = 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. = attributes[:'freeformTags'] if attributes[:'freeformTags'] raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags') self. = attributes[:'freeform_tags'] if attributes[:'freeform_tags'] end |
Instance Attribute Details
#availability_domain ⇒ String
[Required] The availability domain of the compute host.
Example: Uocm:US-CHICAGO-1-AD-2
17 18 19 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 17 def availability_domain @availability_domain end |
#capacity_reservation_id ⇒ String
The OCID for the Capacity Reserver that is currently on host
92 93 94 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 92 def capacity_reservation_id @capacity_reservation_id end |
#compartment_id ⇒ String
[Required] The OCID for the compartment. This should always be the root compartment.
23 24 25 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 23 def compartment_id @compartment_id end |
#compute_host_group_id ⇒ String
The OCID for the Customer-unique host group
49 50 51 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 49 def compute_host_group_id @compute_host_group_id end |
#defined_tags ⇒ Hash<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\"}}
121 122 123 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 121 def @defined_tags end |
#display_name ⇒ String
A user-friendly name. Does not have to be unique, and it's changeable. Avoid entering confidential information.
127 128 129 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 127 def display_name @display_name end |
#fault_domain ⇒ String
[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
39 40 41 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 39 def fault_domain @fault_domain end |
#freeform_tags ⇒ Hash<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\"}
135 136 137 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 135 def @freeform_tags end |
#gpu_memory_fabric_id ⇒ String
The OCID for Customer-unique GPU Memory Fabric
67 68 69 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 67 def gpu_memory_fabric_id @gpu_memory_fabric_id end |
#has_impacted_components ⇒ BOOLEAN
[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.
98 99 100 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 98 def has_impacted_components @has_impacted_components end |
#health ⇒ String
[Required] The heathy state of the host
82 83 84 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 82 def health @health end |
#hpc_island_id ⇒ String
The OCID for Customer-unique HPC Island
44 45 46 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 44 def hpc_island_id @hpc_island_id end |
#id ⇒ String
[Required] The OCID for the Customer-unique host
28 29 30 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 28 def id @id end |
#instance_id ⇒ String
The public OCID for the Virtual Machine or Bare Metal instance
72 73 74 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 72 def instance_id @instance_id end |
#lifecycle_state ⇒ String
[Required] The lifecycle state of the host
87 88 89 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 87 def lifecycle_state @lifecycle_state end |
#local_block_id ⇒ String
The OCID for Customer-unique Local Block
62 63 64 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 62 def local_block_id @local_block_id end |
#network_block_id ⇒ String
The OCID for Customer-unique Network Block
57 58 59 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 57 def network_block_id @network_block_id end |
#recycle_details ⇒ OCI::Core::Models::RecycleDetails
52 53 54 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 52 def recycle_details @recycle_details end |
#shape ⇒ String
[Required] The shape of host
77 78 79 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 77 def shape @shape end |
#time_created ⇒ DateTime
[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
106 107 108 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 106 def time_created @time_created end |
#time_updated ⇒ DateTime
[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
113 114 115 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 113 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 138 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'availabilityDomain', 'compartment_id': :'compartmentId', 'id': :'id', 'fault_domain': :'faultDomain', 'hpc_island_id': :'hpcIslandId', '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', '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_types ⇒ Object
Attribute type mapping.
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 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 167 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'availability_domain': :'String', 'compartment_id': :'String', 'id': :'String', 'fault_domain': :'String', 'hpc_island_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', '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.
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 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 350 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 && 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 && 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 && == other. && display_name == other.display_name && == other. end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 400 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
380 381 382 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 380 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
389 390 391 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 389 def hash [availability_domain, compartment_id, id, fault_domain, hpc_island_id, compute_host_group_id, recycle_details, network_block_id, local_block_id, gpu_memory_fabric_id, instance_id, shape, health, lifecycle_state, capacity_reservation_id, has_impacted_components, time_created, time_updated, , display_name, ].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
433 434 435 436 437 438 439 440 441 442 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 433 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_s ⇒ String
Returns the string representation of the object
427 428 429 |
# File 'lib/oci/core/models/compute_host_summary.rb', line 427 def to_s to_hash.to_s end |