pulp_gem_client

PulpGemClient - the Ruby gem for the Pulp 3 API

Fetch, Upload, Organize, and Distribute Software Packages

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v3
  • Package version: 0.8.0
  • Generator version: 7.10.0
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen For more information, please visit https://pulpproject.org

Installation

Build a gem

To build the Ruby code into a gem:

gem build pulp_gem_client.gemspec

Then either install the gem locally:

gem install ./pulp_gem_client-0.8.0.gem

(for development, run gem install --dev ./pulp_gem_client-0.8.0.gem to install the development dependencies)

or publish the gem to a gem hosting service, e.g. RubyGems.

Finally add this to the Gemfile:

gem 'pulp_gem_client', '~> 0.8.0'

Install from Git

If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:

gem 'pulp_gem_client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'

Include the Ruby code directly

Include the Ruby code directly using -I as follows:

ruby -Ilib script.rb

Getting Started

Please follow the installation procedure and then run the following code:

# Load the gem
require 'pulp_gem_client'

# Setup authorization
PulpGemClient.configure do |config|
  # Configure HTTP basic authorization: basicAuth
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
  # Configure faraday connection
  config.configure_faraday_connection { |connection| 'YOUR CONNECTION CONFIG PROC' }
end

api_instance = PulpGemClient::ContentGemApi.new
opts = {
  x_task_diagnostics: ['inner_example'], # Array<String> | List of profilers to use on tasks.
  repository: 'repository_example', # String | A URI of a repository the new content unit should be associated with.
  overwrite: true, # Boolean | When set to true, existing content in the repository with the same unique key will be silently overwritten. When set to false, the task will fail if content would be overwritten. Only used when 'repository' is specified. Defaults to true.
  pulp_labels: { key: 'inner_example'}, # Hash<String, String> | A dictionary of arbitrary key/value pairs used to describe a specific Content instance.
  file: File.new('/path/to/some/file'), # File | An uploaded file that may be turned into the content unit.
  upload: 'upload_example', # String | An uncommitted upload that may be turned into the content unit.
  file_url: 'file_url_example', # String | A url that Pulp can download and turn into the content unit.
  downloader_config: PulpGemClient::RemoteNetworkConfig.new, # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
  artifact: 'artifact_example' # String | Artifact file representing the physical content
}

begin
  #Create a gem content
  result = api_instance.create(opts)
  p result
rescue PulpGemClient::ApiError => e
  puts "Exception when calling ContentGemApi->create: #{e}"
end

Documentation for API Endpoints

All URIs are relative to http://localhost:24817

