Class: OCI::MarketplacePublisher::MarketplacePublisherClientCompositeOperations
- Inherits:
-
Object
- Object
- OCI::MarketplacePublisher::MarketplacePublisherClientCompositeOperations
- Defined in:
- lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb
Overview
This class provides a wrapper around MarketplacePublisherClient 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::MarketplacePublisher::MarketplacePublisherClient
readonly
The MarketplacePublisherClient used to communicate with the service_client.
Instance Method Summary collapse
-
#activate_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#activate_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
-
#cascading_delete_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#cascading_delete_listing and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#cascading_delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#cascading_delete_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#change_listing_revision_to_new_status_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#change_listing_revision_to_new_status and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#clone_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#clone_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#create_artifact_and_wait_for_state(create_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#create_listing_and_wait_for_state(create_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
-
#create_listing_revision_and_wait_for_state(create_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#create_listing_revision_attachment_and_wait_for_state(create_listing_revision_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
-
#create_listing_revision_note_and_wait_for_state(create_listing_revision_note_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_note and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionNote acted upon to enter the given state(s).
-
#create_listing_revision_package_and_wait_for_state(create_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
-
#create_term_and_wait_for_state(create_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
-
#create_term_version_and_wait_for_state(create_term_version_content, term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
-
#delete_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#delete_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
-
#delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#delete_listing_revision_attachment_and_wait_for_state(listing_revision_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
-
#delete_listing_revision_note_and_wait_for_state(listing_revision_note_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_note and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionNote acted upon to enter the given state(s).
-
#delete_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
-
#delete_term_and_wait_for_state(term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
-
#delete_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
-
#initialize(service_client = OCI::MarketplacePublisher::MarketplacePublisherClient.new) ⇒ MarketplacePublisherClientCompositeOperations
constructor
Initializes a new MarketplacePublisherClientCompositeOperations.
-
#mark_listing_revision_package_as_default_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#mark_listing_revision_package_as_default and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#publish_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#publish_listing_revision_as_private_and_wait_for_state(publish_listing_revision_as_private_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision_as_private and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#submit_listing_revision_for_review_and_wait_for_state(submit_listing_revision_for_review_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#submit_listing_revision_for_review and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#un_publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#un_publish_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#update_artifact_and_wait_for_state(artifact_id, update_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#update_listing_and_wait_for_state(listing_id, update_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
-
#update_listing_revision_and_wait_for_state(listing_revision_id, update_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#update_listing_revision_attachment_and_wait_for_state(listing_revision_attachment_id, update_listing_revision_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
-
#update_listing_revision_attachment_content_and_wait_for_state(listing_revision_attachment_id, update_listing_revision_attachment_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_attachment_content and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
-
#update_listing_revision_icon_content_and_wait_for_state(listing_revision_id, update_listing_revision_icon_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_icon_content and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
-
#update_listing_revision_package_and_wait_for_state(listing_revision_package_id, update_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
-
#update_term_and_wait_for_state(term_id, update_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
-
#update_term_version_and_wait_for_state(term_version_id, update_term_version_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
-
#update_term_version_content_and_wait_for_state(term_version_id, update_term_version_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term_version_content and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
-
#validate_and_publish_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#validate_and_publish_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
-
#withdraw_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#withdraw_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
Constructor Details
#initialize(service_client = OCI::MarketplacePublisher::MarketplacePublisherClient.new) ⇒ MarketplacePublisherClientCompositeOperations
Initializes a new MarketplacePublisherClientCompositeOperations
22 23 24 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 22 def initialize(service_client = OCI::MarketplacePublisher::MarketplacePublisherClient.new) @service_client = service_client end |
Instance Attribute Details
#service_client ⇒ OCI::MarketplacePublisher::MarketplacePublisherClient (readonly)
The OCI::MarketplacePublisher::MarketplacePublisherClient used to communicate with the service_client
16 17 18 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 16 def service_client @service_client end |
Instance Method Details
#activate_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#activate_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 41 def activate_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.activate_term_version(term_version_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_term_version(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 |
#cascading_delete_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#cascading_delete_listing and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 80 def cascading_delete_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cascading_delete_listing(listing_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#cascading_delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#cascading_delete_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 129 def cascading_delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.cascading_delete_listing_revision(listing_revision_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_listing_revision_to_new_status_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#change_listing_revision_to_new_status and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 178 def change_listing_revision_to_new_status_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.change_listing_revision_to_new_status(listing_revision_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_listing_revision(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 |
#clone_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#clone_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
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 244 245 246 247 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 217 def clone_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.clone_listing_revision(listing_revision_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_artifact_and_wait_for_state(create_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
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 294 295 296 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 266 def create_artifact_and_wait_for_state(create_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_artifact(create_artifact_details, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_listing_and_wait_for_state(create_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 315 def create_listing_and_wait_for_state(create_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_listing(create_listing_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_listing(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_listing_revision_and_wait_for_state(create_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 354 def create_listing_revision_and_wait_for_state(create_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_listing_revision(create_listing_revision_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_listing_revision(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_listing_revision_attachment_and_wait_for_state(create_listing_revision_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 393 def (, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.(, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#create_listing_revision_note_and_wait_for_state(create_listing_revision_note_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_note and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionNote acted upon to enter the given state(s).
432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 432 def create_listing_revision_note_and_wait_for_state(create_listing_revision_note_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_listing_revision_note(create_listing_revision_note_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_listing_revision_note(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_listing_revision_package_and_wait_for_state(create_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 471 def create_listing_revision_package_and_wait_for_state(create_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_listing_revision_package(create_listing_revision_package_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_listing_revision_package(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_term_and_wait_for_state(create_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 510 def create_term_and_wait_for_state(create_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_term(create_term_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_term(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_term_version_and_wait_for_state(create_term_version_content, term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#create_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 550 def create_term_version_and_wait_for_state(create_term_version_content, term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.create_term_version(create_term_version_content, term_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_term_version(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 589 def delete_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.delete_artifact(artifact_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 638 def delete_listing_and_wait_for_state(listing_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_listing(listing_id) operation_result = @service_client.delete_listing(listing_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 678 def delete_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_listing_revision(listing_revision_id) operation_result = @service_client.delete_listing_revision(listing_revision_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_listing_revision_attachment_and_wait_for_state(listing_revision_attachment_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 718 def (, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.() operation_result = @service_client.(, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_listing_revision_note_and_wait_for_state(listing_revision_note_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_note and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionNote acted upon to enter the given state(s).
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 758 def delete_listing_revision_note_and_wait_for_state(listing_revision_note_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_listing_revision_note(listing_revision_note_id) operation_result = @service_client.delete_listing_revision_note(listing_revision_note_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 798 def delete_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_listing_revision_package(listing_revision_package_id) operation_result = @service_client.delete_listing_revision_package(listing_revision_package_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_term_and_wait_for_state(term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 838 def delete_term_and_wait_for_state(term_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_term(term_id) operation_result = @service_client.delete_term(term_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#delete_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#delete_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 878 def delete_term_version_and_wait_for_state(term_version_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) initial_get_result = @service_client.get_term_version(term_version_id) operation_result = @service_client.delete_term_version(term_version_id, base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) begin waiter_result = initial_get_result.wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200, succeed_on_not_found: true ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#mark_listing_revision_package_as_default_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#mark_listing_revision_package_as_default and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 918 def mark_listing_revision_package_as_default_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.mark_listing_revision_package_as_default(listing_revision_package_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#publish_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 967 def publish_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.publish_listing_revision(listing_revision_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#publish_listing_revision_as_private_and_wait_for_state(publish_listing_revision_as_private_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision_as_private and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1017 def publish_listing_revision_as_private_and_wait_for_state(publish_listing_revision_as_private_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.publish_listing_revision_as_private(publish_listing_revision_as_private_details, listing_revision_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#publish_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1066 def publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.publish_listing_revision_package(listing_revision_package_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#submit_listing_revision_for_review_and_wait_for_state(submit_listing_revision_for_review_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#submit_listing_revision_for_review and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1116 def submit_listing_revision_for_review_and_wait_for_state(submit_listing_revision_for_review_details, listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.submit_listing_revision_for_review(submit_listing_revision_for_review_details, listing_revision_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_listing_revision(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 |
#un_publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#un_publish_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1155 def un_publish_listing_revision_package_and_wait_for_state(listing_revision_package_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.un_publish_listing_revision_package(listing_revision_package_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_artifact_and_wait_for_state(artifact_id, update_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1205 def update_artifact_and_wait_for_state(artifact_id, update_artifact_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_artifact(artifact_id, update_artifact_details, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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_listing_and_wait_for_state(listing_id, update_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing and then waits for the OCI::MarketplacePublisher::Models::Listing acted upon to enter the given state(s).
1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1255 def update_listing_and_wait_for_state(listing_id, update_listing_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_listing(listing_id, update_listing_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_listing(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_listing_revision_and_wait_for_state(listing_revision_id, update_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1295 def update_listing_revision_and_wait_for_state(listing_revision_id, update_listing_revision_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_listing_revision(listing_revision_id, update_listing_revision_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_listing_revision(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_listing_revision_attachment_and_wait_for_state(listing_revision_attachment_id, update_listing_revision_attachment_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_attachment and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1335 def (, , wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.(, , base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_listing_revision_attachment_content_and_wait_for_state(listing_revision_attachment_id, update_listing_revision_attachment_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_attachment_content and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionAttachment acted upon to enter the given state(s).
1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1375 def (, , wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.(, , base_operation_opts) return operation_result if wait_for_states.empty? lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.data.id begin waiter_result = @service_client.(wait_for_resource_id).wait_until( eval_proc: ->(response) { response.data.respond_to?(:lifecycle_state) && lowered_wait_for_states.include?(response.data.lifecycle_state.downcase) }, max_interval_seconds: waiter_opts.key?(:max_interval_seconds) ? waiter_opts[:max_interval_seconds] : 30, max_wait_seconds: waiter_opts.key?(:max_wait_seconds) ? waiter_opts[:max_wait_seconds] : 1200 ) result_to_return = waiter_result return result_to_return rescue StandardError raise OCI::Errors::CompositeOperationError.new(partial_results: [operation_result]) end end |
#update_listing_revision_icon_content_and_wait_for_state(listing_revision_id, update_listing_revision_icon_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_icon_content and then waits for the OCI::MarketplacePublisher::Models::ListingRevision acted upon to enter the given state(s).
1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1415 def update_listing_revision_icon_content_and_wait_for_state(listing_revision_id, update_listing_revision_icon_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_listing_revision_icon_content(listing_revision_id, update_listing_revision_icon_content, 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_listing_revision(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_listing_revision_package_and_wait_for_state(listing_revision_package_id, update_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_listing_revision_package and then waits for the OCI::MarketplacePublisher::Models::ListingRevisionPackage acted upon to enter the given state(s).
1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1455 def update_listing_revision_package_and_wait_for_state(listing_revision_package_id, update_listing_revision_package_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_listing_revision_package(listing_revision_package_id, update_listing_revision_package_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_listing_revision_package(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_term_and_wait_for_state(term_id, update_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term and then waits for the OCI::MarketplacePublisher::Models::Term acted upon to enter the given state(s).
1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1495 def update_term_and_wait_for_state(term_id, update_term_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_term(term_id, update_term_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_term(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_term_version_and_wait_for_state(term_version_id, update_term_version_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term_version and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1535 def update_term_version_and_wait_for_state(term_version_id, update_term_version_details, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_term_version(term_version_id, update_term_version_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_term_version(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_term_version_content_and_wait_for_state(term_version_id, update_term_version_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#update_term_version_content and then waits for the OCI::MarketplacePublisher::Models::TermVersion acted upon to enter the given state(s).
1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1575 def update_term_version_content_and_wait_for_state(term_version_id, update_term_version_content, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.update_term_version_content(term_version_id, update_term_version_content, 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_term_version(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 |
#validate_and_publish_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#validate_and_publish_artifact and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1614 def validate_and_publish_artifact_and_wait_for_state(artifact_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.validate_and_publish_artifact(artifact_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |
#withdraw_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) ⇒ OCI::Response
Calls OCI::MarketplacePublisher::MarketplacePublisherClient#withdraw_listing_revision and then waits for the OCI::MarketplacePublisher::Models::WorkRequest to enter the given state(s).
1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 |
# File 'lib/oci/marketplace_publisher/marketplace_publisher_client_composite_operations.rb', line 1663 def withdraw_listing_revision_and_wait_for_state(listing_revision_id, wait_for_states = [], base_operation_opts = {}, waiter_opts = {}) operation_result = @service_client.withdraw_listing_revision(listing_revision_id, base_operation_opts) use_util = OCI::MarketplacePublisher::Util.respond_to?(:wait_on_work_request) return operation_result if wait_for_states.empty? && !use_util lowered_wait_for_states = wait_for_states.map(&:downcase) wait_for_resource_id = operation_result.headers['opc-work-request-id'] begin if use_util waiter_result = OCI::MarketplacePublisher::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 |