Class: OCI::DisasterRecovery::DisasterRecoveryClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::DisasterRecovery::DisasterRecoveryClientCompositeOperations
- Defined in:
- lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb
Overview
This class provides a wrapper around DisasterRecoveryClient 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::DisasterRecovery::DisasterRecoveryClient
readonly
The DisasterRecoveryClient used to communicate with the service_client.
Instance Method Summary collapse
-
#associate_dr_protection_group_and_wait_for_state(associate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#associate_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
-
#cancel_dr_plan_execution_and_wait_for_state(cancel_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#cancel_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#change_dr_protection_group_compartment_and_wait_for_state(change_dr_protection_group_compartment_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#change_dr_protection_group_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_automatic_dr_configuration_and_wait_for_state(create_automatic_dr_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_automatic_dr_configuration and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_dr_plan_and_wait_for_state(create_dr_plan_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_dr_plan_execution_and_wait_for_state(create_dr_plan_execution_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_dr_protection_group_and_wait_for_state(create_dr_protection_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_automatic_dr_configuration_and_wait_for_state(automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_automatic_dr_configuration and then waits for the Models::AutomaticDrConfiguration acted upon to enter the given state(s).
-
#delete_dr_plan_and_wait_for_state(dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_plan and then waits for the Models::DrPlan acted upon to enter the given state(s).
-
#delete_dr_plan_execution_and_wait_for_state(dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_dr_protection_group_and_wait_for_state(dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
-
#disassociate_dr_protection_group_and_wait_for_state(disassociate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#disassociate_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
-
#ignore_dr_plan_execution_and_wait_for_state(ignore_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#ignore_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::DisasterRecovery::DisasterRecoveryClient.new) ⇒ DisasterRecoveryClientCompositeOperations
constructor
Initializes a new DisasterRecoveryClientCompositeOperations.
-
#pause_dr_plan_execution_and_wait_for_state(pause_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#pause_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#refresh_dr_plan_and_wait_for_state(refresh_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#refresh_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
-
#resume_dr_plan_execution_and_wait_for_state(resume_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#resume_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#retry_dr_plan_execution_and_wait_for_state(retry_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#retry_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_automatic_dr_configuration_and_wait_for_state(update_automatic_dr_configuration_details, automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_automatic_dr_configuration and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_dr_plan_and_wait_for_state(update_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_dr_plan_execution_and_wait_for_state(update_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_dr_protection_group_and_wait_for_state(update_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_dr_protection_group_role_and_wait_for_state(update_dr_protection_group_role_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_protection_group_role and then waits for the Models::WorkRequest to enter the given state(s).
-
#verify_dr_plan_and_wait_for_state(verify_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#verify_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::DisasterRecovery::DisasterRecoveryClient.new) ⇒ DisasterRecoveryClientCompositeOperations
Initializes a new DisasterRecoveryClientCompositeOperations
22 23 24 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 22 def initialize(service_client = OCI::DisasterRecovery::DisasterRecoveryClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::DisasterRecovery::DisasterRecoveryClient (readonly)
The OCI::DisasterRecovery::DisasterRecoveryClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#associate_dr_protection_group_and_wait_for_state(associate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#associate_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 45 def associate_dr_protection_group_and_wait_for_state(associate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.associate_dr_protection_group(associate_dr_protection_group_details, dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#cancel_dr_plan_execution_and_wait_for_state(cancel_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#cancel_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
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 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 99 def cancel_dr_plan_execution_and_wait_for_state(cancel_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cancel_dr_plan_execution(cancel_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_protection_group_compartment_and_wait_for_state(change_dr_protection_group_compartment_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#change_dr_protection_group_compartment and then waits for the Models::WorkRequest to enter the given state(s).
153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 153 def change_dr_protection_group_compartment_and_wait_for_state(change_dr_protection_group_compartment_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_dr_protection_group_compartment(change_dr_protection_group_compartment_details, dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_automatic_dr_configuration_and_wait_for_state(create_automatic_dr_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_automatic_dr_configuration and then waits for the Models::WorkRequest to enter the given state(s).
203 204 205 206 207 208 209 210 211 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/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 203 def create_automatic_dr_configuration_and_wait_for_state(create_automatic_dr_configuration_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_automatic_dr_configuration(create_automatic_dr_configuration_details, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_plan_and_wait_for_state(create_dr_plan_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 253 def create_dr_plan_and_wait_for_state(create_dr_plan_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_dr_plan(create_dr_plan_details, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_plan_execution_and_wait_for_state(create_dr_plan_execution_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 303 def create_dr_plan_execution_and_wait_for_state(create_dr_plan_execution_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_dr_plan_execution(create_dr_plan_execution_details, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_protection_group_and_wait_for_state(create_dr_protection_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#create_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 353 def create_dr_protection_group_and_wait_for_state(create_dr_protection_group_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_dr_protection_group(create_dr_protection_group_details, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_automatic_dr_configuration_and_wait_for_state(automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_automatic_dr_configuration and then waits for the Models::AutomaticDrConfiguration acted upon to enter the given state(s).
406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 406 def delete_automatic_dr_configuration_and_wait_for_state(automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_automatic_dr_configuration(automatic_dr_configuration_id) operation_result = @service_client.delete_automatic_dr_configuration(automatic_dr_configuration_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_dr_plan_and_wait_for_state(dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_plan and then waits for the Models::DrPlan acted upon to enter the given state(s).
449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 449 def delete_dr_plan_and_wait_for_state(dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_dr_plan(dr_plan_id) operation_result = @service_client.delete_dr_plan(dr_plan_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_dr_plan_execution_and_wait_for_state(dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 492 def delete_dr_plan_execution_and_wait_for_state(dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_dr_plan_execution(dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_protection_group_and_wait_for_state(dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#delete_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 545 def delete_dr_protection_group_and_wait_for_state(dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_dr_protection_group(dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#disassociate_dr_protection_group_and_wait_for_state(disassociate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#disassociate_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
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 624 625 626 627 628 629 630 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 599 def disassociate_dr_protection_group_and_wait_for_state(disassociate_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.disassociate_dr_protection_group(disassociate_dr_protection_group_details, dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#ignore_dr_plan_execution_and_wait_for_state(ignore_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#ignore_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 653 def ignore_dr_plan_execution_and_wait_for_state(ignore_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.ignore_dr_plan_execution(ignore_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#pause_dr_plan_execution_and_wait_for_state(pause_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#pause_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 707 def pause_dr_plan_execution_and_wait_for_state(pause_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.pause_dr_plan_execution(pause_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#refresh_dr_plan_and_wait_for_state(refresh_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#refresh_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 761 def refresh_dr_plan_and_wait_for_state(refresh_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.refresh_dr_plan(refresh_dr_plan_details, dr_plan_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#resume_dr_plan_execution_and_wait_for_state(resume_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#resume_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 815 def resume_dr_plan_execution_and_wait_for_state(resume_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.resume_dr_plan_execution(resume_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#retry_dr_plan_execution_and_wait_for_state(retry_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#retry_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 869 def retry_dr_plan_execution_and_wait_for_state(retry_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.retry_dr_plan_execution(retry_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_automatic_dr_configuration_and_wait_for_state(update_automatic_dr_configuration_details, automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_automatic_dr_configuration and then waits for the Models::WorkRequest 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 944 945 946 947 948 949 950 951 952 953 954 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 923 def update_automatic_dr_configuration_and_wait_for_state(update_automatic_dr_configuration_details, automatic_dr_configuration_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_automatic_dr_configuration(update_automatic_dr_configuration_details, automatic_dr_configuration_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_plan_and_wait_for_state(update_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 977 def update_dr_plan_and_wait_for_state(update_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dr_plan(update_dr_plan_details, dr_plan_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_plan_execution_and_wait_for_state(update_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_plan_execution and then waits for the Models::WorkRequest to enter the given state(s).
1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 1031 def update_dr_plan_execution_and_wait_for_state(update_dr_plan_execution_details, dr_plan_execution_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dr_plan_execution(update_dr_plan_execution_details, dr_plan_execution_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_protection_group_and_wait_for_state(update_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_protection_group and then waits for the Models::WorkRequest to enter the given state(s).
1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 1085 def update_dr_protection_group_and_wait_for_state(update_dr_protection_group_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dr_protection_group(update_dr_protection_group_details, dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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_dr_protection_group_role_and_wait_for_state(update_dr_protection_group_role_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#update_dr_protection_group_role and then waits for the Models::WorkRequest to enter the given state(s).
1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 1139 def update_dr_protection_group_role_and_wait_for_state(update_dr_protection_group_role_details, dr_protection_group_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_dr_protection_group_role(update_dr_protection_group_role_details, dr_protection_group_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |
#verify_dr_plan_and_wait_for_state(verify_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::DisasterRecovery::DisasterRecoveryClient#verify_dr_plan and then waits for the Models::WorkRequest to enter the given state(s).
1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 |
# File 'lib/oci/disaster_recovery/disaster_recovery_client_composite_operations.rb', line 1193 def verify_dr_plan_and_wait_for_state(verify_dr_plan_details, dr_plan_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.verify_dr_plan(verify_dr_plan_details, dr_plan_id, base_operation_opts) use_util = OCI::DisasterRecovery::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'] return operation_result if wait_for_resource_id.nil? || wait_for_resource_id.empty? begin if use_util waiter_result = OCI::DisasterRecovery::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 |