pulp_rpm_client 3.17.0.dev1635564366 → 3.17.0.dev1636514325
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 +4 -4
- data/README.md +6 -4
- data/docs/CompsXml.md +21 -0
- data/docs/RpmCompsApi.md +68 -0
- data/lib/pulp_rpm_client/api/rpm_comps_api.rb +93 -0
- data/lib/pulp_rpm_client/models/comps_xml.rb +233 -0
- data/lib/pulp_rpm_client/version.rb +1 -1
- data/lib/pulp_rpm_client.rb +2 -0
- data/spec/api/rpm_comps_api_spec.rb +49 -0
- data/spec/models/comps_xml_spec.rb +53 -0
- metadata +80 -72
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 79a6aa26faebf61663c49171008a98128859d8d35a265cef0de9b972da3ab9b4
|
4
|
+
data.tar.gz: 022d782f6e9a6d822e0db1338d98da04d50e1b78b7b193c4a08c55b0679c1788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b37be2c4215cf44327365aa79079a0dba7b6f259e3b2d090a2ffb2fe1557c43eca37951c153e920cb5f23e1b784b7e45a924786238f5ab2061411484f1922eee
|
7
|
+
data.tar.gz: 9cdaf8e7fbc149660d6a6fb689ea5ef2090e0a323b474b3c0210db4e6a09f26aa01297c3e9b7b68e62d6f4f633207584eb7a1fd009ab90fa97f002a5305b5251
|
data/README.md
CHANGED
@@ -7,7 +7,7 @@ Fetch, Upload, Organize, and Distribute Software Packages
|
|
7
7
|
This SDK is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
|
8
8
|
|
9
9
|
- API version: v3
|
10
|
-
- Package version: 3.17.0.
|
10
|
+
- Package version: 3.17.0.dev1636514325
|
11
11
|
- Build package: org.openapitools.codegen.languages.RubyClientCodegen
|
12
12
|
For more information, please visit [https://pulpproject.org](https://pulpproject.org)
|
13
13
|
|
@@ -24,16 +24,16 @@ gem build pulp_rpm_client.gemspec
|
|
24
24
|
Then either install the gem locally:
|
25
25
|
|
26
26
|
```shell
|
27
|
-
gem install ./pulp_rpm_client-3.17.0.
|
27
|
+
gem install ./pulp_rpm_client-3.17.0.dev1636514325.gem
|
28
28
|
```
|
29
29
|
|
30
|
-
(for development, run `gem install --dev ./pulp_rpm_client-3.17.0.
|
30
|
+
(for development, run `gem install --dev ./pulp_rpm_client-3.17.0.dev1636514325.gem` to install the development dependencies)
|
31
31
|
|
32
32
|
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
33
33
|
|
34
34
|
Finally add this to the Gemfile:
|
35
35
|
|
36
|
-
gem 'pulp_rpm_client', '~> 3.17.0.
|
36
|
+
gem 'pulp_rpm_client', '~> 3.17.0.dev1636514325'
|
37
37
|
|
38
38
|
### Install from Git
|
39
39
|
|
@@ -148,6 +148,7 @@ Class | Method | HTTP request | Description
|
|
148
148
|
*PulpRpmClient::RepositoriesRpmVersionsApi* | [**list**](docs/RepositoriesRpmVersionsApi.md#list) | **GET** {rpm_rpm_repository_href}versions/ | List repository versions
|
149
149
|
*PulpRpmClient::RepositoriesRpmVersionsApi* | [**read**](docs/RepositoriesRpmVersionsApi.md#read) | **GET** {rpm_rpm_repository_version_href} | Inspect a repository version
|
150
150
|
*PulpRpmClient::RepositoriesRpmVersionsApi* | [**repair**](docs/RepositoriesRpmVersionsApi.md#repair) | **POST** {rpm_rpm_repository_version_href}repair/ |
|
151
|
+
*PulpRpmClient::RpmCompsApi* | [**rpm_comps_upload**](docs/RpmCompsApi.md#rpm_comps_upload) | **POST** /pulp/api/v3/rpm/comps/ | Upload comps.xml
|
151
152
|
*PulpRpmClient::RpmCopyApi* | [**copy_content**](docs/RpmCopyApi.md#copy_content) | **POST** /pulp/api/v3/rpm/copy/ | Copy content
|
152
153
|
|
153
154
|
|
@@ -157,6 +158,7 @@ Class | Method | HTTP request | Description
|
|
157
158
|
- [PulpRpmClient::ArtifactResponse](docs/ArtifactResponse.md)
|
158
159
|
- [PulpRpmClient::AsyncOperationResponse](docs/AsyncOperationResponse.md)
|
159
160
|
- [PulpRpmClient::ChecksumResponse](docs/ChecksumResponse.md)
|
161
|
+
- [PulpRpmClient::CompsXml](docs/CompsXml.md)
|
160
162
|
- [PulpRpmClient::ContentSummary](docs/ContentSummary.md)
|
161
163
|
- [PulpRpmClient::ContentSummaryResponse](docs/ContentSummaryResponse.md)
|
162
164
|
- [PulpRpmClient::Copy](docs/Copy.md)
|
data/docs/CompsXml.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# PulpRpmClient::CompsXml
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
Name | Type | Description | Notes
|
6
|
+
------------ | ------------- | ------------- | -------------
|
7
|
+
**file** | **File** | Full path of a comps.xml file that may be parsed into comps.xml Content units. |
|
8
|
+
**repository** | **String** | URI of an RPM repository the comps.xml content units should be associated to. | [optional]
|
9
|
+
**replace** | **Boolean** | If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository. | [optional]
|
10
|
+
|
11
|
+
## Code Sample
|
12
|
+
|
13
|
+
```ruby
|
14
|
+
require 'PulpRpmClient'
|
15
|
+
|
16
|
+
instance = PulpRpmClient::CompsXml.new(file: null,
|
17
|
+
repository: null,
|
18
|
+
replace: null)
|
19
|
+
```
|
20
|
+
|
21
|
+
|
data/docs/RpmCompsApi.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
# PulpRpmClient::RpmCompsApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://pulp*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**rpm_comps_upload**](RpmCompsApi.md#rpm_comps_upload) | **POST** /pulp/api/v3/rpm/comps/ | Upload comps.xml
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
## rpm_comps_upload
|
12
|
+
|
13
|
+
> AsyncOperationResponse rpm_comps_upload(file, opts)
|
14
|
+
|
15
|
+
Upload comps.xml
|
16
|
+
|
17
|
+
Trigger an asynchronous task to upload a comps.xml file.
|
18
|
+
|
19
|
+
### Example
|
20
|
+
|
21
|
+
```ruby
|
22
|
+
# load the gem
|
23
|
+
require 'pulp_rpm_client'
|
24
|
+
# setup authorization
|
25
|
+
PulpRpmClient.configure do |config|
|
26
|
+
# Configure HTTP basic authorization: basicAuth
|
27
|
+
config.username = 'YOUR USERNAME'
|
28
|
+
config.password = 'YOUR PASSWORD'
|
29
|
+
end
|
30
|
+
|
31
|
+
api_instance = PulpRpmClient::RpmCompsApi.new
|
32
|
+
file = File.new('/path/to/file') # File | Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
33
|
+
opts = {
|
34
|
+
repository: 'repository_example', # String | URI of an RPM repository the comps.xml content units should be associated to.
|
35
|
+
replace: true # Boolean | If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
36
|
+
}
|
37
|
+
|
38
|
+
begin
|
39
|
+
#Upload comps.xml
|
40
|
+
result = api_instance.rpm_comps_upload(file, opts)
|
41
|
+
p result
|
42
|
+
rescue PulpRpmClient::ApiError => e
|
43
|
+
puts "Exception when calling RpmCompsApi->rpm_comps_upload: #{e}"
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
### Parameters
|
48
|
+
|
49
|
+
|
50
|
+
Name | Type | Description | Notes
|
51
|
+
------------- | ------------- | ------------- | -------------
|
52
|
+
**file** | **File**| Full path of a comps.xml file that may be parsed into comps.xml Content units. |
|
53
|
+
**repository** | **String**| URI of an RPM repository the comps.xml content units should be associated to. | [optional]
|
54
|
+
**replace** | **Boolean**| If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository. | [optional]
|
55
|
+
|
56
|
+
### Return type
|
57
|
+
|
58
|
+
[**AsyncOperationResponse**](AsyncOperationResponse.md)
|
59
|
+
|
60
|
+
### Authorization
|
61
|
+
|
62
|
+
[basicAuth](../README.md#basicAuth)
|
63
|
+
|
64
|
+
### HTTP request headers
|
65
|
+
|
66
|
+
- **Content-Type**: multipart/form-data, application/x-www-form-urlencoded
|
67
|
+
- **Accept**: application/json
|
68
|
+
|
@@ -0,0 +1,93 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'cgi'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
class RpmCompsApi
|
17
|
+
attr_accessor :api_client
|
18
|
+
|
19
|
+
def initialize(api_client = ApiClient.default)
|
20
|
+
@api_client = api_client
|
21
|
+
end
|
22
|
+
# Upload comps.xml
|
23
|
+
# Trigger an asynchronous task to upload a comps.xml file.
|
24
|
+
# @param file [File] Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
25
|
+
# @param [Hash] opts the optional parameters
|
26
|
+
# @option opts [String] :repository URI of an RPM repository the comps.xml content units should be associated to.
|
27
|
+
# @option opts [Boolean] :replace If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
28
|
+
# @return [AsyncOperationResponse]
|
29
|
+
def rpm_comps_upload(file, opts = {})
|
30
|
+
data, _status_code, _headers = rpm_comps_upload_with_http_info(file, opts)
|
31
|
+
data
|
32
|
+
end
|
33
|
+
|
34
|
+
# Upload comps.xml
|
35
|
+
# Trigger an asynchronous task to upload a comps.xml file.
|
36
|
+
# @param file [File] Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
37
|
+
# @param [Hash] opts the optional parameters
|
38
|
+
# @option opts [String] :repository URI of an RPM repository the comps.xml content units should be associated to.
|
39
|
+
# @option opts [Boolean] :replace If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
40
|
+
# @return [Array<(AsyncOperationResponse, Integer, Hash)>] AsyncOperationResponse data, response status code and response headers
|
41
|
+
def rpm_comps_upload_with_http_info(file, opts = {})
|
42
|
+
if @api_client.config.debugging
|
43
|
+
@api_client.config.logger.debug 'Calling API: RpmCompsApi.rpm_comps_upload ...'
|
44
|
+
end
|
45
|
+
# verify the required parameter 'file' is set
|
46
|
+
if @api_client.config.client_side_validation && file.nil?
|
47
|
+
fail ArgumentError, "Missing the required parameter 'file' when calling RpmCompsApi.rpm_comps_upload"
|
48
|
+
end
|
49
|
+
# resource path
|
50
|
+
local_var_path = '/pulp/api/v3/rpm/comps/'
|
51
|
+
|
52
|
+
# query parameters
|
53
|
+
query_params = opts[:query_params] || {}
|
54
|
+
|
55
|
+
# header parameters
|
56
|
+
header_params = opts[:header_params] || {}
|
57
|
+
# HTTP header 'Accept' (if needed)
|
58
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
59
|
+
# HTTP header 'Content-Type'
|
60
|
+
header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data', 'application/x-www-form-urlencoded'])
|
61
|
+
|
62
|
+
# form parameters
|
63
|
+
form_params = opts[:form_params] || {}
|
64
|
+
form_params['file'] = file
|
65
|
+
form_params['repository'] = opts[:'repository'] if !opts[:'repository'].nil?
|
66
|
+
form_params['replace'] = opts[:'replace'] if !opts[:'replace'].nil?
|
67
|
+
|
68
|
+
# http body (model)
|
69
|
+
post_body = opts[:body]
|
70
|
+
|
71
|
+
# return_type
|
72
|
+
return_type = opts[:return_type] || 'AsyncOperationResponse'
|
73
|
+
|
74
|
+
# auth_names
|
75
|
+
auth_names = opts[:auth_names] || ['basicAuth']
|
76
|
+
|
77
|
+
new_options = opts.merge(
|
78
|
+
:header_params => header_params,
|
79
|
+
:query_params => query_params,
|
80
|
+
:form_params => form_params,
|
81
|
+
:body => post_body,
|
82
|
+
:auth_names => auth_names,
|
83
|
+
:return_type => return_type
|
84
|
+
)
|
85
|
+
|
86
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
87
|
+
if @api_client.config.debugging
|
88
|
+
@api_client.config.logger.debug "API called: RpmCompsApi#rpm_comps_upload\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
89
|
+
end
|
90
|
+
return data, status_code, headers
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,233 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpRpmClient
|
16
|
+
# A serializer for comps.xml Upload API.
|
17
|
+
class CompsXml
|
18
|
+
# Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
19
|
+
attr_accessor :file
|
20
|
+
|
21
|
+
# URI of an RPM repository the comps.xml content units should be associated to.
|
22
|
+
attr_accessor :repository
|
23
|
+
|
24
|
+
# If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
25
|
+
attr_accessor :replace
|
26
|
+
|
27
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
28
|
+
def self.attribute_map
|
29
|
+
{
|
30
|
+
:'file' => :'file',
|
31
|
+
:'repository' => :'repository',
|
32
|
+
:'replace' => :'replace'
|
33
|
+
}
|
34
|
+
end
|
35
|
+
|
36
|
+
# Attribute type mapping.
|
37
|
+
def self.openapi_types
|
38
|
+
{
|
39
|
+
:'file' => :'File',
|
40
|
+
:'repository' => :'String',
|
41
|
+
:'replace' => :'Boolean'
|
42
|
+
}
|
43
|
+
end
|
44
|
+
|
45
|
+
# List of attributes with nullable: true
|
46
|
+
def self.openapi_nullable
|
47
|
+
Set.new([
|
48
|
+
])
|
49
|
+
end
|
50
|
+
|
51
|
+
# Initializes the object
|
52
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
53
|
+
def initialize(attributes = {})
|
54
|
+
if (!attributes.is_a?(Hash))
|
55
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpRpmClient::CompsXml` initialize method"
|
56
|
+
end
|
57
|
+
|
58
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
59
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
60
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
61
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpRpmClient::CompsXml`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
62
|
+
end
|
63
|
+
h[k.to_sym] = v
|
64
|
+
}
|
65
|
+
|
66
|
+
if attributes.key?(:'file')
|
67
|
+
self.file = attributes[:'file']
|
68
|
+
end
|
69
|
+
|
70
|
+
if attributes.key?(:'repository')
|
71
|
+
self.repository = attributes[:'repository']
|
72
|
+
end
|
73
|
+
|
74
|
+
if attributes.key?(:'replace')
|
75
|
+
self.replace = attributes[:'replace']
|
76
|
+
end
|
77
|
+
end
|
78
|
+
|
79
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
80
|
+
# @return Array for valid properties with the reasons
|
81
|
+
def list_invalid_properties
|
82
|
+
invalid_properties = Array.new
|
83
|
+
if @file.nil?
|
84
|
+
invalid_properties.push('invalid value for "file", file cannot be nil.')
|
85
|
+
end
|
86
|
+
|
87
|
+
invalid_properties
|
88
|
+
end
|
89
|
+
|
90
|
+
# Check to see if the all the properties in the model are valid
|
91
|
+
# @return true if the model is valid
|
92
|
+
def valid?
|
93
|
+
return false if @file.nil?
|
94
|
+
true
|
95
|
+
end
|
96
|
+
|
97
|
+
# Checks equality by comparing each attribute.
|
98
|
+
# @param [Object] Object to be compared
|
99
|
+
def ==(o)
|
100
|
+
return true if self.equal?(o)
|
101
|
+
self.class == o.class &&
|
102
|
+
file == o.file &&
|
103
|
+
repository == o.repository &&
|
104
|
+
replace == o.replace
|
105
|
+
end
|
106
|
+
|
107
|
+
# @see the `==` method
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def eql?(o)
|
110
|
+
self == o
|
111
|
+
end
|
112
|
+
|
113
|
+
# Calculates hash code according to all attributes.
|
114
|
+
# @return [Integer] Hash code
|
115
|
+
def hash
|
116
|
+
[file, repository, replace].hash
|
117
|
+
end
|
118
|
+
|
119
|
+
# Builds the object from hash
|
120
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
121
|
+
# @return [Object] Returns the model itself
|
122
|
+
def self.build_from_hash(attributes)
|
123
|
+
new.build_from_hash(attributes)
|
124
|
+
end
|
125
|
+
|
126
|
+
# Builds the object from hash
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
128
|
+
# @return [Object] Returns the model itself
|
129
|
+
def build_from_hash(attributes)
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
131
|
+
self.class.openapi_types.each_pair do |key, type|
|
132
|
+
if type =~ /\AArray<(.*)>/i
|
133
|
+
# check to ensure the input is an array given that the attribute
|
134
|
+
# is documented as an array but the input is not
|
135
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
136
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
137
|
+
end
|
138
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
139
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
140
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
141
|
+
end
|
142
|
+
|
143
|
+
self
|
144
|
+
end
|
145
|
+
|
146
|
+
# Deserializes the data based on type
|
147
|
+
# @param string type Data type
|
148
|
+
# @param string value Value to be deserialized
|
149
|
+
# @return [Object] Deserialized data
|
150
|
+
def _deserialize(type, value)
|
151
|
+
case type.to_sym
|
152
|
+
when :DateTime
|
153
|
+
DateTime.parse(value)
|
154
|
+
when :Date
|
155
|
+
Date.parse(value)
|
156
|
+
when :String
|
157
|
+
value.to_s
|
158
|
+
when :Integer
|
159
|
+
value.to_i
|
160
|
+
when :Float
|
161
|
+
value.to_f
|
162
|
+
when :Boolean
|
163
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
164
|
+
true
|
165
|
+
else
|
166
|
+
false
|
167
|
+
end
|
168
|
+
when :Object
|
169
|
+
# generic object (usually a Hash), return directly
|
170
|
+
value
|
171
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
172
|
+
inner_type = Regexp.last_match[:inner_type]
|
173
|
+
value.map { |v| _deserialize(inner_type, v) }
|
174
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
175
|
+
k_type = Regexp.last_match[:k_type]
|
176
|
+
v_type = Regexp.last_match[:v_type]
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each do |k, v|
|
179
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
180
|
+
end
|
181
|
+
end
|
182
|
+
else # model
|
183
|
+
PulpRpmClient.const_get(type).build_from_hash(value)
|
184
|
+
end
|
185
|
+
end
|
186
|
+
|
187
|
+
# Returns the string representation of the object
|
188
|
+
# @return [String] String presentation of the object
|
189
|
+
def to_s
|
190
|
+
to_hash.to_s
|
191
|
+
end
|
192
|
+
|
193
|
+
# to_body is an alias to to_hash (backward compatibility)
|
194
|
+
# @return [Hash] Returns the object in the form of hash
|
195
|
+
def to_body
|
196
|
+
to_hash
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the object in the form of hash
|
200
|
+
# @return [Hash] Returns the object in the form of hash
|
201
|
+
def to_hash
|
202
|
+
hash = {}
|
203
|
+
self.class.attribute_map.each_pair do |attr, param|
|
204
|
+
value = self.send(attr)
|
205
|
+
if value.nil?
|
206
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
207
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
208
|
+
end
|
209
|
+
|
210
|
+
hash[param] = _to_hash(value)
|
211
|
+
end
|
212
|
+
hash
|
213
|
+
end
|
214
|
+
|
215
|
+
# Outputs non-array value in the form of hash
|
216
|
+
# For object, use to_hash. Otherwise, just return the value
|
217
|
+
# @param [Object] value Any valid value
|
218
|
+
# @return [Hash] Returns the value in the form of hash
|
219
|
+
def _to_hash(value)
|
220
|
+
if value.is_a?(Array)
|
221
|
+
value.compact.map { |v| _to_hash(v) }
|
222
|
+
elsif value.is_a?(Hash)
|
223
|
+
{}.tap do |hash|
|
224
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
225
|
+
end
|
226
|
+
elsif value.respond_to? :to_hash
|
227
|
+
value.to_hash
|
228
|
+
else
|
229
|
+
value
|
230
|
+
end
|
231
|
+
end
|
232
|
+
end
|
233
|
+
end
|
data/lib/pulp_rpm_client.rb
CHANGED
@@ -21,6 +21,7 @@ require 'pulp_rpm_client/models/addon_response'
|
|
21
21
|
require 'pulp_rpm_client/models/artifact_response'
|
22
22
|
require 'pulp_rpm_client/models/async_operation_response'
|
23
23
|
require 'pulp_rpm_client/models/checksum_response'
|
24
|
+
require 'pulp_rpm_client/models/comps_xml'
|
24
25
|
require 'pulp_rpm_client/models/content_summary'
|
25
26
|
require 'pulp_rpm_client/models/content_summary_response'
|
26
27
|
require 'pulp_rpm_client/models/copy'
|
@@ -105,6 +106,7 @@ require 'pulp_rpm_client/api/remotes_rpm_api'
|
|
105
106
|
require 'pulp_rpm_client/api/remotes_uln_api'
|
106
107
|
require 'pulp_rpm_client/api/repositories_rpm_api'
|
107
108
|
require 'pulp_rpm_client/api/repositories_rpm_versions_api'
|
109
|
+
require 'pulp_rpm_client/api/rpm_comps_api'
|
108
110
|
require 'pulp_rpm_client/api/rpm_copy_api'
|
109
111
|
|
110
112
|
module PulpRpmClient
|
@@ -0,0 +1,49 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
|
16
|
+
# Unit tests for PulpRpmClient::RpmCompsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'RpmCompsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = PulpRpmClient::RpmCompsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of RpmCompsApi' do
|
30
|
+
it 'should create an instance of RpmCompsApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(PulpRpmClient::RpmCompsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for rpm_comps_upload
|
36
|
+
# Upload comps.xml
|
37
|
+
# Trigger an asynchronous task to upload a comps.xml file.
|
38
|
+
# @param file Full path of a comps.xml file that may be parsed into comps.xml Content units.
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :repository URI of an RPM repository the comps.xml content units should be associated to.
|
41
|
+
# @option opts [Boolean] :replace If true, incoming comps.xml replaces existing comps-related ContentUnits in the specified repository.
|
42
|
+
# @return [AsyncOperationResponse]
|
43
|
+
describe 'rpm_comps_upload test' do
|
44
|
+
it 'should work' do
|
45
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
46
|
+
end
|
47
|
+
end
|
48
|
+
|
49
|
+
end
|
@@ -0,0 +1,53 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#Fetch, Upload, Organize, and Distribute Software Packages
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
Contact: pulp-list@redhat.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.3.1
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for PulpRpmClient::CompsXml
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe 'CompsXml' do
|
21
|
+
before do
|
22
|
+
# run before each test
|
23
|
+
@instance = PulpRpmClient::CompsXml.new
|
24
|
+
end
|
25
|
+
|
26
|
+
after do
|
27
|
+
# run after each test
|
28
|
+
end
|
29
|
+
|
30
|
+
describe 'test an instance of CompsXml' do
|
31
|
+
it 'should create an instance of CompsXml' do
|
32
|
+
expect(@instance).to be_instance_of(PulpRpmClient::CompsXml)
|
33
|
+
end
|
34
|
+
end
|
35
|
+
describe 'test attribute "file"' do
|
36
|
+
it 'should work' do
|
37
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
describe 'test attribute "repository"' do
|
42
|
+
it 'should work' do
|
43
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
describe 'test attribute "replace"' do
|
48
|
+
it 'should work' do
|
49
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pulp_rpm_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.17.0.
|
4
|
+
version: 3.17.0.dev1636514325
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- OpenAPI-Generator
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-10
|
11
|
+
date: 2021-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: faraday
|
@@ -79,6 +79,7 @@ files:
|
|
79
79
|
- docs/ArtifactResponse.md
|
80
80
|
- docs/AsyncOperationResponse.md
|
81
81
|
- docs/ChecksumResponse.md
|
82
|
+
- docs/CompsXml.md
|
82
83
|
- docs/ContentAdvisoriesApi.md
|
83
84
|
- docs/ContentDistributionTreesApi.md
|
84
85
|
- docs/ContentModulemdDefaultsApi.md
|
@@ -127,6 +128,7 @@ files:
|
|
127
128
|
- docs/RepositoryAddRemoveContent.md
|
128
129
|
- docs/RepositoryVersion.md
|
129
130
|
- docs/RepositoryVersionResponse.md
|
131
|
+
- docs/RpmCompsApi.md
|
130
132
|
- docs/RpmCopyApi.md
|
131
133
|
- docs/RpmDistributionTreeResponse.md
|
132
134
|
- docs/RpmModulemd.md
|
@@ -180,6 +182,7 @@ files:
|
|
180
182
|
- lib/pulp_rpm_client/api/remotes_uln_api.rb
|
181
183
|
- lib/pulp_rpm_client/api/repositories_rpm_api.rb
|
182
184
|
- lib/pulp_rpm_client/api/repositories_rpm_versions_api.rb
|
185
|
+
- lib/pulp_rpm_client/api/rpm_comps_api.rb
|
183
186
|
- lib/pulp_rpm_client/api/rpm_copy_api.rb
|
184
187
|
- lib/pulp_rpm_client/api_client.rb
|
185
188
|
- lib/pulp_rpm_client/api_error.rb
|
@@ -188,6 +191,7 @@ files:
|
|
188
191
|
- lib/pulp_rpm_client/models/artifact_response.rb
|
189
192
|
- lib/pulp_rpm_client/models/async_operation_response.rb
|
190
193
|
- lib/pulp_rpm_client/models/checksum_response.rb
|
194
|
+
- lib/pulp_rpm_client/models/comps_xml.rb
|
191
195
|
- lib/pulp_rpm_client/models/content_summary.rb
|
192
196
|
- lib/pulp_rpm_client/models/content_summary_response.rb
|
193
197
|
- lib/pulp_rpm_client/models/copy.rb
|
@@ -272,6 +276,7 @@ files:
|
|
272
276
|
- spec/api/remotes_uln_api_spec.rb
|
273
277
|
- spec/api/repositories_rpm_api_spec.rb
|
274
278
|
- spec/api/repositories_rpm_versions_api_spec.rb
|
279
|
+
- spec/api/rpm_comps_api_spec.rb
|
275
280
|
- spec/api/rpm_copy_api_spec.rb
|
276
281
|
- spec/api_client_spec.rb
|
277
282
|
- spec/configuration_spec.rb
|
@@ -279,6 +284,7 @@ files:
|
|
279
284
|
- spec/models/artifact_response_spec.rb
|
280
285
|
- spec/models/async_operation_response_spec.rb
|
281
286
|
- spec/models/checksum_response_spec.rb
|
287
|
+
- spec/models/comps_xml_spec.rb
|
282
288
|
- spec/models/content_summary_response_spec.rb
|
283
289
|
- spec/models/content_summary_spec.rb
|
284
290
|
- spec/models/copy_spec.rb
|
@@ -369,93 +375,95 @@ signing_key:
|
|
369
375
|
specification_version: 4
|
370
376
|
summary: Pulp 3 API Ruby Gem
|
371
377
|
test_files:
|
372
|
-
- spec/api/content_packageenvironments_api_spec.rb
|
373
|
-
- spec/api/content_advisories_api_spec.rb
|
374
378
|
- spec/api/remotes_rpm_api_spec.rb
|
375
|
-
- spec/api/content_packagecategories_api_spec.rb
|
376
|
-
- spec/api/content_modulemd_defaults_api_spec.rb
|
377
|
-
- spec/api/distributions_rpm_api_spec.rb
|
378
|
-
- spec/api/remotes_uln_api_spec.rb
|
379
|
-
- spec/api/content_modulemds_api_spec.rb
|
380
379
|
- spec/api/content_packagegroups_api_spec.rb
|
381
|
-
- spec/api/
|
380
|
+
- spec/api/rpm_comps_api_spec.rb
|
381
|
+
- spec/api/content_advisories_api_spec.rb
|
382
|
+
- spec/api/content_modulemd_defaults_api_spec.rb
|
383
|
+
- spec/api/content_packages_api_spec.rb
|
382
384
|
- spec/api/content_distribution_trees_api_spec.rb
|
383
|
-
- spec/api/
|
385
|
+
- spec/api/content_packagecategories_api_spec.rb
|
386
|
+
- spec/api/distributions_rpm_api_spec.rb
|
384
387
|
- spec/api/repositories_rpm_versions_api_spec.rb
|
385
|
-
- spec/api/
|
386
|
-
- spec/api/content_packages_api_spec.rb
|
388
|
+
- spec/api/publications_rpm_api_spec.rb
|
387
389
|
- spec/api/acs_rpm_api_spec.rb
|
390
|
+
- spec/api/content_repo_metadata_files_api_spec.rb
|
391
|
+
- spec/api/remotes_uln_api_spec.rb
|
392
|
+
- spec/api/repositories_rpm_api_spec.rb
|
393
|
+
- spec/api/content_packageenvironments_api_spec.rb
|
388
394
|
- spec/api/rpm_copy_api_spec.rb
|
389
|
-
- spec/api/
|
395
|
+
- spec/api/content_modulemds_api_spec.rb
|
396
|
+
- spec/api/content_packagelangpacks_api_spec.rb
|
390
397
|
- spec/api_client_spec.rb
|
391
398
|
- spec/configuration_spec.rb
|
392
|
-
- spec/models/rpm_uln_remote_response_spec.rb
|
393
|
-
- spec/models/rpm_rpm_remote_spec.rb
|
394
|
-
- spec/models/rpm_package_response_spec.rb
|
395
|
-
- spec/models/content_summary_response_spec.rb
|
396
|
-
- spec/models/variant_response_spec.rb
|
397
|
-
- spec/models/rpm_rpm_publication_response_spec.rb
|
398
|
-
- spec/models/patchedrpm_uln_remote_spec.rb
|
399
|
-
- spec/models/rpm_rpm_publication_spec.rb
|
400
|
-
- spec/models/paginatedrpm_distribution_tree_response_list_spec.rb
|
401
|
-
- spec/models/paginatedrpm_rpm_repository_response_list_spec.rb
|
402
|
-
- spec/models/paginatedrpm_package_langpacks_response_list_spec.rb
|
403
|
-
- spec/models/copy_spec.rb
|
404
|
-
- spec/models/rpm_rpm_distribution_response_spec.rb
|
405
|
-
- spec/models/rpm_package_environment_response_spec.rb
|
406
|
-
- spec/models/rpm_rpm_repository_spec.rb
|
407
|
-
- spec/models/sync_policy_enum_spec.rb
|
408
|
-
- spec/models/rpm_rpm_remote_response_spec.rb
|
409
|
-
- spec/models/rpm_rpm_alternate_content_source_spec.rb
|
410
399
|
- spec/models/rpm_modulemd_defaults_response_spec.rb
|
411
|
-
- spec/models/
|
412
|
-
- spec/models/
|
413
|
-
- spec/models/
|
414
|
-
- spec/models/
|
415
|
-
- spec/models/patchedrpm_rpm_distribution_spec.rb
|
416
|
-
- spec/models/paginatedrpm_package_category_response_list_spec.rb
|
417
|
-
- spec/models/patchedrpm_rpm_repository_spec.rb
|
418
|
-
- spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb
|
400
|
+
- spec/models/rpm_package_langpacks_response_spec.rb
|
401
|
+
- spec/models/paginatedrpm_rpm_remote_response_list_spec.rb
|
402
|
+
- spec/models/variant_response_spec.rb
|
403
|
+
- spec/models/rpm_repo_metadata_file_response_spec.rb
|
419
404
|
- spec/models/paginatedrpm_modulemd_response_list_spec.rb
|
420
|
-
- spec/models/
|
405
|
+
- spec/models/rpm_rpm_alternate_content_source_response_spec.rb
|
406
|
+
- spec/models/checksum_response_spec.rb
|
407
|
+
- spec/models/rpm_rpm_remote_spec.rb
|
408
|
+
- spec/models/paginatedrpm_package_group_response_list_spec.rb
|
409
|
+
- spec/models/package_checksum_type_enum_spec.rb
|
410
|
+
- spec/models/task_group_operation_response_spec.rb
|
411
|
+
- spec/models/artifact_response_spec.rb
|
421
412
|
- spec/models/content_summary_spec.rb
|
422
|
-
- spec/models/rpm_rpm_distribution_spec.rb
|
423
|
-
- spec/models/paginatedrpm_rpm_distribution_response_list_spec.rb
|
424
413
|
- spec/models/paginatedrpm_uln_remote_response_list_spec.rb
|
425
|
-
- spec/models/rpm_distribution_tree_response_spec.rb
|
426
|
-
- spec/models/task_group_operation_response_spec.rb
|
427
|
-
- spec/models/rpm_update_collection_spec.rb
|
428
|
-
- spec/models/skip_types_enum_spec.rb
|
429
|
-
- spec/models/rpm_repo_metadata_file_response_spec.rb
|
430
|
-
- spec/models/image_response_spec.rb
|
431
|
-
- spec/models/policy_enum_spec.rb
|
432
414
|
- spec/models/rpm_rpm_repository_response_spec.rb
|
433
|
-
- spec/models/
|
434
|
-
- spec/models/
|
435
|
-
- spec/models/
|
436
|
-
- spec/models/
|
437
|
-
- spec/models/
|
415
|
+
- spec/models/rpm_update_record_spec.rb
|
416
|
+
- spec/models/rpm_modulemd_spec.rb
|
417
|
+
- spec/models/paginatedrpm_repo_metadata_file_response_list_spec.rb
|
418
|
+
- spec/models/patchedrpm_rpm_repository_spec.rb
|
419
|
+
- spec/models/sync_policy_enum_spec.rb
|
420
|
+
- spec/models/async_operation_response_spec.rb
|
421
|
+
- spec/models/policy_enum_spec.rb
|
422
|
+
- spec/models/paginatedrpm_rpm_repository_response_list_spec.rb
|
423
|
+
- spec/models/rpm_rpm_publication_spec.rb
|
438
424
|
- spec/models/repository_version_spec.rb
|
425
|
+
- spec/models/rpm_package_group_response_spec.rb
|
426
|
+
- spec/models/rpm_package_environment_response_spec.rb
|
427
|
+
- spec/models/paginatedrpm_update_record_response_list_spec.rb
|
428
|
+
- spec/models/rpm_update_collection_response_spec.rb
|
429
|
+
- spec/models/rpm_modulemd_defaults_spec.rb
|
430
|
+
- spec/models/repository_version_response_spec.rb
|
431
|
+
- spec/models/patchedrpm_rpm_alternate_content_source_spec.rb
|
432
|
+
- spec/models/rpm_distribution_tree_response_spec.rb
|
439
433
|
- spec/models/rpm_repository_sync_url_spec.rb
|
440
|
-
- spec/models/
|
441
|
-
- spec/models/
|
442
|
-
- spec/models/
|
443
|
-
- spec/models/
|
444
|
-
- spec/models/
|
434
|
+
- spec/models/rpm_update_collection_spec.rb
|
435
|
+
- spec/models/rpm_rpm_distribution_response_spec.rb
|
436
|
+
- spec/models/paginatedrpm_distribution_tree_response_list_spec.rb
|
437
|
+
- spec/models/paginatedrpm_package_langpacks_response_list_spec.rb
|
438
|
+
- spec/models/metadata_checksum_type_enum_spec.rb
|
439
|
+
- spec/models/rpm_rpm_distribution_spec.rb
|
440
|
+
- spec/models/rpm_package_spec.rb
|
441
|
+
- spec/models/patchedrpm_rpm_distribution_spec.rb
|
442
|
+
- spec/models/copy_spec.rb
|
445
443
|
- spec/models/paginated_repository_version_response_list_spec.rb
|
446
|
-
- spec/models/rpm_update_collection_response_spec.rb
|
447
|
-
- spec/models/artifact_response_spec.rb
|
448
|
-
- spec/models/paginatedrpm_rpm_publication_response_list_spec.rb
|
449
|
-
- spec/models/package_checksum_type_enum_spec.rb
|
450
|
-
- spec/models/paginatedrpm_package_response_list_spec.rb
|
451
|
-
- spec/models/paginatedrpm_update_record_response_list_spec.rb
|
452
|
-
- spec/models/paginatedrpm_rpm_remote_response_list_spec.rb
|
453
444
|
- spec/models/rpm_uln_remote_spec.rb
|
445
|
+
- spec/models/addon_response_spec.rb
|
446
|
+
- spec/models/paginatedrpm_modulemd_defaults_response_list_spec.rb
|
447
|
+
- spec/models/rpm_modulemd_response_spec.rb
|
454
448
|
- spec/models/paginatedrpm_rpm_alternate_content_source_response_list_spec.rb
|
455
|
-
- spec/models/
|
456
|
-
- spec/models/
|
457
|
-
- spec/models/
|
458
|
-
- spec/models/
|
459
|
-
- spec/models/
|
449
|
+
- spec/models/skip_types_enum_spec.rb
|
450
|
+
- spec/models/rpm_rpm_publication_response_spec.rb
|
451
|
+
- spec/models/rpm_rpm_repository_spec.rb
|
452
|
+
- spec/models/paginatedrpm_rpm_publication_response_list_spec.rb
|
453
|
+
- spec/models/paginatedrpm_package_environment_response_list_spec.rb
|
454
|
+
- spec/models/paginatedrpm_package_response_list_spec.rb
|
455
|
+
- spec/models/rpm_package_response_spec.rb
|
456
|
+
- spec/models/rpm_rpm_remote_response_spec.rb
|
457
|
+
- spec/models/image_response_spec.rb
|
458
|
+
- spec/models/rpm_package_category_response_spec.rb
|
459
|
+
- spec/models/patchedrpm_rpm_remote_spec.rb
|
460
|
+
- spec/models/paginatedrpm_package_category_response_list_spec.rb
|
461
|
+
- spec/models/patchedrpm_uln_remote_spec.rb
|
462
|
+
- spec/models/content_summary_response_spec.rb
|
460
463
|
- spec/models/rpm_update_record_response_spec.rb
|
464
|
+
- spec/models/comps_xml_spec.rb
|
465
|
+
- spec/models/repository_add_remove_content_spec.rb
|
466
|
+
- spec/models/rpm_rpm_alternate_content_source_spec.rb
|
467
|
+
- spec/models/paginatedrpm_rpm_distribution_response_list_spec.rb
|
468
|
+
- spec/models/rpm_uln_remote_response_spec.rb
|
461
469
|
- spec/spec_helper.rb
|