Class: OCI::Core::Models::IntelIcelakeBmPlatformConfig

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

Overview

The platform configuration of a bare metal instance that uses the BM.Standard3.64 shape or the BM.Optimized3.36 shape (the Intel Ice Lake platform).

Constant Summary collapse

NUMA_NODES_PER_SOCKET_ENUM =
[
  NUMA_NODES_PER_SOCKET_NPS1 = 'NPS1'.freeze,
  NUMA_NODES_PER_SOCKET_NPS2 = 'NPS2'.freeze,
  NUMA_NODES_PER_SOCKET_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Constants inherited from PlatformConfig

PlatformConfig::TYPE_ENUM

Instance Attribute Summary collapse

Attributes inherited from PlatformConfig

#is_measured_boot_enabled, #is_secure_boot_enabled, #is_trusted_platform_module_enabled, #type

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from PlatformConfig

get_subtype

Constructor Details

#initialize(attributes = {}) ⇒ IntelIcelakeBmPlatformConfig

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 97

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

  attributes['type'] = 'INTEL_ICELAKE_BM'

  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 = "NPS1" 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 = "NPS1" 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_input_output_memory_management_unit_enabled = attributes[:'isInputOutputMemoryManagementUnitEnabled'] unless attributes[:'isInputOutputMemoryManagementUnitEnabled'].nil?
  self.is_input_output_memory_management_unit_enabled = true 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 = true 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

  self.percentage_of_cores_enabled = attributes[:'percentageOfCoresEnabled'] if attributes[:'percentageOfCoresEnabled']

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

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

Instance Attribute Details

#is_input_output_memory_management_unit_enabledBOOLEAN

Whether the input-output memory management unit is enabled.

Returns:

  • (BOOLEAN)


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

def is_input_output_memory_management_unit_enabled
  @is_input_output_memory_management_unit_enabled
end

#is_symmetric_multi_threading_enabledBOOLEAN

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.

Returns:

  • (BOOLEAN)


34
35
36
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 34

def is_symmetric_multi_threading_enabled
  @is_symmetric_multi_threading_enabled
end

#numa_nodes_per_socketString

The number of NUMA nodes per socket (NPS).

Returns:

  • (String)


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

def numa_nodes_per_socket
  @numa_nodes_per_socket
end

#percentage_of_cores_enabledInteger

The percentage of cores enabled. Value must be a multiple of 25%. If the requested percentage results in a fractional number of cores, the system rounds up the number of cores across processors and provisions an instance with a whole number of cores.

If the applications that you run on the instance use a core-based licensing model and need fewer cores than the full size of the shape, you can disable cores to reduce your licensing costs. The instance itself is billed for the full shape, regardless of whether all cores are enabled.

Returns:

  • (Integer)


50
51
52
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 50

def percentage_of_cores_enabled
  @percentage_of_cores_enabled
end

Class Method Details

.attribute_mapObject

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



53
54
55
56
57
58
59
60
61
62
63
64
65
66
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 53

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_input_output_memory_management_unit_enabled': :'isInputOutputMemoryManagementUnitEnabled',
    'percentage_of_cores_enabled': :'percentageOfCoresEnabled'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 69

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_input_output_memory_management_unit_enabled': :'BOOLEAN',
    'percentage_of_cores_enabled': :'Integer'
    # 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



158
159
160
161
162
163
164
165
166
167
168
169
170
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 158

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_input_output_memory_management_unit_enabled == other.is_input_output_memory_management_unit_enabled &&
    percentage_of_cores_enabled == other.percentage_of_cores_enabled
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



195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 195

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


175
176
177
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 175

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



184
185
186
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 184

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_input_output_memory_management_unit_enabled, percentage_of_cores_enabled].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



228
229
230
231
232
233
234
235
236
237
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 228

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



222
223
224
# File 'lib/oci/core/models/intel_icelake_bm_platform_config.rb', line 222

def to_s
  to_hash.to_s
end