Class Method HTTP request Description
PulpGemClient::ContentGemApi create POST /pulp/api/v3/content/gem/gem/ Create a gem content
PulpGemClient::ContentGemApi list GET /pulp/api/v3/content/gem/gem/ List gem contents
PulpGemClient::ContentGemApi read GET gem_gem_content_href Inspect a gem content
PulpGemClient::ContentGemApi set_label POST gem_gem_content_hrefset_label/ Set a label
PulpGemClient::ContentGemApi unset_label POST gem_gem_content_hrefunset_label/ Unset a label
PulpGemClient::DistributionsGemApi add_role POST gem_gem_distribution_hrefadd_role/ Add a role
PulpGemClient::DistributionsGemApi create POST /pulp/api/v3/distributions/gem/gem/ Create a gem distribution
PulpGemClient::DistributionsGemApi delete DELETE gem_gem_distribution_href Delete a gem distribution
PulpGemClient::DistributionsGemApi list GET /pulp/api/v3/distributions/gem/gem/ List gem distributions
PulpGemClient::DistributionsGemApi list_roles GET gem_gem_distribution_hreflist_roles/ List roles
PulpGemClient::DistributionsGemApi my_permissions GET gem_gem_distribution_hrefmy_permissions/ List user permissions
PulpGemClient::DistributionsGemApi partial_update PATCH gem_gem_distribution_href Update a gem distribution
PulpGemClient::DistributionsGemApi read GET gem_gem_distribution_href Inspect a gem distribution
PulpGemClient::DistributionsGemApi remove_role POST gem_gem_distribution_hrefremove_role/ Remove a role
PulpGemClient::DistributionsGemApi set_label POST gem_gem_distribution_hrefset_label/ Set a label
PulpGemClient::DistributionsGemApi unset_label POST gem_gem_distribution_hrefunset_label/ Unset a label
PulpGemClient::DistributionsGemApi update PUT gem_gem_distribution_href Update a gem distribution
PulpGemClient::PublicationsGemApi add_role POST gem_gem_publication_hrefadd_role/ Add a role
PulpGemClient::PublicationsGemApi create POST /pulp/api/v3/publications/gem/gem/ Create a gem publication
PulpGemClient::PublicationsGemApi delete DELETE gem_gem_publication_href Delete a gem publication
PulpGemClient::PublicationsGemApi list GET /pulp/api/v3/publications/gem/gem/ List gem publications
PulpGemClient::PublicationsGemApi list_roles GET gem_gem_publication_hreflist_roles/ List roles
PulpGemClient::PublicationsGemApi my_permissions GET gem_gem_publication_hrefmy_permissions/ List user permissions
PulpGemClient::PublicationsGemApi read GET gem_gem_publication_href Inspect a gem publication
PulpGemClient::PublicationsGemApi remove_role POST gem_gem_publication_hrefremove_role/ Remove a role
PulpGemClient::RemotesGemApi add_role POST gem_gem_remote_hrefadd_role/ Add a role
PulpGemClient::RemotesGemApi create POST /pulp/api/v3/remotes/gem/gem/ Create a gem remote
PulpGemClient::RemotesGemApi delete DELETE gem_gem_remote_href Delete a gem remote
PulpGemClient::RemotesGemApi list GET /pulp/api/v3/remotes/gem/gem/ List gem remotes
PulpGemClient::RemotesGemApi list_roles GET gem_gem_remote_hreflist_roles/ List roles
PulpGemClient::RemotesGemApi my_permissions GET gem_gem_remote_hrefmy_permissions/ List user permissions
PulpGemClient::RemotesGemApi partial_update PATCH gem_gem_remote_href Update a gem remote
PulpGemClient::RemotesGemApi read GET gem_gem_remote_href Inspect a gem remote
PulpGemClient::RemotesGemApi remove_role POST gem_gem_remote_hrefremove_role/ Remove a role
PulpGemClient::RemotesGemApi set_label POST gem_gem_remote_hrefset_label/ Set a label
PulpGemClient::RemotesGemApi unset_label POST gem_gem_remote_hrefunset_label/ Unset a label
PulpGemClient::RemotesGemApi update PUT gem_gem_remote_href Update a gem remote
PulpGemClient::RepositoriesGemApi add_role POST gem_gem_repository_hrefadd_role/ Add a role
PulpGemClient::RepositoriesGemApi create POST /pulp/api/v3/repositories/gem/gem/ Create a gem repository
PulpGemClient::RepositoriesGemApi delete DELETE gem_gem_repository_href Delete a gem repository
PulpGemClient::RepositoriesGemApi list GET /pulp/api/v3/repositories/gem/gem/ List gem repositorys
PulpGemClient::RepositoriesGemApi list_roles GET gem_gem_repository_hreflist_roles/ List roles
PulpGemClient::RepositoriesGemApi modify POST gem_gem_repository_hrefmodify/ Modify Repository Content
PulpGemClient::RepositoriesGemApi my_permissions GET gem_gem_repository_hrefmy_permissions/ List user permissions
PulpGemClient::RepositoriesGemApi partial_update PATCH gem_gem_repository_href Update a gem repository
PulpGemClient::RepositoriesGemApi read GET gem_gem_repository_href Inspect a gem repository
PulpGemClient::RepositoriesGemApi remove_role POST gem_gem_repository_hrefremove_role/ Remove a role
PulpGemClient::RepositoriesGemApi set_label POST gem_gem_repository_hrefset_label/ Set a label
PulpGemClient::RepositoriesGemApi sync POST gem_gem_repository_hrefsync/ Sync from a remote
PulpGemClient::RepositoriesGemApi unset_label POST gem_gem_repository_hrefunset_label/ Unset a label
PulpGemClient::RepositoriesGemApi update PUT gem_gem_repository_href Update a gem repository
PulpGemClient::RepositoriesGemVersionsApi delete DELETE gem_gem_repository_version_href Delete a repository version
PulpGemClient::RepositoriesGemVersionsApi list GET gem_gem_repository_hrefversions/ List repository versions
PulpGemClient::RepositoriesGemVersionsApi read GET gem_gem_repository_version_href Inspect a repository version
PulpGemClient::RepositoriesGemVersionsApi repair POST gem_gem_repository_version_hrefrepair/

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication