Method: PulpcoreClient::RepositoriesOpenpgpKeyringApi#modify_with_http_info

Defined in:
lib/pulpcore_client/api/repositories_openpgp_keyring_api.rb

#modify_with_http_info(open_p_g_p_keyring_href, repository_add_remove_content, opts = {}) ⇒ Array<(AsyncOperationResponse, Integer, Hash)>

Modify Repository Content Trigger an asynchronous task to create a new repository version.

Parameters:

  • open_p_g_p_keyring_href (String)
  • repository_add_remove_content (RepositoryAddRemoveContent)
  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_task_diagnostics (Array<String>)

    List of profilers to use on tasks.

Returns:

  • (Array<(AsyncOperationResponse, Integer, Hash)>)

    AsyncOperationResponse data, response status code and response headers



505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
# File 'lib/pulpcore_client/api/repositories_openpgp_keyring_api.rb', line 505

def modify_with_http_info(open_p_g_p_keyring_href, repository_add_remove_content, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: RepositoriesOpenpgpKeyringApi.modify ...'
  end
  # verify the required parameter 'open_p_g_p_keyring_href' is set
  if @api_client.config.client_side_validation && open_p_g_p_keyring_href.nil?
    fail ArgumentError, "Missing the required parameter 'open_p_g_p_keyring_href' when calling RepositoriesOpenpgpKeyringApi.modify"
  end
  # verify the required parameter 'repository_add_remove_content' is set
  if @api_client.config.client_side_validation && repository_add_remove_content.nil?
    fail ArgumentError, "Missing the required parameter 'repository_add_remove_content' when calling RepositoriesOpenpgpKeyringApi.modify"
  end
  # resource path
  local_var_path = '{open_p_g_p_keyring_href}modify/'.sub('{' + 'open_p_g_p_keyring_href' + '}', CGI.escape(open_p_g_p_keyring_href.to_s).gsub('%2F', '/'))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json', 'application/x-www-form-urlencoded', 'multipart/form-data'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end
  header_params[:'X-Task-Diagnostics'] = @api_client.build_collection_param(opts[:'x_task_diagnostics'], :csv) if !opts[:'x_task_diagnostics'].nil?

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(repository_add_remove_content)

  # return_type
  return_type = opts[:debug_return_type] || 'AsyncOperationResponse'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['basicAuth']

  new_options = opts.merge(
    :operation => :"RepositoriesOpenpgpKeyringApi.modify",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: RepositoriesOpenpgpKeyringApi#modify\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end