pulp_file_client
PulpFileClient - 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: 1.6.1
- 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_file_client.gemspec
Then either install the gem locally:
gem install ./pulp_file_client-1.6.1.gem
(for development, run gem install --dev ./pulp_file_client-1.6.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 'pulp_file_client', '~> 1.6.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 'pulp_file_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_file_client'
# Setup authorization
PulpFileClient.configure do |config|
# Configure HTTP basic authorization: basicAuth
config.username = 'YOUR_USERNAME'
config.password = 'YOUR_PASSWORD'
end
api_instance = PulpFileClient::ContentFilesApi.new
relative_path = 'relative_path_example' # String | Path where the artifact is located relative to distributions base_path
opts = {
artifact: 'artifact_example', # String | Artifact file representing the physical content
file: File.new('/path/to/file'), # File | An uploaded file that may be turned into the artifact of the content unit.
repository: 'repository_example' # String | A URI of a repository the new content unit should be associated with.
}
begin
#Create a file content
result = api_instance.create(relative_path, opts)
p result
rescue PulpFileClient::ApiError => e
puts "Exception when calling ContentFilesApi->create: #{e}"
end
Documentation for API Endpoints
All URIs are relative to http://pulp
Class | Method | HTTP request | Description |
---|---|---|---|
PulpFileClient::ContentFilesApi | create | POST /pulp/api/v3/content/file/files/ | Create a file content |
PulpFileClient::ContentFilesApi | list | GET /pulp/api/v3/content/file/files/ | List file contents |
PulpFileClient::ContentFilesApi | read | GET file_file_content_href | Inspect a file content |
PulpFileClient::DistributionsFileApi | create | POST /pulp/api/v3/distributions/file/file/ | Create a file distribution |
PulpFileClient::DistributionsFileApi | delete | DELETE file_file_distribution_href | Delete a file distribution |
PulpFileClient::DistributionsFileApi | list | GET /pulp/api/v3/distributions/file/file/ | List file distributions |
PulpFileClient::DistributionsFileApi | partial_update | PATCH file_file_distribution_href | Update a file distribution |
PulpFileClient::DistributionsFileApi | read | GET file_file_distribution_href | Inspect a file distribution |
PulpFileClient::DistributionsFileApi | update | PUT file_file_distribution_href | Update a file distribution |
PulpFileClient::ExportersFileExportsApi | create | POST file_file_filesystem_exporter_hrefexports/ | Create an export |
PulpFileClient::ExportersFileExportsApi | delete | DELETE file_filesystem_export_href | Delete an export |
PulpFileClient::ExportersFileExportsApi | list | GET file_file_filesystem_exporter_hrefexports/ | List exports |
PulpFileClient::ExportersFileExportsApi | read | GET file_filesystem_export_href | Inspect an export |
PulpFileClient::ExportersFilesystemApi | create | POST /pulp/api/v3/exporters/file/filesystem/ | Create a file filesystem exporter |
PulpFileClient::ExportersFilesystemApi | delete | DELETE file_file_filesystem_exporter_href | Delete a file filesystem exporter |
PulpFileClient::ExportersFilesystemApi | list | GET /pulp/api/v3/exporters/file/filesystem/ | List file filesystem exporters |
PulpFileClient::ExportersFilesystemApi | partial_update | PATCH file_file_filesystem_exporter_href | Update a file filesystem exporter |
PulpFileClient::ExportersFilesystemApi | read | GET file_file_filesystem_exporter_href | Inspect a file filesystem exporter |
PulpFileClient::ExportersFilesystemApi | update | PUT file_file_filesystem_exporter_href | Update a file filesystem exporter |
PulpFileClient::PublicationsFileApi | create | POST /pulp/api/v3/publications/file/file/ | Create a file publication |
PulpFileClient::PublicationsFileApi | delete | DELETE file_file_publication_href | Delete a file publication |
PulpFileClient::PublicationsFileApi | list | GET /pulp/api/v3/publications/file/file/ | List file publications |
PulpFileClient::PublicationsFileApi | read | GET file_file_publication_href | Inspect a file publication |
PulpFileClient::RemotesFileApi | create | POST /pulp/api/v3/remotes/file/file/ | Create a file remote |
PulpFileClient::RemotesFileApi | delete | DELETE file_file_remote_href | Delete a file remote |
PulpFileClient::RemotesFileApi | list | GET /pulp/api/v3/remotes/file/file/ | List file remotes |
PulpFileClient::RemotesFileApi | partial_update | PATCH file_file_remote_href | Update a file remote |
PulpFileClient::RemotesFileApi | read | GET file_file_remote_href | Inspect a file remote |
PulpFileClient::RemotesFileApi | update | PUT file_file_remote_href | Update a file remote |
PulpFileClient::RepositoriesFileApi | create | POST /pulp/api/v3/repositories/file/file/ | Create a file repository |
PulpFileClient::RepositoriesFileApi | delete | DELETE file_file_repository_href | Delete a file repository |
PulpFileClient::RepositoriesFileApi | list | GET /pulp/api/v3/repositories/file/file/ | List file repositorys |
PulpFileClient::RepositoriesFileApi | modify | POST file_file_repository_hrefmodify/ | Modify Repository Content |
PulpFileClient::RepositoriesFileApi | partial_update | PATCH file_file_repository_href | Update a file repository |
PulpFileClient::RepositoriesFileApi | read | GET file_file_repository_href | Inspect a file repository |
PulpFileClient::RepositoriesFileApi | sync | POST file_file_repository_hrefsync/ | |
PulpFileClient::RepositoriesFileApi | update | PUT file_file_repository_href | Update a file repository |
PulpFileClient::RepositoriesFileVersionsApi | delete | DELETE file_file_repository_version_href | Delete a repository version |
PulpFileClient::RepositoriesFileVersionsApi | list | GET file_file_repository_hrefversions/ | List repository versions |
PulpFileClient::RepositoriesFileVersionsApi | read | GET file_file_repository_version_href | Inspect a repository version |
PulpFileClient::RepositoriesFileVersionsApi | repair | POST file_file_repository_version_hrefrepair/ |
Documentation for Models
- PulpFileClient::AsyncOperationResponse
- PulpFileClient::ContentSummary
- PulpFileClient::ContentSummaryResponse
- PulpFileClient::ExportResponse
- PulpFileClient::FileFileContent
- PulpFileClient::FileFileContentResponse
- PulpFileClient::FileFileDistribution
- PulpFileClient::FileFileDistributionResponse
- PulpFileClient::FileFileFilesystemExporter
- PulpFileClient::FileFileFilesystemExporterResponse
- PulpFileClient::FileFilePublication
- PulpFileClient::FileFilePublicationResponse
- PulpFileClient::FileFileRemote
- PulpFileClient::FileFileRemoteResponse
- PulpFileClient::FileFileRepository
- PulpFileClient::FileFileRepositoryResponse
- PulpFileClient::PaginatedExportResponseList
- PulpFileClient::PaginatedRepositoryVersionResponseList
- PulpFileClient::PaginatedfileFileContentResponseList
- PulpFileClient::PaginatedfileFileDistributionResponseList
- PulpFileClient::PaginatedfileFileFilesystemExporterResponseList
- PulpFileClient::PaginatedfileFilePublicationResponseList
- PulpFileClient::PaginatedfileFileRemoteResponseList
- PulpFileClient::PaginatedfileFileRepositoryResponseList
- PulpFileClient::PatchedfileFileDistribution
- PulpFileClient::PatchedfileFileFilesystemExporter
- PulpFileClient::PatchedfileFileRemote
- PulpFileClient::PatchedfileFileRepository
- PulpFileClient::PolicyEnum
- PulpFileClient::PublicationExport
- PulpFileClient::RepositoryAddRemoveContent
- PulpFileClient::RepositorySyncURL
- PulpFileClient::RepositoryVersion
- PulpFileClient::RepositoryVersionResponse
Documentation for Authorization
basicAuth
- Type: HTTP basic authentication