pulpcore_client

PulpcoreClient - the Ruby gem for the Pulp 3 API

No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)

This SDK is automatically generated by the OpenAPI Generator project:

  • API version: v3
  • Package version: 3.0.1
  • Build package: org.openapitools.codegen.languages.RubyClientCodegen

Installation

Build a gem

To build the Ruby code into a gem:

gem build pulpcore_client.gemspec

Then either install the gem locally:

gem install ./pulpcore_client-3.0.1.gem

(for development, run gem install --dev ./pulpcore_client-3.0.1.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 'pulpcore_client', '~> 3.0.1'

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 'pulpcore_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 'pulpcore_client'

# Setup authorization
PulpcoreClient.configure do |config|
  # Configure HTTP basic authorization: Basic
  config.username = 'YOUR_USERNAME'
  config.password = 'YOUR_PASSWORD'
end

api_instance = PulpcoreClient::ArtifactsApi.new
file = File.new('/path/to/file') # File | The stored file.
opts = {
  size: 56, # Integer | The size of the file in bytes.
  md5: 'md5_example', # String | The MD5 checksum of the file if available.
  sha1: 'sha1_example', # String | The SHA-1 checksum of the file if available.
  sha224: 'sha224_example', # String | The SHA-224 checksum of the file if available.
  sha256: 'sha256_example', # String | The SHA-256 checksum of the file if available.
  sha384: 'sha384_example', # String | The SHA-384 checksum of the file if available.
  sha512: 'sha512_example' # String | The SHA-512 checksum of the file if available.
}

begin
  #Create an artifact
  result = api_instance.create(file, opts)
  p result
rescue PulpcoreClient::ApiError => e
  puts "Exception when calling ArtifactsApi->create: #{e}"
end

Documentation for API Endpoints

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

Class Method HTTP request Description
PulpcoreClient::ArtifactsApi create POST /pulp/api/v3/artifacts/ Create an artifact
PulpcoreClient::ArtifactsApi delete DELETE artifact_href Delete an artifact
PulpcoreClient::ArtifactsApi list GET /pulp/api/v3/artifacts/ List artifacts
PulpcoreClient::ArtifactsApi read GET artifact_href Inspect an artifact
PulpcoreClient::OrphansApi delete DELETE /pulp/api/v3/orphans/ Delete orphans
PulpcoreClient::StatusApi status_read GET /pulp/api/v3/status/ Inspect status of Pulp
PulpcoreClient::TasksApi delete DELETE task_href Delete a task
PulpcoreClient::TasksApi list GET /pulp/api/v3/tasks/ List tasks
PulpcoreClient::TasksApi read GET task_href Inspect a task
PulpcoreClient::TasksApi tasks_cancel PATCH task_href Cancel a task
PulpcoreClient::UploadsApi commit POST upload_hrefcommit/ Finish an Upload
PulpcoreClient::UploadsApi create POST /pulp/api/v3/uploads/ Create an upload
PulpcoreClient::UploadsApi delete DELETE upload_href Delete an upload
PulpcoreClient::UploadsApi list GET /pulp/api/v3/uploads/ List uploads
PulpcoreClient::UploadsApi read GET upload_href Inspect an upload
PulpcoreClient::UploadsApi update PUT upload_href Upload a file chunk
PulpcoreClient::WorkersApi list GET /pulp/api/v3/workers/ List workers
PulpcoreClient::WorkersApi read GET worker_href Inspect a worker

Documentation for Models

Documentation for Authorization

Basic

  • Type: HTTP basic authentication