Module: Kitchen::Driver::Oci::Instance::ComputeLaunchDetails
- Defined in:
- lib/kitchen/driver/oci/instance/compute.rb
Overview
setter methods that populate the details of OCI::Core::Models::LaunchInstanceDetails
Instance Method Summary collapse
- #hostname_display_name ⇒ Object
- #instance_metadata ⇒ Object
- #instance_source_details ⇒ Object
- #preemptible_instance_config ⇒ Object
- #shape_config ⇒ Object
Instance Method Details
#hostname_display_name ⇒ Object
25 26 27 28 29 |
# File 'lib/kitchen/driver/oci/instance/compute.rb', line 25 def hostname_display_name display_name = hostname launch_details.display_name = display_name launch_details.create_vnic_details = create_vnic_details(display_name) end |
#instance_metadata ⇒ Object
60 61 62 |
# File 'lib/kitchen/driver/oci/instance/compute.rb', line 60 def launch_details. = end |
#instance_source_details ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/kitchen/driver/oci/instance/compute.rb', line 52 def instance_source_details launch_details.source_details = OCI::Core::Models::InstanceSourceViaImageDetails.new( sourceType: "image", imageId: config[:image_id], bootVolumeSizeInGBs: config[:boot_volume_size_in_gbs] ) end |
#preemptible_instance_config ⇒ Object
31 32 33 34 35 36 37 38 39 40 |
# File 'lib/kitchen/driver/oci/instance/compute.rb', line 31 def preemptible_instance_config return unless config[:preemptible_instance] launch_details.preemptible_instance_config = OCI::Core::Models::PreemptibleInstanceConfigDetails.new( preemption_action: OCI::Core::Models::TerminatePreemptionAction.new( type: "TERMINATE", preserve_boot_volume: true ) ) end |
#shape_config ⇒ Object
42 43 44 45 46 47 48 49 50 |
# File 'lib/kitchen/driver/oci/instance/compute.rb', line 42 def shape_config return if config[:shape_config].empty? launch_details.shape_config = OCI::Core::Models::LaunchInstanceShapeConfigDetails.new( ocpus: config[:shape_config][:ocpus], memory_in_gbs: config[:shape_config][:memory_in_gbs], baseline_ocpu_utilization: config[:shape_config][:baseline_ocpu_utilization] || "BASELINE_1_1" ) end |