Class: OCI::Core::Models::AmdRomeBmGpuPlatformConfig
- Inherits:
-
PlatformConfig
- Object
- PlatformConfig
- OCI::Core::Models::AmdRomeBmGpuPlatformConfig
- Defined in:
- lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb
Overview
The platform configuration of a bare metal GPU instance that uses the BM.GPU4.8 shape (the AMD Rome platform).
Constant Summary collapse
- NUMA_NODES_PER_SOCKET_ENUM =
[ NUMA_NODES_PER_SOCKET_NPS0 = 'NPS0'.freeze, NUMA_NODES_PER_SOCKET_NPS1 = 'NPS1'.freeze, NUMA_NODES_PER_SOCKET_NPS2 = 'NPS2'.freeze, NUMA_NODES_PER_SOCKET_NPS4 = 'NPS4'.freeze, NUMA_NODES_PER_SOCKET_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Constants inherited from PlatformConfig
Instance Attribute Summary collapse
-
#are_virtual_instructions_enabled ⇒ BOOLEAN
Whether virtualization instructions are available.
-
#is_access_control_service_enabled ⇒ BOOLEAN
Whether the Access Control Service is enabled on the instance.
-
#is_input_output_memory_management_unit_enabled ⇒ BOOLEAN
Whether the input-output memory management unit is enabled.
-
#is_symmetric_multi_threading_enabled ⇒ BOOLEAN
Whether symmetric multithreading is enabled on the instance.
-
#numa_nodes_per_socket ⇒ String
The number of NUMA nodes per socket (NPS).
Attributes inherited from PlatformConfig
#is_measured_boot_enabled, #is_secure_boot_enabled, #is_trusted_platform_module_enabled, #type
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 = {}) ⇒ AmdRomeBmGpuPlatformConfig
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 PlatformConfig
Constructor Details
#initialize(attributes = {}) ⇒ AmdRomeBmGpuPlatformConfig
Initializes the object
103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 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 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 103 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['type'] = 'AMD_ROME_BM_GPU' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.numa_nodes_per_socket = attributes[:'numaNodesPerSocket'] if attributes[:'numaNodesPerSocket'] self.numa_nodes_per_socket = "NPS4" if numa_nodes_per_socket.nil? && !attributes.key?(:'numaNodesPerSocket') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :numaNodesPerSocket and :numa_nodes_per_socket' if attributes.key?(:'numaNodesPerSocket') && attributes.key?(:'numa_nodes_per_socket') self.numa_nodes_per_socket = attributes[:'numa_nodes_per_socket'] if attributes[:'numa_nodes_per_socket'] self.numa_nodes_per_socket = "NPS4" if numa_nodes_per_socket.nil? && !attributes.key?(:'numaNodesPerSocket') && !attributes.key?(:'numa_nodes_per_socket') # rubocop:disable Style/StringLiterals self.is_symmetric_multi_threading_enabled = attributes[:'isSymmetricMultiThreadingEnabled'] unless attributes[:'isSymmetricMultiThreadingEnabled'].nil? self.is_symmetric_multi_threading_enabled = true if is_symmetric_multi_threading_enabled.nil? && !attributes.key?(:'isSymmetricMultiThreadingEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isSymmetricMultiThreadingEnabled and :is_symmetric_multi_threading_enabled' if attributes.key?(:'isSymmetricMultiThreadingEnabled') && attributes.key?(:'is_symmetric_multi_threading_enabled') self.is_symmetric_multi_threading_enabled = attributes[:'is_symmetric_multi_threading_enabled'] unless attributes[:'is_symmetric_multi_threading_enabled'].nil? self.is_symmetric_multi_threading_enabled = true if is_symmetric_multi_threading_enabled.nil? && !attributes.key?(:'isSymmetricMultiThreadingEnabled') && !attributes.key?(:'is_symmetric_multi_threading_enabled') # rubocop:disable Style/StringLiterals self.is_access_control_service_enabled = attributes[:'isAccessControlServiceEnabled'] unless attributes[:'isAccessControlServiceEnabled'].nil? self.is_access_control_service_enabled = false if is_access_control_service_enabled.nil? && !attributes.key?(:'isAccessControlServiceEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isAccessControlServiceEnabled and :is_access_control_service_enabled' if attributes.key?(:'isAccessControlServiceEnabled') && attributes.key?(:'is_access_control_service_enabled') self.is_access_control_service_enabled = attributes[:'is_access_control_service_enabled'] unless attributes[:'is_access_control_service_enabled'].nil? self.is_access_control_service_enabled = false if is_access_control_service_enabled.nil? && !attributes.key?(:'isAccessControlServiceEnabled') && !attributes.key?(:'is_access_control_service_enabled') # rubocop:disable Style/StringLiterals self.are_virtual_instructions_enabled = attributes[:'areVirtualInstructionsEnabled'] unless attributes[:'areVirtualInstructionsEnabled'].nil? self.are_virtual_instructions_enabled = false if are_virtual_instructions_enabled.nil? && !attributes.key?(:'areVirtualInstructionsEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :areVirtualInstructionsEnabled and :are_virtual_instructions_enabled' if attributes.key?(:'areVirtualInstructionsEnabled') && attributes.key?(:'are_virtual_instructions_enabled') self.are_virtual_instructions_enabled = attributes[:'are_virtual_instructions_enabled'] unless attributes[:'are_virtual_instructions_enabled'].nil? self.are_virtual_instructions_enabled = false if are_virtual_instructions_enabled.nil? && !attributes.key?(:'areVirtualInstructionsEnabled') && !attributes.key?(:'are_virtual_instructions_enabled') # rubocop:disable Style/StringLiterals self.is_input_output_memory_management_unit_enabled = attributes[:'isInputOutputMemoryManagementUnitEnabled'] unless attributes[:'isInputOutputMemoryManagementUnitEnabled'].nil? self.is_input_output_memory_management_unit_enabled = false if is_input_output_memory_management_unit_enabled.nil? && !attributes.key?(:'isInputOutputMemoryManagementUnitEnabled') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :isInputOutputMemoryManagementUnitEnabled and :is_input_output_memory_management_unit_enabled' if attributes.key?(:'isInputOutputMemoryManagementUnitEnabled') && attributes.key?(:'is_input_output_memory_management_unit_enabled') self.is_input_output_memory_management_unit_enabled = attributes[:'is_input_output_memory_management_unit_enabled'] unless attributes[:'is_input_output_memory_management_unit_enabled'].nil? self.is_input_output_memory_management_unit_enabled = false if is_input_output_memory_management_unit_enabled.nil? && !attributes.key?(:'isInputOutputMemoryManagementUnitEnabled') && !attributes.key?(:'is_input_output_memory_management_unit_enabled') # rubocop:disable Style/StringLiterals end |
Instance Attribute Details
#are_virtual_instructions_enabled ⇒ BOOLEAN
Whether virtualization instructions are available. For example, Secure Virtual Machine for AMD shapes or VT-x for Intel shapes.
48 49 50 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 48 def are_virtual_instructions_enabled @are_virtual_instructions_enabled end |
#is_access_control_service_enabled ⇒ BOOLEAN
Whether the Access Control Service is enabled on the instance. When enabled, the platform can enforce PCIe device isolation, required for VFIO device pass-through.
42 43 44 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 42 def is_access_control_service_enabled @is_access_control_service_enabled end |
#is_input_output_memory_management_unit_enabled ⇒ BOOLEAN
Whether the input-output memory management unit is enabled.
53 54 55 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 53 def is_input_output_memory_management_unit_enabled @is_input_output_memory_management_unit_enabled end |
#is_symmetric_multi_threading_enabled ⇒ BOOLEAN
Whether symmetric multithreading is enabled on the instance. Symmetric multithreading is also called simultaneous multithreading (SMT) or Intel Hyper-Threading.
Intel and AMD processors have two hardware execution threads per core (OCPU). SMT permits multiple independent threads of execution, to better use the resources and increase the efficiency of the CPU. When multithreading is disabled, only one thread is permitted to run on each core, which can provide higher or more predictable performance for some workloads.
36 37 38 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 36 def is_symmetric_multi_threading_enabled @is_symmetric_multi_threading_enabled end |
#numa_nodes_per_socket ⇒ String
The number of NUMA nodes per socket (NPS).
25 26 27 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 25 def numa_nodes_per_socket @numa_nodes_per_socket end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 56 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'type': :'type', 'is_secure_boot_enabled': :'isSecureBootEnabled', 'is_trusted_platform_module_enabled': :'isTrustedPlatformModuleEnabled', 'is_measured_boot_enabled': :'isMeasuredBootEnabled', 'numa_nodes_per_socket': :'numaNodesPerSocket', 'is_symmetric_multi_threading_enabled': :'isSymmetricMultiThreadingEnabled', 'is_access_control_service_enabled': :'isAccessControlServiceEnabled', 'are_virtual_instructions_enabled': :'areVirtualInstructionsEnabled', 'is_input_output_memory_management_unit_enabled': :'isInputOutputMemoryManagementUnitEnabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 73 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'type': :'String', 'is_secure_boot_enabled': :'BOOLEAN', 'is_trusted_platform_module_enabled': :'BOOLEAN', 'is_measured_boot_enabled': :'BOOLEAN', 'numa_nodes_per_socket': :'String', 'is_symmetric_multi_threading_enabled': :'BOOLEAN', 'is_access_control_service_enabled': :'BOOLEAN', 'are_virtual_instructions_enabled': :'BOOLEAN', 'is_input_output_memory_management_unit_enabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 174 def ==(other) return true if equal?(other) self.class == other.class && type == other.type && is_secure_boot_enabled == other.is_secure_boot_enabled && is_trusted_platform_module_enabled == other.is_trusted_platform_module_enabled && is_measured_boot_enabled == other.is_measured_boot_enabled && numa_nodes_per_socket == other.numa_nodes_per_socket && is_symmetric_multi_threading_enabled == other.is_symmetric_multi_threading_enabled && is_access_control_service_enabled == other.is_access_control_service_enabled && are_virtual_instructions_enabled == other.are_virtual_instructions_enabled && is_input_output_memory_management_unit_enabled == other.is_input_output_memory_management_unit_enabled end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 212 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
192 193 194 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 192 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
201 202 203 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 201 def hash [type, is_secure_boot_enabled, is_trusted_platform_module_enabled, is_measured_boot_enabled, numa_nodes_per_socket, is_symmetric_multi_threading_enabled, is_access_control_service_enabled, are_virtual_instructions_enabled, is_input_output_memory_management_unit_enabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
245 246 247 248 249 250 251 252 253 254 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 245 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
239 240 241 |
# File 'lib/oci/core/models/amd_rome_bm_gpu_platform_config.rb', line 239 def to_s to_hash.to_s end |