Class: OCI::Core::ComputeClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Core::ComputeClientCompositeOperations
- Defined in:
- lib/oci/core/compute_client_composite_operations.rb
Overview
This class provides a wrapper around ComputeClient and offers convenience methods for operations that would otherwise need to be chained together. For example, instead of performing an action on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource to enter a given state, you can call a single method in this class to accomplish the same functionality
Instance Attribute Summary collapse
-
#service_client ⇒ OCI::Core::ComputeClient
readonly
The ComputeClient used to communicate with the service_client.
Instance Method Summary collapse
-
#attach_boot_volume_and_wait_for_state(attach_boot_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_boot_volume and then waits for the Models::BootVolumeAttachment acted upon to enter the given state(s).
-
#attach_vnic_and_wait_for_state(attach_vnic_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_vnic and then waits for the Models::VnicAttachment acted upon to enter the given state(s).
-
#attach_volume_and_wait_for_state(attach_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_volume and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
-
#capture_console_history_and_wait_for_state(capture_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#capture_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
-
#change_compute_capacity_reservation_compartment_and_wait_for_state(capacity_reservation_id, change_compute_capacity_reservation_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_compute_capacity_reservation_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#change_dedicated_vm_host_compartment_and_wait_for_state(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_dedicated_vm_host_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#change_instance_compartment_and_wait_for_state(instance_id, change_instance_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_instance_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_compute_capacity_reservation_and_wait_for_state(create_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_compute_capacity_reservation and then waits for the Models::ComputeCapacityReservation acted upon to enter the given state(s).
-
#create_dedicated_vm_host_and_wait_for_state(create_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_dedicated_vm_host and then waits for the Models::DedicatedVmHost acted upon to enter the given state(s).
-
#create_image_and_wait_for_state(create_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_image and then waits for the Models::Image acted upon to enter the given state(s).
-
#create_instance_console_connection_and_wait_for_state(create_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
-
#delete_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_compute_capacity_reservation and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_console_history_and_wait_for_state(instance_console_history_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
-
#delete_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_dedicated_vm_host and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_image_and_wait_for_state(image_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_image and then waits for the Models::Image acted upon to enter the given state(s).
-
#delete_instance_console_connection_and_wait_for_state(instance_console_connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
-
#detach_boot_volume_and_wait_for_state(boot_volume_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_boot_volume and then waits for the Models::BootVolumeAttachment acted upon to enter the given state(s).
-
#detach_vnic_and_wait_for_state(vnic_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_vnic and then waits for the Models::VnicAttachment acted upon to enter the given state(s).
-
#detach_volume_and_wait_for_state(volume_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_volume and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
-
#export_image_and_wait_for_state(image_id, export_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#export_image and then waits for the Models::Image acted upon to enter the given state(s).
-
#initialize(service_client = OCI::Core::ComputeClient.new) ⇒ ComputeClientCompositeOperations
constructor
Initializes a new ComputeClientCompositeOperations.
-
#instance_action_and_wait_for_state(instance_id, action, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#instance_action and then waits for the Models::Instance acted upon to enter the given state(s).
-
#launch_instance_and_wait_for_state(launch_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#launch_instance and then waits for the Models::Instance acted upon to enter the given state(s).
-
#terminate_instance_and_wait_for_state(instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#terminate_instance and then waits for the Models::Instance acted upon to enter the given state(s).
-
#update_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, update_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_compute_capacity_reservation and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_console_history_and_wait_for_state(instance_console_history_id, update_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
-
#update_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, update_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_dedicated_vm_host and then waits for the Models::DedicatedVmHost acted upon to enter the given state(s).
-
#update_image_and_wait_for_state(image_id, update_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_image and then waits for the Models::Image acted upon to enter the given state(s).
-
#update_instance_and_wait_for_state(instance_id, update_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_instance and then waits for the Models::Instance acted upon to enter the given state(s).
-
#update_instance_console_connection_and_wait_for_state(instance_console_connection_id, update_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
-
#update_volume_attachment_and_wait_for_state(volume_attachment_id, update_volume_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_volume_attachment and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Core::ComputeClient.new) ⇒ ComputeClientCompositeOperations
Initializes a new ComputeClientCompositeOperations
20 21 22 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 20 def initialize(service_client = OCI::Core::ComputeClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Core::ComputeClient (readonly)
The OCI::Core::ComputeClient used to communicate with the service_client
14 15 16 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 14 def service_client @service_client end |
Instance Method Details
#attach_boot_volume_and_wait_for_state(attach_boot_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_boot_volume and then waits for the Models::BootVolumeAttachment acted upon to enter the given state(s).
39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 39 def attach_boot_volume_and_wait_for_state(attach_boot_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.attach_boot_volume(attach_boot_volume_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#attach_vnic_and_wait_for_state(attach_vnic_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_vnic and then waits for the Models::VnicAttachment acted upon to enter the given state(s).
78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 78 def attach_vnic_and_wait_for_state(attach_vnic_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.attach_vnic(attach_vnic_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#attach_volume_and_wait_for_state(attach_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#attach_volume and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 117 def attach_volume_and_wait_for_state(attach_volume_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.attach_volume(attach_volume_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#capture_console_history_and_wait_for_state(capture_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#capture_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 156 def capture_console_history_and_wait_for_state(capture_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.capture_console_history(capture_console_history_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_console_history(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#change_compute_capacity_reservation_compartment_and_wait_for_state(capacity_reservation_id, change_compute_capacity_reservation_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_compute_capacity_reservation_compartment and then waits for the Models::WorkRequest to enter the given state(s).
196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 196 def change_compute_capacity_reservation_compartment_and_wait_for_state(capacity_reservation_id, change_compute_capacity_reservation_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_compute_capacity_reservation_compartment(capacity_reservation_id, change_compute_capacity_reservation_compartment_details, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#change_dedicated_vm_host_compartment_and_wait_for_state(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_dedicated_vm_host_compartment and then waits for the Models::WorkRequest to enter the given state(s).
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 246 def change_dedicated_vm_host_compartment_and_wait_for_state(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_dedicated_vm_host_compartment(dedicated_vm_host_id, change_dedicated_vm_host_compartment_details, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#change_instance_compartment_and_wait_for_state(instance_id, change_instance_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#change_instance_compartment and then waits for the Models::WorkRequest to enter the given state(s).
296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 296 def change_instance_compartment_and_wait_for_state(instance_id, change_instance_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_instance_compartment(instance_id, change_instance_compartment_details, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_compute_capacity_reservation_and_wait_for_state(create_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_compute_capacity_reservation and then waits for the Models::ComputeCapacityReservation acted upon to enter the given state(s).
348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 348 def create_compute_capacity_reservation_and_wait_for_state(create_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_compute_capacity_reservation(create_compute_capacity_reservation_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_compute_capacity_reservation(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_dedicated_vm_host_and_wait_for_state(create_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_dedicated_vm_host and then waits for the Models::DedicatedVmHost acted upon to enter the given state(s).
387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 387 def create_dedicated_vm_host_and_wait_for_state(create_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_dedicated_vm_host(create_dedicated_vm_host_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_dedicated_vm_host(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_image_and_wait_for_state(create_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_image and then waits for the Models::Image acted upon to enter the given state(s).
426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 426 def create_image_and_wait_for_state(create_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_image(create_image_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_image(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_instance_console_connection_and_wait_for_state(create_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#create_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 465 def create_instance_console_connection_and_wait_for_state(create_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_instance_console_connection(create_instance_console_connection_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_instance_console_connection(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_compute_capacity_reservation and then waits for the Models::WorkRequest to enter the given state(s).
504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 504 def delete_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_compute_capacity_reservation(capacity_reservation_id, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_console_history_and_wait_for_state(instance_console_history_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 553 def delete_console_history_and_wait_for_state(instance_console_history_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_console_history(instance_console_history_id) operation_result = @service_client.delete_console_history(instance_console_history_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_dedicated_vm_host and then waits for the Models::WorkRequest to enter the given state(s).
593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 593 def delete_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_dedicated_vm_host(dedicated_vm_host_id, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_image_and_wait_for_state(image_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_image and then waits for the Models::Image acted upon to enter the given state(s).
642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 642 def delete_image_and_wait_for_state(image_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_image(image_id) operation_result = @service_client.delete_image(image_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_instance_console_connection_and_wait_for_state(instance_console_connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#delete_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 682 def delete_instance_console_connection_and_wait_for_state(instance_console_connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_instance_console_connection(instance_console_connection_id) operation_result = @service_client.delete_instance_console_connection(instance_console_connection_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#detach_boot_volume_and_wait_for_state(boot_volume_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_boot_volume and then waits for the Models::BootVolumeAttachment acted upon to enter the given state(s).
722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 722 def detach_boot_volume_and_wait_for_state(, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.() operation_result = @service_client.detach_boot_volume(, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#detach_vnic_and_wait_for_state(vnic_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_vnic and then waits for the Models::VnicAttachment acted upon to enter the given state(s).
762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 762 def detach_vnic_and_wait_for_state(, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.() operation_result = @service_client.detach_vnic(, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#detach_volume_and_wait_for_state(volume_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#detach_volume and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 802 def detach_volume_and_wait_for_state(, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.() operation_result = @service_client.detach_volume(, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#export_image_and_wait_for_state(image_id, export_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#export_image and then waits for the Models::Image acted upon to enter the given state(s).
843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 843 def export_image_and_wait_for_state(image_id, export_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.export_image(image_id, export_image_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_image(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#instance_action_and_wait_for_state(instance_id, action, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#instance_action and then waits for the Models::Instance acted upon to enter the given state(s).
884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 884 def instance_action_and_wait_for_state(instance_id, action, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.instance_action(instance_id, action, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_instance(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#launch_instance_and_wait_for_state(launch_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#launch_instance and then waits for the Models::Instance acted upon to enter the given state(s).
923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 923 def launch_instance_and_wait_for_state(launch_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.launch_instance(launch_instance_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_instance(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#terminate_instance_and_wait_for_state(instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#terminate_instance and then waits for the Models::Instance acted upon to enter the given state(s).
962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 962 def terminate_instance_and_wait_for_state(instance_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_instance(instance_id) operation_result = @service_client.terminate_instance(instance_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, update_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_compute_capacity_reservation and then waits for the Models::WorkRequest to enter the given state(s).
1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1003 def update_compute_capacity_reservation_and_wait_for_state(capacity_reservation_id, update_compute_capacity_reservation_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_compute_capacity_reservation(capacity_reservation_id, update_compute_capacity_reservation_details, base_operation_opts) use_util = OCI::Core::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::Core::Util.wait_on_work_request( @service_client, wait_for_resource_id, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) else waiter_result = @service_client.get_work_request(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:status) && lowered_wait_for_states.include?(response.data.status.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) end result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_console_history_and_wait_for_state(instance_console_history_id, update_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_console_history and then waits for the Models::ConsoleHistory acted upon to enter the given state(s).
1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1053 def update_console_history_and_wait_for_state(instance_console_history_id, update_console_history_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_console_history(instance_console_history_id, update_console_history_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_console_history(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, update_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_dedicated_vm_host and then waits for the Models::DedicatedVmHost acted upon to enter the given state(s).
1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1093 def update_dedicated_vm_host_and_wait_for_state(dedicated_vm_host_id, update_dedicated_vm_host_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dedicated_vm_host(dedicated_vm_host_id, update_dedicated_vm_host_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_dedicated_vm_host(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_image_and_wait_for_state(image_id, update_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_image and then waits for the Models::Image acted upon to enter the given state(s).
1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1134 def update_image_and_wait_for_state(image_id, update_image_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_image(image_id, update_image_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_image(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_instance_and_wait_for_state(instance_id, update_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_instance and then waits for the Models::Instance acted upon to enter the given state(s).
1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1174 def update_instance_and_wait_for_state(instance_id, update_instance_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_instance(instance_id, update_instance_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_instance(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_instance_console_connection_and_wait_for_state(instance_console_connection_id, update_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_instance_console_connection and then waits for the Models::InstanceConsoleConnection acted upon to enter the given state(s).
1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1214 def update_instance_console_connection_and_wait_for_state(instance_console_connection_id, update_instance_console_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_instance_console_connection(instance_console_connection_id, update_instance_console_connection_details, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.get_instance_console_connection(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_volume_attachment_and_wait_for_state(volume_attachment_id, update_volume_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Core::ComputeClient#update_volume_attachment and then waits for the Models::VolumeAttachment acted upon to enter the given state(s).
1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 |
# File 'lib/oci/core/compute_client_composite_operations.rb', line 1254 def (, , wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.(, , base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |