pulp_maven_client

PulpMavenClient - 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.16.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_maven_client.gemspec

Then either install the gem locally:

gem install ./pulp_maven_client-0.16.0.gem

(for development, run gem install --dev ./pulp_maven_client-0.16.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_maven_client', '~> 0.16.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_maven_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_maven_client'

# Setup authorization
PulpMavenClient.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 = PulpMavenClient::ContentArtifactApi.new
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
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.
  artifact: 'artifact_example', # String | Artifact file representing the physical content
  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: PulpMavenClient::RemoteNetworkConfig.new # RemoteNetworkConfig | Configuration for the download process (e.g., proxies, auth, timeouts). Only applicable when providing a 'file_url.
}

begin
  #Create a maven artifact
  result = api_instance.create(relative_path, opts)
  p result
rescue PulpMavenClient::ApiError => e
  puts "Exception when calling ContentArtifactApi->create: #{e}"
end

Documentation for API Endpoints

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

Class Method HTTP request Description
PulpMavenClient::ContentArtifactApi create POST /pulp/api/v3/content/maven/artifact/ Create a maven artifact
PulpMavenClient::ContentArtifactApi list GET /pulp/api/v3/content/maven/artifact/ List maven artifacts
PulpMavenClient::ContentArtifactApi read GET maven_maven_artifact_href Inspect a maven artifact
PulpMavenClient::ContentArtifactApi set_label POST maven_maven_artifact_hrefset_label/ Set a label
PulpMavenClient::ContentArtifactApi unset_label POST maven_maven_artifact_hrefunset_label/ Unset a label
PulpMavenClient::ContentArtifactApi upload POST /pulp/api/v3/content/maven/artifact/upload/ Upload a Maven artifact synchronously.
PulpMavenClient::DistributionsMavenApi create POST /pulp/api/v3/distributions/maven/maven/ Create a maven distribution
PulpMavenClient::DistributionsMavenApi delete DELETE maven_maven_distribution_href Delete a maven distribution
PulpMavenClient::DistributionsMavenApi list GET /pulp/api/v3/distributions/maven/maven/ List maven distributions
PulpMavenClient::DistributionsMavenApi partial_update PATCH maven_maven_distribution_href Update a maven distribution
PulpMavenClient::DistributionsMavenApi read GET maven_maven_distribution_href Inspect a maven distribution
PulpMavenClient::DistributionsMavenApi set_label POST maven_maven_distribution_hrefset_label/ Set a label
PulpMavenClient::DistributionsMavenApi unset_label POST maven_maven_distribution_hrefunset_label/ Unset a label
PulpMavenClient::DistributionsMavenApi update PUT maven_maven_distribution_href Update a maven distribution
PulpMavenClient::PulpMavenApi get GET /pulp/maven/name/path
PulpMavenClient::PulpMavenApi put PUT /pulp/maven/name/path
PulpMavenClient::RemotesMavenApi create POST /pulp/api/v3/remotes/maven/maven/ Create a maven remote
PulpMavenClient::RemotesMavenApi delete DELETE maven_maven_remote_href Delete a maven remote
PulpMavenClient::RemotesMavenApi list GET /pulp/api/v3/remotes/maven/maven/ List maven remotes
PulpMavenClient::RemotesMavenApi partial_update PATCH maven_maven_remote_href Update a maven remote
PulpMavenClient::RemotesMavenApi read GET maven_maven_remote_href Inspect a maven remote
PulpMavenClient::RemotesMavenApi set_label POST maven_maven_remote_hrefset_label/ Set a label
PulpMavenClient::RemotesMavenApi unset_label POST maven_maven_remote_hrefunset_label/ Unset a label
PulpMavenClient::RemotesMavenApi update PUT maven_maven_remote_href Update a maven remote
PulpMavenClient::RepositoriesMavenApi add_cached_content POST maven_maven_repository_hrefadd_cached_content/ Add cached content
PulpMavenClient::RepositoriesMavenApi create POST /pulp/api/v3/repositories/maven/maven/ Create a maven repository
PulpMavenClient::RepositoriesMavenApi delete DELETE maven_maven_repository_href Delete a maven repository
PulpMavenClient::RepositoriesMavenApi list GET /pulp/api/v3/repositories/maven/maven/ List maven repositorys
PulpMavenClient::RepositoriesMavenApi modify POST maven_maven_repository_hrefmodify/ Modify Repository Content
PulpMavenClient::RepositoriesMavenApi partial_update PATCH maven_maven_repository_href Update a maven repository
PulpMavenClient::RepositoriesMavenApi read GET maven_maven_repository_href Inspect a maven repository
PulpMavenClient::RepositoriesMavenApi set_label POST maven_maven_repository_hrefset_label/ Set a label
PulpMavenClient::RepositoriesMavenApi unset_label POST maven_maven_repository_hrefunset_label/ Unset a label
PulpMavenClient::RepositoriesMavenApi update PUT maven_maven_repository_href Update a maven repository
PulpMavenClient::RepositoriesMavenVersionsApi delete DELETE maven_maven_repository_version_href Delete a repository version
PulpMavenClient::RepositoriesMavenVersionsApi list GET maven_maven_repository_hrefversions/ List repository versions
PulpMavenClient::RepositoriesMavenVersionsApi read GET maven_maven_repository_version_href Inspect a repository version
PulpMavenClient::RepositoriesMavenVersionsApi repair POST maven_maven_repository_version_hrefrepair/

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

basicAuth

  • Type: HTTP basic authentication