pulp_rpm_client 3.0.0b3.dev.1559835992
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of pulp_rpm_client might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +79 -0
- data/README.md +134 -0
- data/Rakefile +10 -0
- data/docs/AsyncOperationResponse.md +17 -0
- data/docs/ContentApi.md +396 -0
- data/docs/DistributionsApi.md +352 -0
- data/docs/InlineResponse200.md +23 -0
- data/docs/InlineResponse2001.md +23 -0
- data/docs/InlineResponse2002.md +23 -0
- data/docs/InlineResponse2003.md +23 -0
- data/docs/InlineResponse2004.md +23 -0
- data/docs/Package.md +95 -0
- data/docs/PublicationsApi.md +229 -0
- data/docs/RemotesApi.md +412 -0
- data/docs/RepositorySyncURL.md +19 -0
- data/docs/RpmApi.md +128 -0
- data/docs/RpmDistribution.md +29 -0
- data/docs/RpmPublication.md +27 -0
- data/docs/RpmRemote.md +47 -0
- data/docs/UpdateRecord.md +55 -0
- data/git_push.sh +55 -0
- data/lib/pulp_rpm_client/api/content_api.rb +482 -0
- data/lib/pulp_rpm_client/api/distributions_api.rb +430 -0
- data/lib/pulp_rpm_client/api/publications_api.rb +273 -0
- data/lib/pulp_rpm_client/api/remotes_api.rb +506 -0
- data/lib/pulp_rpm_client/api/rpm_api.rb +164 -0
- data/lib/pulp_rpm_client/api_client.rb +386 -0
- data/lib/pulp_rpm_client/api_error.rb +57 -0
- data/lib/pulp_rpm_client/configuration.rb +248 -0
- data/lib/pulp_rpm_client/models/async_operation_response.rb +202 -0
- data/lib/pulp_rpm_client/models/inline_response200.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2001.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2002.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2003.rb +235 -0
- data/lib/pulp_rpm_client/models/inline_response2004.rb +235 -0
- data/lib/pulp_rpm_client/models/package.rb +983 -0
- data/lib/pulp_rpm_client/models/repository_sync_url.rb +214 -0
- data/lib/pulp_rpm_client/models/rpm_distribution.rb +337 -0
- data/lib/pulp_rpm_client/models/rpm_publication.rb +258 -0
- data/lib/pulp_rpm_client/models/rpm_remote.rb +549 -0
- data/lib/pulp_rpm_client/models/update_record.rb +764 -0
- data/lib/pulp_rpm_client/version.rb +15 -0
- data/lib/pulp_rpm_client.rb +56 -0
- data/pulp_rpm_client.gemspec +45 -0
- data/spec/api/content_api_spec.rb +137 -0
- data/spec/api/distributions_api_spec.rb +116 -0
- data/spec/api/publications_api_spec.rb +85 -0
- data/spec/api/remotes_api_spec.rb +131 -0
- data/spec/api/rpm_api_spec.rb +63 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/async_operation_response_spec.rb +41 -0
- data/spec/models/inline_response2001_spec.rb +59 -0
- data/spec/models/inline_response2002_spec.rb +59 -0
- data/spec/models/inline_response2003_spec.rb +59 -0
- data/spec/models/inline_response2004_spec.rb +59 -0
- data/spec/models/inline_response200_spec.rb +59 -0
- data/spec/models/package_spec.rb +275 -0
- data/spec/models/repository_sync_url_spec.rb +47 -0
- data/spec/models/rpm_distribution_spec.rb +77 -0
- data/spec/models/rpm_publication_spec.rb +71 -0
- data/spec/models/rpm_remote_spec.rb +135 -0
- data/spec/models/update_record_spec.rb +155 -0
- data/spec/spec_helper.rb +111 -0
- metadata +309 -0
data/docs/RpmApi.md
ADDED
@@ -0,0 +1,128 @@
|
|
1
|
+
# PulpRpmClient::RpmApi
|
2
|
+
|
3
|
+
All URIs are relative to *http://localhost:24817*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**copy_content**](RpmApi.md#copy_content) | **POST** /rpm/copy/ | Copy content
|
8
|
+
[**upload_rpm_package**](RpmApi.md#upload_rpm_package) | **POST** /rpm/upload/ | Upload a package
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
## copy_content
|
13
|
+
|
14
|
+
> AsyncOperationResponse copy_content(dest_repo, opts)
|
15
|
+
|
16
|
+
Copy content
|
17
|
+
|
18
|
+
Trigger an asynchronous task to copy RPM contentfrom one repository into another, creating a newrepository version.
|
19
|
+
|
20
|
+
### Example
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'pulp_rpm_client'
|
25
|
+
# setup authorization
|
26
|
+
PulpRpmClient.configure do |config|
|
27
|
+
# Configure HTTP basic authorization: Basic
|
28
|
+
config.username = 'YOUR USERNAME'
|
29
|
+
config.password = 'YOUR PASSWORD'
|
30
|
+
end
|
31
|
+
|
32
|
+
api_instance = PulpRpmClient::RpmApi.new
|
33
|
+
dest_repo = 'dest_repo_example' # String | A URI of the repository.
|
34
|
+
opts = {
|
35
|
+
source_repo: 'source_repo_example', # String | A URI of the repository.
|
36
|
+
source_repo_version: 'source_repo_version_example', # String | A URI of the repository version
|
37
|
+
types: 'types_example' # Array<String> | A list of types to copy [\"package\", \"advisory\"]
|
38
|
+
}
|
39
|
+
|
40
|
+
begin
|
41
|
+
#Copy content
|
42
|
+
result = api_instance.copy_content(dest_repo, opts)
|
43
|
+
p result
|
44
|
+
rescue PulpRpmClient::ApiError => e
|
45
|
+
puts "Exception when calling RpmApi->copy_content: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
### Parameters
|
50
|
+
|
51
|
+
|
52
|
+
Name | Type | Description | Notes
|
53
|
+
------------- | ------------- | ------------- | -------------
|
54
|
+
**dest_repo** | **String**| A URI of the repository. |
|
55
|
+
**source_repo** | **String**| A URI of the repository. | [optional]
|
56
|
+
**source_repo_version** | **String**| A URI of the repository version | [optional]
|
57
|
+
**types** | [**Array<String>**](String.md)| A list of types to copy [\"package\", \"advisory\"] | [optional]
|
58
|
+
|
59
|
+
### Return type
|
60
|
+
|
61
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
62
|
+
|
63
|
+
### Authorization
|
64
|
+
|
65
|
+
[Basic](../README.md#Basic)
|
66
|
+
|
67
|
+
### HTTP request headers
|
68
|
+
|
69
|
+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
|
70
|
+
- **Accept**: application/json
|
71
|
+
|
72
|
+
|
73
|
+
## upload_rpm_package
|
74
|
+
|
75
|
+
> AsyncOperationResponse upload_rpm_package(file, opts)
|
76
|
+
|
77
|
+
Upload a package
|
78
|
+
|
79
|
+
Create an artifact and trigger an asynchronoustask to create RPM content from it, optionallycreate new repository version.
|
80
|
+
|
81
|
+
### Example
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
# load the gem
|
85
|
+
require 'pulp_rpm_client'
|
86
|
+
# setup authorization
|
87
|
+
PulpRpmClient.configure do |config|
|
88
|
+
# Configure HTTP basic authorization: Basic
|
89
|
+
config.username = 'YOUR USERNAME'
|
90
|
+
config.password = 'YOUR PASSWORD'
|
91
|
+
end
|
92
|
+
|
93
|
+
api_instance = PulpRpmClient::RpmApi.new
|
94
|
+
file = File.new('/path/to/file') # File | The rpm file.
|
95
|
+
opts = {
|
96
|
+
repository: 'repository_example' # String | A URI of the repository.
|
97
|
+
}
|
98
|
+
|
99
|
+
begin
|
100
|
+
#Upload a package
|
101
|
+
result = api_instance.upload_rpm_package(file, opts)
|
102
|
+
p result
|
103
|
+
rescue PulpRpmClient::ApiError => e
|
104
|
+
puts "Exception when calling RpmApi->upload_rpm_package: #{e}"
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
### Parameters
|
109
|
+
|
110
|
+
|
111
|
+
Name | Type | Description | Notes
|
112
|
+
------------- | ------------- | ------------- | -------------
|
113
|
+
**file** | **File**| The rpm file. |
|
114
|
+
**repository** | **String**| A URI of the repository. | [optional]
|
115
|
+
|
116
|
+
### Return type
|
117
|
+
|
118
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
119
|
+
|
120
|
+
### Authorization
|
121
|
+
|
122
|
+
[Basic](../README.md#Basic)
|
123
|
+
|
124
|
+
### HTTP request headers
|
125
|
+
|
126
|
+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
|
127
|
+
- **Accept**: application/json
|
128
|
+
|
@@ -0,0 +1,29 @@
|
|
1
|
+
# PulpRpmClient::RpmDistribution
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**_href** | **String** | | [optional]
|
8
|
+
**_created** | **DateTime** | Timestamp of creation. | [optional]
|
9
|
+
**base_path** | **String** | The base (relative) path component of the published url. Avoid paths that overlap with other distribution base paths (e.g. \"foo\" and \"foo/bar\") |
|
10
|
+
**base_url** | **String** | The URL for accessing the publication as defined by this distribution. | [optional]
|
11
|
+
**content_guard** | **String** | An optional content-guard. | [optional]
|
12
|
+
**name** | **String** | A unique name. Ex, `rawhide` and `stable`. |
|
13
|
+
**publication** | **String** | Publication to be served | [optional]
|
14
|
+
|
15
|
+
## Code Sample
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
require 'PulpRpmClient'
|
19
|
+
|
20
|
+
instance = PulpRpmClient::RpmDistribution.new(_href: null,
|
21
|
+
_created: null,
|
22
|
+
base_path: null,
|
23
|
+
base_url: null,
|
24
|
+
content_guard: null,
|
25
|
+
name: null,
|
26
|
+
publication: null)
|
27
|
+
```
|
28
|
+
|
29
|
+
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# PulpRpmClient::RpmPublication
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**_href** | **String** | | [optional]
|
8
|
+
**_created** | **DateTime** | Timestamp of creation. | [optional]
|
9
|
+
**_type** | **String** | | [optional]
|
10
|
+
**publisher** | **String** | | [optional]
|
11
|
+
**repository_version** | **String** | | [optional]
|
12
|
+
**repository** | **String** | A URI of the repository to be published. | [optional]
|
13
|
+
|
14
|
+
## Code Sample
|
15
|
+
|
16
|
+
```ruby
|
17
|
+
require 'PulpRpmClient'
|
18
|
+
|
19
|
+
instance = PulpRpmClient::RpmPublication.new(_href: null,
|
20
|
+
_created: null,
|
21
|
+
_type: null,
|
22
|
+
publisher: null,
|
23
|
+
repository_version: null,
|
24
|
+
repository: null)
|
25
|
+
```
|
26
|
+
|
27
|
+
|
data/docs/RpmRemote.md
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
# PulpRpmClient::RpmRemote
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**_href** | **String** | | [optional]
|
8
|
+
**_created** | **DateTime** | Timestamp of creation. | [optional]
|
9
|
+
**_type** | **String** | | [optional]
|
10
|
+
**name** | **String** | A unique name for this remote. |
|
11
|
+
**url** | **String** | The URL of an external content source. |
|
12
|
+
**validate** | **Boolean** | If True, the plugin will validate imported artifacts. | [optional]
|
13
|
+
**ssl_ca_certificate** | **String** | A PEM encoded CA certificate used to validate the server certificate presented by the remote server. Returns SHA256 sum on GET. | [optional]
|
14
|
+
**ssl_client_certificate** | **String** | A PEM encoded client certificate used for authentication. Returns SHA256 sum on GET. | [optional]
|
15
|
+
**ssl_client_key** | **String** | A PEM encoded private key used for authentication. Returns SHA256 sum on GET. | [optional]
|
16
|
+
**ssl_validation** | **Boolean** | If True, SSL peer validation must be performed. | [optional]
|
17
|
+
**proxy_url** | **String** | The proxy URL. Format: scheme://user:password@host:port | [optional]
|
18
|
+
**username** | **String** | The username to be used for authentication when syncing. | [optional]
|
19
|
+
**password** | **String** | The password to be used for authentication when syncing. | [optional]
|
20
|
+
**_last_updated** | **DateTime** | Timestamp of the most recent update of the remote. | [optional]
|
21
|
+
**download_concurrency** | **Integer** | Total number of simultaneous connections. | [optional]
|
22
|
+
**policy** | **String** | The policy to use when downloading content. The possible values include: 'immediate', 'on_demand', and 'cache_only'. 'immediate' is the default. | [optional] [default to 'immediate']
|
23
|
+
|
24
|
+
## Code Sample
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'PulpRpmClient'
|
28
|
+
|
29
|
+
instance = PulpRpmClient::RpmRemote.new(_href: null,
|
30
|
+
_created: null,
|
31
|
+
_type: null,
|
32
|
+
name: null,
|
33
|
+
url: null,
|
34
|
+
validate: null,
|
35
|
+
ssl_ca_certificate: null,
|
36
|
+
ssl_client_certificate: null,
|
37
|
+
ssl_client_key: null,
|
38
|
+
ssl_validation: null,
|
39
|
+
proxy_url: null,
|
40
|
+
username: null,
|
41
|
+
password: null,
|
42
|
+
_last_updated: null,
|
43
|
+
download_concurrency: null,
|
44
|
+
policy: null)
|
45
|
+
```
|
46
|
+
|
47
|
+
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# PulpRpmClient::UpdateRecord
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**_href** | **String** | | [optional]
|
8
|
+
**_created** | **DateTime** | Timestamp of creation. | [optional]
|
9
|
+
**_type** | **String** | | [optional]
|
10
|
+
**id** | **String** | Update id (short update name, e.g. RHEA-2013:1777) |
|
11
|
+
**updated_date** | **String** | Date when the update was updated (e.g. '2013-12-02 00:00:00') |
|
12
|
+
**description** | **String** | Update description |
|
13
|
+
**issued_date** | **String** | Date when the update was issued (e.g. '2013-12-02 00:00:00') |
|
14
|
+
**fromstr** | **String** | Source of the update (e.g. security@redhat.com) |
|
15
|
+
**status** | **String** | Update status ('final', ...) |
|
16
|
+
**title** | **String** | Update name |
|
17
|
+
**summary** | **String** | Short summary |
|
18
|
+
**version** | **String** | Update version (probably always an integer number) |
|
19
|
+
**type** | **String** | Update type ('enhancement', 'bugfix', ...) |
|
20
|
+
**severity** | **String** | Severity |
|
21
|
+
**solution** | **String** | Solution |
|
22
|
+
**release** | **String** | Update release |
|
23
|
+
**rights** | **String** | Copyrights |
|
24
|
+
**pushcount** | **String** | Push count |
|
25
|
+
**pkglist** | **Array<String>** | List of packages | [optional]
|
26
|
+
**references** | **Array<String>** | List of references | [optional]
|
27
|
+
|
28
|
+
## Code Sample
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
require 'PulpRpmClient'
|
32
|
+
|
33
|
+
instance = PulpRpmClient::UpdateRecord.new(_href: null,
|
34
|
+
_created: null,
|
35
|
+
_type: null,
|
36
|
+
id: null,
|
37
|
+
updated_date: null,
|
38
|
+
description: null,
|
39
|
+
issued_date: null,
|
40
|
+
fromstr: null,
|
41
|
+
status: null,
|
42
|
+
title: null,
|
43
|
+
summary: null,
|
44
|
+
version: null,
|
45
|
+
type: null,
|
46
|
+
severity: null,
|
47
|
+
solution: null,
|
48
|
+
release: null,
|
49
|
+
rights: null,
|
50
|
+
pushcount: null,
|
51
|
+
pkglist: null,
|
52
|
+
references: null)
|
53
|
+
```
|
54
|
+
|
55
|
+
|
data/git_push.sh
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/bin/sh
|
2
|
+
#
|
3
|
+
# Generated by: https://openapi-generator.tech
|
4
|
+
#
|
5
|
+
# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
|
6
|
+
#
|
7
|
+
# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update"
|
8
|
+
|
9
|
+
git_user_id=$1
|
10
|
+
git_repo_id=$2
|
11
|
+
release_note=$3
|
12
|
+
|
13
|
+
if [ "$git_user_id" = "" ]; then
|
14
|
+
git_user_id="GIT_USER_ID"
|
15
|
+
echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
|
16
|
+
fi
|
17
|
+
|
18
|
+
if [ "$git_repo_id" = "" ]; then
|
19
|
+
git_repo_id="GIT_REPO_ID"
|
20
|
+
echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
|
21
|
+
fi
|
22
|
+
|
23
|
+
if [ "$release_note" = "" ]; then
|
24
|
+
release_note="Minor update"
|
25
|
+
echo "[INFO] No command line input provided. Set \$release_note to $release_note"
|
26
|
+
fi
|
27
|
+
|
28
|
+
# Initialize the local directory as a Git repository
|
29
|
+
git init
|
30
|
+
|
31
|
+
# Adds the files in the local repository and stages them for commit.
|
32
|
+
git add .
|
33
|
+
|
34
|
+
# Commits the tracked changes and prepares them to be pushed to a remote repository.
|
35
|
+
git commit -m "$release_note"
|
36
|
+
|
37
|
+
# Sets the new remote
|
38
|
+
git_remote=`git remote`
|
39
|
+
if [ "$git_remote" = "" ]; then # git remote not defined
|
40
|
+
|
41
|
+
if [ "$GIT_TOKEN" = "" ]; then
|
42
|
+
echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
|
43
|
+
git remote add origin https://github.com/${git_user_id}/${git_repo_id}.git
|
44
|
+
else
|
45
|
+
git remote add origin https://${git_user_id}:${GIT_TOKEN}@github.com/${git_user_id}/${git_repo_id}.git
|
46
|
+
fi
|
47
|
+
|
48
|
+
fi
|
49
|
+
|
50
|
+
git pull origin master
|
51
|
+
|
52
|
+
# Pushes (Forces) the changes in the local repository up to the remote repository
|
53
|
+
echo "Git pushing to https://github.com/${git_user_id}/${git_repo_id}.git"
|
54
|
+
git push origin master 2>&1 | grep -v 'To https'
|
55
|
+
|