Class: OCI::Devops::DevopsClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::Devops::DevopsClientCompositeOperations
- Defined in:
- lib/oci/devops/devops_client_composite_operations.rb
Overview
This class provides a wrapper around DevopsClient 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::Devops::DevopsClient
readonly
The DevopsClient used to communicate with the service_client.
Instance Method Summary collapse
-
#approve_deployment_and_wait_for_state(deployment_id, approve_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#approve_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
-
#cancel_build_run_and_wait_for_state(cancel_build_run_details, build_run_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
-
#cancel_deployment_and_wait_for_state(deployment_id, cancel_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
-
#cancel_scheduled_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_scheduled_cascading_project_deletion and then waits for the Models::WorkRequest to enter the given state(s).
-
#change_project_compartment_and_wait_for_state(project_id, change_project_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#change_project_compartment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_build_pipeline_and_wait_for_state(create_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_build_pipeline_stage_and_wait_for_state(create_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_build_run_and_wait_for_state(create_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
-
#create_connection_and_wait_for_state(create_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_connection and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_deploy_artifact_and_wait_for_state(create_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_deploy_environment_and_wait_for_state(create_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_deploy_pipeline_and_wait_for_state(create_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_deploy_stage_and_wait_for_state(create_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_deployment_and_wait_for_state(create_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
-
#create_project_and_wait_for_state(create_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_project and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_repository_and_wait_for_state(create_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_repository and then waits for the Models::WorkRequest to enter the given state(s).
-
#create_trigger_and_wait_for_state(create_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_trigger and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_build_pipeline_and_wait_for_state(build_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_connection and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_deploy_artifact_and_wait_for_state(deploy_artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_deploy_environment_and_wait_for_state(deploy_environment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_deploy_stage_and_wait_for_state(deploy_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_project_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_project and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_ref_and_wait_for_state(repository_id, ref_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_ref and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_repository and then waits for the Models::WorkRequest to enter the given state(s).
-
#delete_trigger_and_wait_for_state(trigger_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_trigger and then waits for the Models::WorkRequest to enter the given state(s).
-
#initialize(service_client = OCI::Devops::DevopsClient.new) ⇒ DevopsClientCompositeOperations
constructor
Initializes a new DevopsClientCompositeOperations.
-
#mirror_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#mirror_repository and then waits for the Models::WorkRequest to enter the given state(s).
-
#put_repository_ref_and_wait_for_state(repository_id, ref_name, put_repository_ref_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#put_repository_ref and then waits for the Models::WorkRequest to enter the given state(s).
-
#schedule_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#schedule_cascading_project_deletion and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_build_pipeline_and_wait_for_state(build_pipeline_id, update_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, update_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_build_run_and_wait_for_state(build_run_id, update_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
-
#update_connection_and_wait_for_state(connection_id, update_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_connection and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_deploy_artifact_and_wait_for_state(deploy_artifact_id, update_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_deploy_environment_and_wait_for_state(deploy_environment_id, update_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, update_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_deploy_stage_and_wait_for_state(deploy_stage_id, update_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_deployment_and_wait_for_state(deployment_id, update_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
-
#update_project_and_wait_for_state(project_id, update_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_project and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_repository_and_wait_for_state(repository_id, update_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_repository and then waits for the Models::WorkRequest to enter the given state(s).
-
#update_trigger_and_wait_for_state(trigger_id, update_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_trigger and then waits for the Models::WorkRequest to enter the given state(s).
-
#validate_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#validate_connection and then waits for the Models::Connection acted upon to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::Devops::DevopsClient.new) ⇒ DevopsClientCompositeOperations
Initializes a new DevopsClientCompositeOperations
22 23 24 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 22 def initialize(service_client = OCI::Devops::DevopsClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::Devops::DevopsClient (readonly)
The OCI::Devops::DevopsClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#approve_deployment_and_wait_for_state(deployment_id, approve_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#approve_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 42 def approve_deployment_and_wait_for_state(deployment_id, approve_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.approve_deployment(deployment_id, approve_deployment_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_deployment(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 |
#cancel_build_run_and_wait_for_state(cancel_build_run_details, build_run_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 82 def cancel_build_run_and_wait_for_state(cancel_build_run_details, build_run_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cancel_build_run(cancel_build_run_details, build_run_id, 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_build_run(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 |
#cancel_deployment_and_wait_for_state(deployment_id, cancel_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 122 def cancel_deployment_and_wait_for_state(deployment_id, cancel_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cancel_deployment(deployment_id, cancel_deployment_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_deployment(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 |
#cancel_scheduled_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#cancel_scheduled_cascading_project_deletion and then waits for the Models::WorkRequest to enter the given state(s).
161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 161 def cancel_scheduled_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cancel_scheduled_cascading_project_deletion(project_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_project_compartment_and_wait_for_state(project_id, change_project_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#change_project_compartment and then waits for the Models::WorkRequest to enter the given state(s).
212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 212 def change_project_compartment_and_wait_for_state(project_id, change_project_compartment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_project_compartment(project_id, change_project_compartment_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_and_wait_for_state(create_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 262 def create_build_pipeline_and_wait_for_state(create_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_build_pipeline(create_build_pipeline_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_stage_and_wait_for_state(create_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 312 def create_build_pipeline_stage_and_wait_for_state(create_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_build_pipeline_stage(create_build_pipeline_stage_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_run_and_wait_for_state(create_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 362 def create_build_run_and_wait_for_state(create_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_build_run(create_build_run_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_build_run(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_connection_and_wait_for_state(create_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_connection and then waits for the Models::WorkRequest to enter the given state(s).
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 401 def create_connection_and_wait_for_state(create_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_connection(create_connection_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_artifact_and_wait_for_state(create_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 451 def create_deploy_artifact_and_wait_for_state(create_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_deploy_artifact(create_deploy_artifact_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_environment_and_wait_for_state(create_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
501 502 503 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 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 501 def create_deploy_environment_and_wait_for_state(create_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_deploy_environment(create_deploy_environment_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_pipeline_and_wait_for_state(create_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
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 577 578 579 580 581 582 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 551 def create_deploy_pipeline_and_wait_for_state(create_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_deploy_pipeline(create_deploy_pipeline_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_stage_and_wait_for_state(create_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
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 631 632 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 601 def create_deploy_stage_and_wait_for_state(create_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_deploy_stage(create_deploy_stage_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deployment_and_wait_for_state(create_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 651 def create_deployment_and_wait_for_state(create_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_deployment(create_deployment_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_deployment(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_project_and_wait_for_state(create_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_project and then waits for the Models::WorkRequest to enter the given state(s).
690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 690 def create_project_and_wait_for_state(create_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_project(create_project_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_repository_and_wait_for_state(create_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_repository and then waits for the Models::WorkRequest to enter the given state(s).
740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 740 def create_repository_and_wait_for_state(create_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_repository(create_repository_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_trigger_and_wait_for_state(create_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#create_trigger and then waits for the Models::WorkRequest to enter the given state(s).
790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 790 def create_trigger_and_wait_for_state(create_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_trigger(create_trigger_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_and_wait_for_state(build_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 840 def delete_build_pipeline_and_wait_for_state(build_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_build_pipeline(build_pipeline_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 890 def delete_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_build_pipeline_stage(build_pipeline_stage_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_connection and then waits for the Models::WorkRequest to enter the given state(s).
940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 940 def delete_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_connection(connection_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_artifact_and_wait_for_state(deploy_artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 990 def delete_deploy_artifact_and_wait_for_state(deploy_artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_deploy_artifact(deploy_artifact_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_environment_and_wait_for_state(deploy_environment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1040 def delete_deploy_environment_and_wait_for_state(deploy_environment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_deploy_environment(deploy_environment_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
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 1117 1118 1119 1120 1121 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1090 def delete_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_deploy_pipeline(deploy_pipeline_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_stage_and_wait_for_state(deploy_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
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 1171 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1140 def delete_deploy_stage_and_wait_for_state(deploy_stage_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_deploy_stage(deploy_stage_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_project_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_project and then waits for the Models::WorkRequest to enter the given state(s).
1190 1191 1192 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 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1190 def delete_project_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_project(project_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_ref_and_wait_for_state(repository_id, ref_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_ref and then waits for the Models::WorkRequest to enter the given state(s).
1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1241 def delete_ref_and_wait_for_state(repository_id, ref_name, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_ref(repository_id, ref_name, base_operation_opts) use_util = OCI::Devops::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::Devops::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_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_repository and then waits for the Models::WorkRequest to enter the given state(s).
1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1291 def delete_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_repository(repository_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_trigger_and_wait_for_state(trigger_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#delete_trigger and then waits for the Models::WorkRequest to enter the given state(s).
1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1341 def delete_trigger_and_wait_for_state(trigger_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_trigger(trigger_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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 |
#mirror_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#mirror_repository and then waits for the Models::WorkRequest to enter the given state(s).
1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1391 def mirror_repository_and_wait_for_state(repository_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.mirror_repository(repository_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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 |
#put_repository_ref_and_wait_for_state(repository_id, ref_name, put_repository_ref_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#put_repository_ref and then waits for the Models::WorkRequest to enter the given state(s).
1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1443 def put_repository_ref_and_wait_for_state(repository_id, ref_name, put_repository_ref_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.put_repository_ref(repository_id, ref_name, put_repository_ref_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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 |
#schedule_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#schedule_cascading_project_deletion and then waits for the Models::WorkRequest to enter the given state(s).
1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1493 def schedule_cascading_project_deletion_and_wait_for_state(project_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.schedule_cascading_project_deletion(project_id, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_and_wait_for_state(build_pipeline_id, update_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1544 def update_build_pipeline_and_wait_for_state(build_pipeline_id, update_build_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_build_pipeline(build_pipeline_id, update_build_pipeline_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, update_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_pipeline_stage and then waits for the Models::WorkRequest to enter the given state(s).
1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1595 def update_build_pipeline_stage_and_wait_for_state(build_pipeline_stage_id, update_build_pipeline_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_build_pipeline_stage(build_pipeline_stage_id, update_build_pipeline_stage_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_build_run_and_wait_for_state(build_run_id, update_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_build_run and then waits for the Models::BuildRun acted upon to enter the given state(s).
1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1646 def update_build_run_and_wait_for_state(build_run_id, update_build_run_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_build_run(build_run_id, update_build_run_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_build_run(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_connection_and_wait_for_state(connection_id, update_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_connection and then waits for the Models::WorkRequest to enter the given state(s).
1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1686 def update_connection_and_wait_for_state(connection_id, update_connection_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_connection(connection_id, update_connection_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_artifact_and_wait_for_state(deploy_artifact_id, update_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_artifact and then waits for the Models::WorkRequest to enter the given state(s).
1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1737 def update_deploy_artifact_and_wait_for_state(deploy_artifact_id, update_deploy_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_deploy_artifact(deploy_artifact_id, update_deploy_artifact_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_environment_and_wait_for_state(deploy_environment_id, update_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_environment and then waits for the Models::WorkRequest to enter the given state(s).
1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1788 def update_deploy_environment_and_wait_for_state(deploy_environment_id, update_deploy_environment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_deploy_environment(deploy_environment_id, update_deploy_environment_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, update_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_pipeline and then waits for the Models::WorkRequest to enter the given state(s).
1839 1840 1841 1842 1843 1844 1845 1846 1847 1848 1849 1850 1851 1852 1853 1854 1855 1856 1857 1858 1859 1860 1861 1862 1863 1864 1865 1866 1867 1868 1869 1870 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1839 def update_deploy_pipeline_and_wait_for_state(deploy_pipeline_id, update_deploy_pipeline_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_deploy_pipeline(deploy_pipeline_id, update_deploy_pipeline_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deploy_stage_and_wait_for_state(deploy_stage_id, update_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deploy_stage and then waits for the Models::WorkRequest to enter the given state(s).
1890 1891 1892 1893 1894 1895 1896 1897 1898 1899 1900 1901 1902 1903 1904 1905 1906 1907 1908 1909 1910 1911 1912 1913 1914 1915 1916 1917 1918 1919 1920 1921 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1890 def update_deploy_stage_and_wait_for_state(deploy_stage_id, update_deploy_stage_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_deploy_stage(deploy_stage_id, update_deploy_stage_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_deployment_and_wait_for_state(deployment_id, update_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_deployment and then waits for the Models::Deployment acted upon to enter the given state(s).
1941 1942 1943 1944 1945 1946 1947 1948 1949 1950 1951 1952 1953 1954 1955 1956 1957 1958 1959 1960 1961 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1941 def update_deployment_and_wait_for_state(deployment_id, update_deployment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_deployment(deployment_id, update_deployment_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_deployment(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_project_and_wait_for_state(project_id, update_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_project and then waits for the Models::WorkRequest to enter the given state(s).
1981 1982 1983 1984 1985 1986 1987 1988 1989 1990 1991 1992 1993 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 1981 def update_project_and_wait_for_state(project_id, update_project_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_project(project_id, update_project_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_repository_and_wait_for_state(repository_id, update_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_repository and then waits for the Models::WorkRequest to enter the given state(s).
2032 2033 2034 2035 2036 2037 2038 2039 2040 2041 2042 2043 2044 2045 2046 2047 2048 2049 2050 2051 2052 2053 2054 2055 2056 2057 2058 2059 2060 2061 2062 2063 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 2032 def update_repository_and_wait_for_state(repository_id, update_repository_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_repository(repository_id, update_repository_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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_trigger_and_wait_for_state(trigger_id, update_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#update_trigger and then waits for the Models::WorkRequest to enter the given state(s).
2083 2084 2085 2086 2087 2088 2089 2090 2091 2092 2093 2094 2095 2096 2097 2098 2099 2100 2101 2102 2103 2104 2105 2106 2107 2108 2109 2110 2111 2112 2113 2114 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 2083 def update_trigger_and_wait_for_state(trigger_id, update_trigger_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_trigger(trigger_id, update_trigger_details, base_operation_opts) use_util = OCI::Devops::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::Devops::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 |
#validate_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::Devops::DevopsClient#validate_connection and then waits for the Models::Connection acted upon to enter the given state(s).
2133 2134 2135 2136 2137 2138 2139 2140 2141 2142 2143 2144 2145 2146 2147 2148 2149 2150 2151 2152 2153 |
# File 'lib/oci/devops/devops_client_composite_operations.rb', line 2133 def validate_connection_and_wait_for_state(connection_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.validate_connection(connection_id, 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_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 |