Class: OCI::Core::Models::InstanceConfigurationLaunchOptions
- Inherits:
-
Object
- Object
- OCI::Core::Models::InstanceConfigurationLaunchOptions
- Defined in:
- lib/oci/core/models/instance_configuration_launch_options.rb
Overview
Options for tuning the compatibility and performance of VM shapes. The values that you specify override any default values.
Constant Summary collapse
- BOOT_VOLUME_TYPE_ENUM =
[ BOOT_VOLUME_TYPE_ISCSI = 'ISCSI'.freeze, BOOT_VOLUME_TYPE_SCSI = 'SCSI'.freeze, BOOT_VOLUME_TYPE_IDE = 'IDE'.freeze, BOOT_VOLUME_TYPE_VFIO = 'VFIO'.freeze, BOOT_VOLUME_TYPE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'.freeze, BOOT_VOLUME_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- FIRMWARE_ENUM =
[ FIRMWARE_BIOS = 'BIOS'.freeze, FIRMWARE_UEFI_64 = 'UEFI_64'.freeze, FIRMWARE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- NETWORK_TYPE_ENUM =
[ NETWORK_TYPE_E1000 = 'E1000'.freeze, NETWORK_TYPE_VFIO = 'VFIO'.freeze, NETWORK_TYPE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'.freeze, NETWORK_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- REMOTE_DATA_VOLUME_TYPE_ENUM =
[ REMOTE_DATA_VOLUME_TYPE_ISCSI = 'ISCSI'.freeze, REMOTE_DATA_VOLUME_TYPE_SCSI = 'SCSI'.freeze, REMOTE_DATA_VOLUME_TYPE_IDE = 'IDE'.freeze, REMOTE_DATA_VOLUME_TYPE_VFIO = 'VFIO'.freeze, REMOTE_DATA_VOLUME_TYPE_PARAVIRTUALIZED = 'PARAVIRTUALIZED'.freeze, REMOTE_DATA_VOLUME_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#boot_volume_type ⇒ String
Emulation type for the boot volume.
-
#firmware ⇒ String
Firmware used to boot VM.
-
#is_consistent_volume_naming_enabled ⇒ BOOLEAN
Whether to enable consistent volume naming feature.
-
#is_pv_encryption_in_transit_enabled ⇒ BOOLEAN
Deprecated.
-
#network_type ⇒ String
Emulation type for the physical network interface card (NIC).
-
#remote_data_volume_type ⇒ String
Emulation type for volume.
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 = {}) ⇒ InstanceConfigurationLaunchOptions
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 = {}) ⇒ InstanceConfigurationLaunchOptions
Initializes the object
136 137 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 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 136 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.boot_volume_type = attributes[:'bootVolumeType'] if attributes[:'bootVolumeType'] raise 'You cannot provide both :bootVolumeType and :boot_volume_type' if attributes.key?(:'bootVolumeType') && attributes.key?(:'boot_volume_type') self.boot_volume_type = attributes[:'boot_volume_type'] if attributes[:'boot_volume_type'] self.firmware = attributes[:'firmware'] if attributes[:'firmware'] self.network_type = attributes[:'networkType'] if attributes[:'networkType'] raise 'You cannot provide both :networkType and :network_type' if attributes.key?(:'networkType') && attributes.key?(:'network_type') self.network_type = attributes[:'network_type'] if attributes[:'network_type'] self.remote_data_volume_type = attributes[:'remoteDataVolumeType'] if attributes[:'remoteDataVolumeType'] raise 'You cannot provide both :remoteDataVolumeType and :remote_data_volume_type' if attributes.key?(:'remoteDataVolumeType') && attributes.key?(:'remote_data_volume_type') self.remote_data_volume_type = attributes[:'remote_data_volume_type'] if attributes[:'remote_data_volume_type'] self.is_pv_encryption_in_transit_enabled = attributes[:'isPvEncryptionInTransitEnabled'] unless attributes[:'isPvEncryptionInTransitEnabled'].nil? raise 'You cannot provide both :isPvEncryptionInTransitEnabled and :is_pv_encryption_in_transit_enabled' if attributes.key?(:'isPvEncryptionInTransitEnabled') && attributes.key?(:'is_pv_encryption_in_transit_enabled') self.is_pv_encryption_in_transit_enabled = attributes[:'is_pv_encryption_in_transit_enabled'] unless attributes[:'is_pv_encryption_in_transit_enabled'].nil? self.is_consistent_volume_naming_enabled = attributes[:'isConsistentVolumeNamingEnabled'] unless attributes[:'isConsistentVolumeNamingEnabled'].nil? raise 'You cannot provide both :isConsistentVolumeNamingEnabled and :is_consistent_volume_naming_enabled' if attributes.key?(:'isConsistentVolumeNamingEnabled') && attributes.key?(:'is_consistent_volume_naming_enabled') self.is_consistent_volume_naming_enabled = attributes[:'is_consistent_volume_naming_enabled'] unless attributes[:'is_consistent_volume_naming_enabled'].nil? end |
Instance Attribute Details
#boot_volume_type ⇒ String
Emulation type for the boot volume.
-
ISCSI- ISCSI attached block storage device. -
SCSI- Emulated SCSI disk. -
IDE- Emulated IDE disk. -
VFIO- Direct attached Virtual Function storage. This is the default option for local data
volumes on Oracle provided images.
-
PARAVIRTUALIZED- Paravirtualized disk. This is the default for boot volumes and remote block
storage volumes on Oracle-provided images.
54 55 56 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 54 def boot_volume_type @boot_volume_type end |
#firmware ⇒ String
Firmware used to boot VM. Select the option that matches your operating system.
-
BIOS- Boot VM using BIOS style firmware. This is compatible with both 32 bit and 64 bit operating
systems that boot using MBR style bootloaders.
-
UEFI_64- Boot VM using UEFI style firmware compatible with 64 bit operating systems. This is the
default for Oracle-provided images.
63 64 65 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 63 def firmware @firmware end |
#is_consistent_volume_naming_enabled ⇒ BOOLEAN
Whether to enable consistent volume naming feature. Defaults to false.
94 95 96 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 94 def is_consistent_volume_naming_enabled @is_consistent_volume_naming_enabled end |
#is_pv_encryption_in_transit_enabled ⇒ BOOLEAN
Deprecated. Instead use isPvEncryptionInTransitEnabled in instance_configuration_launch_instance_details.
90 91 92 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 90 def is_pv_encryption_in_transit_enabled @is_pv_encryption_in_transit_enabled end |
#network_type ⇒ String
Emulation type for the physical network interface card (NIC).
-
E1000- Emulated Gigabit ethernet controller. Compatible with Linux e1000 network driver. -
VFIO- Direct attached Virtual Function network controller. This is the networking type
when you launch an instance using hardware-assisted (SR-IOV) networking.
-
PARAVIRTUALIZED- VM instances launch with paravirtualized devices using VirtIO drivers.
72 73 74 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 72 def network_type @network_type end |
#remote_data_volume_type ⇒ String
Emulation type for volume.
-
ISCSI- ISCSI attached block storage device. -
SCSI- Emulated SCSI disk. -
IDE- Emulated IDE disk. -
VFIO- Direct attached Virtual Function storage. This is the default option for local data
volumes on Oracle provided images.
-
PARAVIRTUALIZED- Paravirtualized disk. This is the default for boot volumes and remote block
storage volumes on Oracle-provided images.
84 85 86 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 84 def remote_data_volume_type @remote_data_volume_type end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 97 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'boot_volume_type': :'bootVolumeType', 'firmware': :'firmware', 'network_type': :'networkType', 'remote_data_volume_type': :'remoteDataVolumeType', 'is_pv_encryption_in_transit_enabled': :'isPvEncryptionInTransitEnabled', 'is_consistent_volume_naming_enabled': :'isConsistentVolumeNamingEnabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
111 112 113 114 115 116 117 118 119 120 121 122 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 111 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'boot_volume_type': :'String', 'firmware': :'String', 'network_type': :'String', 'remote_data_volume_type': :'String', 'is_pv_encryption_in_transit_enabled': :'BOOLEAN', 'is_consistent_volume_naming_enabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
234 235 236 237 238 239 240 241 242 243 244 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 234 def ==(other) return true if equal?(other) self.class == other.class && boot_volume_type == other.boot_volume_type && firmware == other.firmware && network_type == other.network_type && remote_data_volume_type == other.remote_data_volume_type && is_pv_encryption_in_transit_enabled == other.is_pv_encryption_in_transit_enabled && is_consistent_volume_naming_enabled == other.is_consistent_volume_naming_enabled end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 269 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
249 250 251 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 249 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
258 259 260 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 258 def hash [boot_volume_type, firmware, network_type, remote_data_volume_type, is_pv_encryption_in_transit_enabled, is_consistent_volume_naming_enabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
302 303 304 305 306 307 308 309 310 311 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 302 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
296 297 298 |
# File 'lib/oci/core/models/instance_configuration_launch_options.rb', line 296 def to_s to_hash.to_s end |