Class: OCI::Core::Models::ComputeClusterPlacementConstraintDetails
- Inherits:
-
PlacementConstraintDetails
- Object
- PlacementConstraintDetails
- OCI::Core::Models::ComputeClusterPlacementConstraintDetails
- Defined in:
- lib/oci/core/models/compute_cluster_placement_constraint_details.rb
Overview
The details for providing placement constraints for a compute cluster.
Constant Summary collapse
- LOGICAL_PLACEMENT_CONSTRAINT_ENUM =
[ LOGICAL_PLACEMENT_CONSTRAINT_SINGLE_TIER = 'SINGLE_TIER'.freeze, LOGICAL_PLACEMENT_CONSTRAINT_SINGLE_BLOCK = 'SINGLE_BLOCK'.freeze, LOGICAL_PLACEMENT_CONSTRAINT_PACKED_DISTRIBUTION_MULTI_BLOCK = 'PACKED_DISTRIBUTION_MULTI_BLOCK'.freeze, LOGICAL_PLACEMENT_CONSTRAINT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#hpc_island_id ⇒ String
The OCID of the HPC island for the compute cluster.
-
#logical_placement_constraint ⇒ String
The logical placement strategy to apply.
-
#target_memory_fabric_ids ⇒ Array<String>
The list of target GPU memory fabric OCIDs to constrain placement.
-
#target_network_block_ids ⇒ Array<String>
The list of target network block OCIDs to constrain placement.
Attributes inherited from PlacementConstraintDetails
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 = {}) ⇒ ComputeClusterPlacementConstraintDetails
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.
Methods inherited from PlacementConstraintDetails
Constructor Details
#initialize(attributes = {}) ⇒ ComputeClusterPlacementConstraintDetails
Initializes the object
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 115 116 117 118 119 120 121 122 123 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 90 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'COMPUTE_CLUSTER' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } 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.target_network_block_ids = attributes[:'targetNetworkBlockIds'] if attributes[:'targetNetworkBlockIds'] raise 'You cannot provide both :targetNetworkBlockIds and :target_network_block_ids' if attributes.key?(:'targetNetworkBlockIds') && attributes.key?(:'target_network_block_ids') self.target_network_block_ids = attributes[:'target_network_block_ids'] if attributes[:'target_network_block_ids'] self.target_memory_fabric_ids = attributes[:'targetMemoryFabricIds'] if attributes[:'targetMemoryFabricIds'] raise 'You cannot provide both :targetMemoryFabricIds and :target_memory_fabric_ids' if attributes.key?(:'targetMemoryFabricIds') && attributes.key?(:'target_memory_fabric_ids') self.target_memory_fabric_ids = attributes[:'target_memory_fabric_ids'] if attributes[:'target_memory_fabric_ids'] self.logical_placement_constraint = attributes[:'logicalPlacementConstraint'] if attributes[:'logicalPlacementConstraint'] raise 'You cannot provide both :logicalPlacementConstraint and :logical_placement_constraint' if attributes.key?(:'logicalPlacementConstraint') && attributes.key?(:'logical_placement_constraint') self.logical_placement_constraint = attributes[:'logical_placement_constraint'] if attributes[:'logical_placement_constraint'] end |
Instance Attribute Details
#hpc_island_id ⇒ String
The OCID of the HPC island for the compute cluster.
This field cannot be updated after creation of the compute cluster.
26 27 28 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 26 def hpc_island_id @hpc_island_id end |
#logical_placement_constraint ⇒ String
The logical placement strategy to apply. Allowed values are SINGLE_TIER, SINGLE_BLOCK, and PACKED_DISTRIBUTION_MULTI_BLOCK.
52 53 54 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 52 def logical_placement_constraint @logical_placement_constraint end |
#target_memory_fabric_ids ⇒ Array<String>
The list of target GPU memory fabric OCIDs to constrain placement.
If GMFs are passed in, the hpcIslandId must be set on the compute cluster, and the provided GMFs must belong to that same HPC island.
The ordering of the array will be preserved. Ensure that all items in the array are unique.
46 47 48 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 46 def target_memory_fabric_ids @target_memory_fabric_ids end |
#target_network_block_ids ⇒ Array<String>
The list of target network block OCIDs to constrain placement.
If targetNetworkBlockIds is provided, the hpcIslandId must be set on the compute cluster, and the provided network blocks must belong to that same HPC island.
The ordering of the array will be preserved. Ensure that all items in the array are unique.
36 37 38 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 36 def target_network_block_ids @target_network_block_ids end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
55 56 57 58 59 60 61 62 63 64 65 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 55 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'hpc_island_id': :'hpcIslandId', 'target_network_block_ids': :'targetNetworkBlockIds', 'target_memory_fabric_ids': :'targetMemoryFabricIds', 'logical_placement_constraint': :'logicalPlacementConstraint' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 68 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'hpc_island_id': :'String', 'target_network_block_ids': :'Array<String>', 'target_memory_fabric_ids': :'Array<String>', 'logical_placement_constraint': :'String' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
145 146 147 148 149 150 151 152 153 154 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 145 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && hpc_island_id == other.hpc_island_id && target_network_block_ids == other.target_network_block_ids && target_memory_fabric_ids == other.target_memory_fabric_ids && logical_placement_constraint == other.logical_placement_constraint end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 179 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
159 160 161 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 159 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
168 169 170 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 168 def hash [type, hpc_island_id, target_network_block_ids, target_memory_fabric_ids, logical_placement_constraint].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
212 213 214 215 216 217 218 219 220 221 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 212 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
206 207 208 |
# File 'lib/oci/core/models/compute_cluster_placement_constraint_details.rb', line 206 def to_s to_hash.to_s end |