pulp_file_client 1.14.3 → 1.14.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -25
- data/docs/AcsFileApi.md +23 -9
- data/docs/ContentFilesApi.md +5 -3
- data/docs/DistributionsFileApi.md +138 -12
- data/docs/FileFileContent.md +3 -3
- data/docs/FileFileDistribution.md +2 -0
- data/docs/FileFileDistributionResponse.md +2 -0
- data/docs/PatchedfileFileDistribution.md +2 -0
- data/docs/PublicationsFileApi.md +15 -9
- data/docs/RemotesFileApi.md +135 -9
- data/docs/RepositoriesFileApi.md +136 -10
- data/docs/RepositoriesFileVersionsApi.md +3 -1
- data/docs/SetLabel.md +19 -0
- data/docs/SetLabelResponse.md +19 -0
- data/docs/UnsetLabel.md +17 -0
- data/docs/UnsetLabelResponse.md +19 -0
- data/lib/pulp_file_client/api/acs_file_api.rb +23 -0
- data/lib/pulp_file_client/api/content_files_api.rb +6 -3
- data/lib/pulp_file_client/api/distributions_file_api.rb +166 -3
- data/lib/pulp_file_client/api/publications_file_api.rb +11 -0
- data/lib/pulp_file_client/api/remotes_file_api.rb +163 -0
- data/lib/pulp_file_client/api/repositories_file_api.rb +163 -0
- data/lib/pulp_file_client/api/repositories_file_versions_api.rb +3 -0
- data/lib/pulp_file_client/configuration.rb +2 -2
- data/lib/pulp_file_client/models/file_file_content.rb +11 -11
- data/lib/pulp_file_client/models/file_file_distribution.rb +13 -1
- data/lib/pulp_file_client/models/file_file_distribution_response.rb +13 -1
- data/lib/pulp_file_client/models/patchedfile_file_distribution.rb +13 -1
- data/lib/pulp_file_client/models/set_label.rb +252 -0
- data/lib/pulp_file_client/models/set_label_response.rb +243 -0
- data/lib/pulp_file_client/models/unset_label.rb +242 -0
- data/lib/pulp_file_client/models/unset_label_response.rb +242 -0
- data/lib/pulp_file_client/version.rb +1 -1
- data/lib/pulp_file_client.rb +4 -0
- data/spec/api/acs_file_api_spec.rb +9 -0
- data/spec/api/content_files_api_spec.rb +2 -1
- data/spec/api/distributions_file_api_spec.rb +36 -1
- data/spec/api/publications_file_api_spec.rb +5 -0
- data/spec/api/remotes_file_api_spec.rb +35 -0
- data/spec/api/repositories_file_api_spec.rb +35 -0
- data/spec/api/repositories_file_versions_api_spec.rb +1 -0
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/file_file_content_spec.rb +4 -4
- data/spec/models/file_file_distribution_response_spec.rb +6 -0
- data/spec/models/file_file_distribution_spec.rb +6 -0
- data/spec/models/patchedfile_file_distribution_spec.rb +6 -0
- data/spec/models/set_label_response_spec.rb +47 -0
- data/spec/models/set_label_spec.rb +47 -0
- data/spec/models/unset_label_response_spec.rb +47 -0
- data/spec/models/unset_label_spec.rb +41 -0
- metadata +50 -34
@@ -0,0 +1,242 @@
|
|
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 PulpFileClient
|
16
|
+
# Serializer for synchronously setting a label.
|
17
|
+
class UnsetLabelResponse
|
18
|
+
attr_accessor :key
|
19
|
+
|
20
|
+
attr_accessor :value
|
21
|
+
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
23
|
+
def self.attribute_map
|
24
|
+
{
|
25
|
+
:'key' => :'key',
|
26
|
+
:'value' => :'value'
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
# Attribute type mapping.
|
31
|
+
def self.openapi_types
|
32
|
+
{
|
33
|
+
:'key' => :'String',
|
34
|
+
:'value' => :'String'
|
35
|
+
}
|
36
|
+
end
|
37
|
+
|
38
|
+
# List of attributes with nullable: true
|
39
|
+
def self.openapi_nullable
|
40
|
+
Set.new([
|
41
|
+
])
|
42
|
+
end
|
43
|
+
|
44
|
+
# Initializes the object
|
45
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
46
|
+
def initialize(attributes = {})
|
47
|
+
if (!attributes.is_a?(Hash))
|
48
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpFileClient::UnsetLabelResponse` initialize method"
|
49
|
+
end
|
50
|
+
|
51
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
52
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
53
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
54
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpFileClient::UnsetLabelResponse`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
55
|
+
end
|
56
|
+
h[k.to_sym] = v
|
57
|
+
}
|
58
|
+
|
59
|
+
if attributes.key?(:'key')
|
60
|
+
self.key = attributes[:'key']
|
61
|
+
end
|
62
|
+
|
63
|
+
if attributes.key?(:'value')
|
64
|
+
self.value = attributes[:'value']
|
65
|
+
end
|
66
|
+
end
|
67
|
+
|
68
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
69
|
+
# @return Array for valid properties with the reasons
|
70
|
+
def list_invalid_properties
|
71
|
+
invalid_properties = Array.new
|
72
|
+
if @key.nil?
|
73
|
+
invalid_properties.push('invalid value for "key", key cannot be nil.')
|
74
|
+
end
|
75
|
+
|
76
|
+
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
77
|
+
if @key !~ pattern
|
78
|
+
invalid_properties.push("invalid value for \"key\", must conform to the pattern #{pattern}.")
|
79
|
+
end
|
80
|
+
|
81
|
+
invalid_properties
|
82
|
+
end
|
83
|
+
|
84
|
+
# Check to see if the all the properties in the model are valid
|
85
|
+
# @return true if the model is valid
|
86
|
+
def valid?
|
87
|
+
return false if @key.nil?
|
88
|
+
return false if @key !~ Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
89
|
+
true
|
90
|
+
end
|
91
|
+
|
92
|
+
# Custom attribute writer method with validation
|
93
|
+
# @param [Object] key Value to be assigned
|
94
|
+
def key=(key)
|
95
|
+
if key.nil?
|
96
|
+
fail ArgumentError, 'key cannot be nil'
|
97
|
+
end
|
98
|
+
|
99
|
+
pattern = Regexp.new(/^[-a-zA-Z0-9_]+$/)
|
100
|
+
if key !~ pattern
|
101
|
+
fail ArgumentError, "invalid value for \"key\", must conform to the pattern #{pattern}."
|
102
|
+
end
|
103
|
+
|
104
|
+
@key = key
|
105
|
+
end
|
106
|
+
|
107
|
+
# Checks equality by comparing each attribute.
|
108
|
+
# @param [Object] Object to be compared
|
109
|
+
def ==(o)
|
110
|
+
return true if self.equal?(o)
|
111
|
+
self.class == o.class &&
|
112
|
+
key == o.key &&
|
113
|
+
value == o.value
|
114
|
+
end
|
115
|
+
|
116
|
+
# @see the `==` method
|
117
|
+
# @param [Object] Object to be compared
|
118
|
+
def eql?(o)
|
119
|
+
self == o
|
120
|
+
end
|
121
|
+
|
122
|
+
# Calculates hash code according to all attributes.
|
123
|
+
# @return [Integer] Hash code
|
124
|
+
def hash
|
125
|
+
[key, value].hash
|
126
|
+
end
|
127
|
+
|
128
|
+
# Builds the object from hash
|
129
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
130
|
+
# @return [Object] Returns the model itself
|
131
|
+
def self.build_from_hash(attributes)
|
132
|
+
new.build_from_hash(attributes)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Builds the object from hash
|
136
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
137
|
+
# @return [Object] Returns the model itself
|
138
|
+
def build_from_hash(attributes)
|
139
|
+
return nil unless attributes.is_a?(Hash)
|
140
|
+
self.class.openapi_types.each_pair do |key, type|
|
141
|
+
if type =~ /\AArray<(.*)>/i
|
142
|
+
# check to ensure the input is an array given that the attribute
|
143
|
+
# is documented as an array but the input is not
|
144
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
145
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
146
|
+
end
|
147
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
148
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
149
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
150
|
+
end
|
151
|
+
|
152
|
+
self
|
153
|
+
end
|
154
|
+
|
155
|
+
# Deserializes the data based on type
|
156
|
+
# @param string type Data type
|
157
|
+
# @param string value Value to be deserialized
|
158
|
+
# @return [Object] Deserialized data
|
159
|
+
def _deserialize(type, value)
|
160
|
+
case type.to_sym
|
161
|
+
when :DateTime
|
162
|
+
DateTime.parse(value)
|
163
|
+
when :Date
|
164
|
+
Date.parse(value)
|
165
|
+
when :String
|
166
|
+
value.to_s
|
167
|
+
when :Integer
|
168
|
+
value.to_i
|
169
|
+
when :Float
|
170
|
+
value.to_f
|
171
|
+
when :Boolean
|
172
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
173
|
+
true
|
174
|
+
else
|
175
|
+
false
|
176
|
+
end
|
177
|
+
when :Object
|
178
|
+
# generic object (usually a Hash), return directly
|
179
|
+
value
|
180
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
181
|
+
inner_type = Regexp.last_match[:inner_type]
|
182
|
+
value.map { |v| _deserialize(inner_type, v) }
|
183
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
184
|
+
k_type = Regexp.last_match[:k_type]
|
185
|
+
v_type = Regexp.last_match[:v_type]
|
186
|
+
{}.tap do |hash|
|
187
|
+
value.each do |k, v|
|
188
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
189
|
+
end
|
190
|
+
end
|
191
|
+
else # model
|
192
|
+
PulpFileClient.const_get(type).build_from_hash(value)
|
193
|
+
end
|
194
|
+
end
|
195
|
+
|
196
|
+
# Returns the string representation of the object
|
197
|
+
# @return [String] String presentation of the object
|
198
|
+
def to_s
|
199
|
+
to_hash.to_s
|
200
|
+
end
|
201
|
+
|
202
|
+
# to_body is an alias to to_hash (backward compatibility)
|
203
|
+
# @return [Hash] Returns the object in the form of hash
|
204
|
+
def to_body
|
205
|
+
to_hash
|
206
|
+
end
|
207
|
+
|
208
|
+
# Returns the object in the form of hash
|
209
|
+
# @return [Hash] Returns the object in the form of hash
|
210
|
+
def to_hash
|
211
|
+
hash = {}
|
212
|
+
self.class.attribute_map.each_pair do |attr, param|
|
213
|
+
value = self.send(attr)
|
214
|
+
if value.nil?
|
215
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
216
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
217
|
+
end
|
218
|
+
|
219
|
+
hash[param] = _to_hash(value)
|
220
|
+
end
|
221
|
+
hash
|
222
|
+
end
|
223
|
+
|
224
|
+
# Outputs non-array value in the form of hash
|
225
|
+
# For object, use to_hash. Otherwise, just return the value
|
226
|
+
# @param [Object] value Any valid value
|
227
|
+
# @return [Hash] Returns the value in the form of hash
|
228
|
+
def _to_hash(value)
|
229
|
+
if value.is_a?(Array)
|
230
|
+
value.compact.map { |v| _to_hash(v) }
|
231
|
+
elsif value.is_a?(Hash)
|
232
|
+
{}.tap do |hash|
|
233
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
234
|
+
end
|
235
|
+
elsif value.respond_to? :to_hash
|
236
|
+
value.to_hash
|
237
|
+
else
|
238
|
+
value
|
239
|
+
end
|
240
|
+
end
|
241
|
+
end
|
242
|
+
end
|
data/lib/pulp_file_client.rb
CHANGED
@@ -52,7 +52,11 @@ require 'pulp_file_client/models/repair'
|
|
52
52
|
require 'pulp_file_client/models/repository_add_remove_content'
|
53
53
|
require 'pulp_file_client/models/repository_sync_url'
|
54
54
|
require 'pulp_file_client/models/repository_version_response'
|
55
|
+
require 'pulp_file_client/models/set_label'
|
56
|
+
require 'pulp_file_client/models/set_label_response'
|
55
57
|
require 'pulp_file_client/models/task_group_operation_response'
|
58
|
+
require 'pulp_file_client/models/unset_label'
|
59
|
+
require 'pulp_file_client/models/unset_label_response'
|
56
60
|
|
57
61
|
# APIs
|
58
62
|
require 'pulp_file_client/api/acs_file_api'
|
@@ -33,6 +33,7 @@ describe 'AcsFileApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for add_role
|
36
|
+
# Add a role
|
36
37
|
# Add a role for this object to users/groups.
|
37
38
|
# @param file_file_alternate_content_source_href
|
38
39
|
# @param nested_role
|
@@ -76,12 +77,17 @@ describe 'AcsFileApi' do
|
|
76
77
|
# @option opts [String] :name Filter results where name matches value
|
77
78
|
# @option opts [String] :name__contains Filter results where name contains value
|
78
79
|
# @option opts [String] :name__icontains Filter results where name contains value
|
80
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
79
81
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
82
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
83
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
84
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
80
85
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
81
86
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
82
87
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `last_refreshed` - Last refreshed * `-last_refreshed` - Last refreshed (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
83
88
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
84
89
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
90
|
+
# @option opts [String] :q
|
85
91
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
86
92
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
87
93
|
# @return [PaginatedfileFileAlternateContentSourceResponseList]
|
@@ -92,6 +98,7 @@ describe 'AcsFileApi' do
|
|
92
98
|
end
|
93
99
|
|
94
100
|
# unit tests for list_roles
|
101
|
+
# List roles
|
95
102
|
# List roles assigned to this object.
|
96
103
|
# @param file_file_alternate_content_source_href
|
97
104
|
# @param [Hash] opts the optional parameters
|
@@ -105,6 +112,7 @@ describe 'AcsFileApi' do
|
|
105
112
|
end
|
106
113
|
|
107
114
|
# unit tests for my_permissions
|
115
|
+
# List user permissions
|
108
116
|
# List permissions available to the current user on this object.
|
109
117
|
# @param file_file_alternate_content_source_href
|
110
118
|
# @param [Hash] opts the optional parameters
|
@@ -157,6 +165,7 @@ describe 'AcsFileApi' do
|
|
157
165
|
end
|
158
166
|
|
159
167
|
# unit tests for remove_role
|
168
|
+
# Remove a role
|
160
169
|
# Remove a role for this object from users/groups.
|
161
170
|
# @param file_file_alternate_content_source_href
|
162
171
|
# @param nested_role
|
@@ -37,9 +37,9 @@ describe 'ContentFilesApi' do
|
|
37
37
|
# Trigger an asynchronous task to create content,optionally create new repository version.
|
38
38
|
# @param relative_path Path where the artifact is located relative to distributions base_path
|
39
39
|
# @param [Hash] opts the optional parameters
|
40
|
+
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
40
41
|
# @option opts [String] :artifact Artifact file representing the physical content
|
41
42
|
# @option opts [File] :file An uploaded file that may be turned into the artifact of the content unit.
|
42
|
-
# @option opts [String] :repository A URI of a repository the new content unit should be associated with.
|
43
43
|
# @option opts [String] :upload An uncommitted upload that may be turned into the artifact of the content unit.
|
44
44
|
# @return [AsyncOperationResponse]
|
45
45
|
describe 'create test' do
|
@@ -57,6 +57,7 @@ describe 'ContentFilesApi' do
|
|
57
57
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `upstream_id` - Upstream id * `-upstream_id` - Upstream id (descending) * `timestamp_of_interest` - Timestamp of interest * `-timestamp_of_interest` - Timestamp of interest (descending) * `relative_path` - Relative path * `-relative_path` - Relative path (descending) * `digest` - Digest * `-digest` - Digest (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
58
58
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
59
59
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
60
|
+
# @option opts [String] :q
|
60
61
|
# @option opts [String] :relative_path Filter results where relative_path matches value
|
61
62
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
62
63
|
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
@@ -33,6 +33,7 @@ describe 'DistributionsFileApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for add_role
|
36
|
+
# Add a role
|
36
37
|
# Add a role for this object to users/groups.
|
37
38
|
# @param file_file_distribution_href
|
38
39
|
# @param nested_role
|
@@ -80,13 +81,18 @@ describe 'DistributionsFileApi' do
|
|
80
81
|
# @option opts [String] :name Filter results where name matches value
|
81
82
|
# @option opts [String] :name__contains Filter results where name contains value
|
82
83
|
# @option opts [String] :name__icontains Filter results where name contains value
|
84
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
83
85
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
86
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
87
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
88
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
84
89
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
85
90
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
86
|
-
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
91
|
+
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `base_path` - Base path * `-base_path` - Base path (descending) * `hidden` - Hidden * `-hidden` - Hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
87
92
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
88
93
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
89
94
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
95
|
+
# @option opts [String] :q
|
90
96
|
# @option opts [String] :repository Filter results where repository matches value
|
91
97
|
# @option opts [Array<String>] :repository__in Filter results where repository is in a comma-separated list of values
|
92
98
|
# @option opts [String] :with_content Filter distributions based on the content served by them
|
@@ -100,6 +106,7 @@ describe 'DistributionsFileApi' do
|
|
100
106
|
end
|
101
107
|
|
102
108
|
# unit tests for list_roles
|
109
|
+
# List roles
|
103
110
|
# List roles assigned to this object.
|
104
111
|
# @param file_file_distribution_href
|
105
112
|
# @param [Hash] opts the optional parameters
|
@@ -113,6 +120,7 @@ describe 'DistributionsFileApi' do
|
|
113
120
|
end
|
114
121
|
|
115
122
|
# unit tests for my_permissions
|
123
|
+
# List user permissions
|
116
124
|
# List permissions available to the current user on this object.
|
117
125
|
# @param file_file_distribution_href
|
118
126
|
# @param [Hash] opts the optional parameters
|
@@ -153,6 +161,7 @@ describe 'DistributionsFileApi' do
|
|
153
161
|
end
|
154
162
|
|
155
163
|
# unit tests for remove_role
|
164
|
+
# Remove a role
|
156
165
|
# Remove a role for this object from users/groups.
|
157
166
|
# @param file_file_distribution_href
|
158
167
|
# @param nested_role
|
@@ -164,6 +173,32 @@ describe 'DistributionsFileApi' do
|
|
164
173
|
end
|
165
174
|
end
|
166
175
|
|
176
|
+
# unit tests for set_label
|
177
|
+
# Set a label
|
178
|
+
# Set a single pulp_label on the object to a specific value or null.
|
179
|
+
# @param file_file_distribution_href
|
180
|
+
# @param set_label
|
181
|
+
# @param [Hash] opts the optional parameters
|
182
|
+
# @return [SetLabelResponse]
|
183
|
+
describe 'set_label test' do
|
184
|
+
it 'should work' do
|
185
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
186
|
+
end
|
187
|
+
end
|
188
|
+
|
189
|
+
# unit tests for unset_label
|
190
|
+
# Unset a label
|
191
|
+
# Unset a single pulp_label on the object.
|
192
|
+
# @param file_file_distribution_href
|
193
|
+
# @param unset_label
|
194
|
+
# @param [Hash] opts the optional parameters
|
195
|
+
# @return [UnsetLabelResponse]
|
196
|
+
describe 'unset_label test' do
|
197
|
+
it 'should work' do
|
198
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
199
|
+
end
|
200
|
+
end
|
201
|
+
|
167
202
|
# unit tests for update
|
168
203
|
# Update a file distribution
|
169
204
|
# Trigger an asynchronous update task
|
@@ -33,6 +33,7 @@ describe 'PublicationsFileApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for add_role
|
36
|
+
# Add a role
|
36
37
|
# Add a role for this object to users/groups.
|
37
38
|
# @param file_file_publication_href
|
38
39
|
# @param nested_role
|
@@ -85,6 +86,7 @@ describe 'PublicationsFileApi' do
|
|
85
86
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
86
87
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
87
88
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
89
|
+
# @option opts [String] :q
|
88
90
|
# @option opts [String] :repository Repository referenced by HREF
|
89
91
|
# @option opts [String] :repository_version Repository Version referenced by HREF
|
90
92
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
@@ -97,6 +99,7 @@ describe 'PublicationsFileApi' do
|
|
97
99
|
end
|
98
100
|
|
99
101
|
# unit tests for list_roles
|
102
|
+
# List roles
|
100
103
|
# List roles assigned to this object.
|
101
104
|
# @param file_file_publication_href
|
102
105
|
# @param [Hash] opts the optional parameters
|
@@ -110,6 +113,7 @@ describe 'PublicationsFileApi' do
|
|
110
113
|
end
|
111
114
|
|
112
115
|
# unit tests for my_permissions
|
116
|
+
# List user permissions
|
113
117
|
# List permissions available to the current user on this object.
|
114
118
|
# @param file_file_publication_href
|
115
119
|
# @param [Hash] opts the optional parameters
|
@@ -137,6 +141,7 @@ describe 'PublicationsFileApi' do
|
|
137
141
|
end
|
138
142
|
|
139
143
|
# unit tests for remove_role
|
144
|
+
# Remove a role
|
140
145
|
# Remove a role for this object from users/groups.
|
141
146
|
# @param file_file_publication_href
|
142
147
|
# @param nested_role
|
@@ -33,6 +33,7 @@ describe 'RemotesFileApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for add_role
|
36
|
+
# Add a role
|
36
37
|
# Add a role for this object to users/groups.
|
37
38
|
# @param file_file_remote_href
|
38
39
|
# @param nested_role
|
@@ -76,7 +77,11 @@ describe 'RemotesFileApi' do
|
|
76
77
|
# @option opts [String] :name Filter results where name matches value
|
77
78
|
# @option opts [String] :name__contains Filter results where name contains value
|
78
79
|
# @option opts [String] :name__icontains Filter results where name contains value
|
80
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
79
81
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
82
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
83
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
84
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
80
85
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
81
86
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
82
87
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `url` - Url * `-url` - Url (descending) * `ca_cert` - Ca cert * `-ca_cert` - Ca cert (descending) * `client_cert` - Client cert * `-client_cert` - Client cert (descending) * `client_key` - Client key * `-client_key` - Client key (descending) * `tls_validation` - Tls validation * `-tls_validation` - Tls validation (descending) * `username` - Username * `-username` - Username (descending) * `password` - Password * `-password` - Password (descending) * `proxy_url` - Proxy url * `-proxy_url` - Proxy url (descending) * `proxy_username` - Proxy username * `-proxy_username` - Proxy username (descending) * `proxy_password` - Proxy password * `-proxy_password` - Proxy password (descending) * `download_concurrency` - Download concurrency * `-download_concurrency` - Download concurrency (descending) * `max_retries` - Max retries * `-max_retries` - Max retries (descending) * `policy` - Policy * `-policy` - Policy (descending) * `total_timeout` - Total timeout * `-total_timeout` - Total timeout (descending) * `connect_timeout` - Connect timeout * `-connect_timeout` - Connect timeout (descending) * `sock_connect_timeout` - Sock connect timeout * `-sock_connect_timeout` - Sock connect timeout (descending) * `sock_read_timeout` - Sock read timeout * `-sock_read_timeout` - Sock read timeout (descending) * `headers` - Headers * `-headers` - Headers (descending) * `rate_limit` - Rate limit * `-rate_limit` - Rate limit (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
@@ -89,6 +94,7 @@ describe 'RemotesFileApi' do
|
|
89
94
|
# @option opts [DateTime] :pulp_last_updated__lt Filter results where pulp_last_updated is less than value
|
90
95
|
# @option opts [DateTime] :pulp_last_updated__lte Filter results where pulp_last_updated is less than or equal to value
|
91
96
|
# @option opts [Array<DateTime>] :pulp_last_updated__range Filter results where pulp_last_updated is between two comma separated values
|
97
|
+
# @option opts [String] :q
|
92
98
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
93
99
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
94
100
|
# @return [PaginatedfileFileRemoteResponseList]
|
@@ -99,6 +105,7 @@ describe 'RemotesFileApi' do
|
|
99
105
|
end
|
100
106
|
|
101
107
|
# unit tests for list_roles
|
108
|
+
# List roles
|
102
109
|
# List roles assigned to this object.
|
103
110
|
# @param file_file_remote_href
|
104
111
|
# @param [Hash] opts the optional parameters
|
@@ -112,6 +119,7 @@ describe 'RemotesFileApi' do
|
|
112
119
|
end
|
113
120
|
|
114
121
|
# unit tests for my_permissions
|
122
|
+
# List user permissions
|
115
123
|
# List permissions available to the current user on this object.
|
116
124
|
# @param file_file_remote_href
|
117
125
|
# @param [Hash] opts the optional parameters
|
@@ -152,6 +160,7 @@ describe 'RemotesFileApi' do
|
|
152
160
|
end
|
153
161
|
|
154
162
|
# unit tests for remove_role
|
163
|
+
# Remove a role
|
155
164
|
# Remove a role for this object from users/groups.
|
156
165
|
# @param file_file_remote_href
|
157
166
|
# @param nested_role
|
@@ -163,6 +172,32 @@ describe 'RemotesFileApi' do
|
|
163
172
|
end
|
164
173
|
end
|
165
174
|
|
175
|
+
# unit tests for set_label
|
176
|
+
# Set a label
|
177
|
+
# Set a single pulp_label on the object to a specific value or null.
|
178
|
+
# @param file_file_remote_href
|
179
|
+
# @param set_label
|
180
|
+
# @param [Hash] opts the optional parameters
|
181
|
+
# @return [SetLabelResponse]
|
182
|
+
describe 'set_label test' do
|
183
|
+
it 'should work' do
|
184
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
185
|
+
end
|
186
|
+
end
|
187
|
+
|
188
|
+
# unit tests for unset_label
|
189
|
+
# Unset a label
|
190
|
+
# Unset a single pulp_label on the object.
|
191
|
+
# @param file_file_remote_href
|
192
|
+
# @param unset_label
|
193
|
+
# @param [Hash] opts the optional parameters
|
194
|
+
# @return [UnsetLabelResponse]
|
195
|
+
describe 'unset_label test' do
|
196
|
+
it 'should work' do
|
197
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
198
|
+
end
|
199
|
+
end
|
200
|
+
|
166
201
|
# unit tests for update
|
167
202
|
# Update a file remote
|
168
203
|
# Trigger an asynchronous update task
|
@@ -33,6 +33,7 @@ describe 'RepositoriesFileApi' do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
# unit tests for add_role
|
36
|
+
# Add a role
|
36
37
|
# Add a role for this object to users/groups.
|
37
38
|
# @param file_file_repository_href
|
38
39
|
# @param nested_role
|
@@ -77,13 +78,18 @@ describe 'RepositoriesFileApi' do
|
|
77
78
|
# @option opts [String] :name Filter results where name matches value
|
78
79
|
# @option opts [String] :name__contains Filter results where name contains value
|
79
80
|
# @option opts [String] :name__icontains Filter results where name contains value
|
81
|
+
# @option opts [String] :name__iexact Filter results where name matches value
|
80
82
|
# @option opts [Array<String>] :name__in Filter results where name is in a comma-separated list of values
|
83
|
+
# @option opts [String] :name__iregex Filter results where name matches regex value
|
84
|
+
# @option opts [String] :name__istartswith Filter results where name starts with value
|
85
|
+
# @option opts [String] :name__regex Filter results where name matches regex value
|
81
86
|
# @option opts [String] :name__startswith Filter results where name starts with value
|
82
87
|
# @option opts [Integer] :offset The initial index from which to return the results.
|
83
88
|
# @option opts [Array<String>] :ordering Ordering * `pulp_id` - Pulp id * `-pulp_id` - Pulp id (descending) * `pulp_created` - Pulp created * `-pulp_created` - Pulp created (descending) * `pulp_last_updated` - Pulp last updated * `-pulp_last_updated` - Pulp last updated (descending) * `pulp_type` - Pulp type * `-pulp_type` - Pulp type (descending) * `name` - Name * `-name` - Name (descending) * `pulp_labels` - Pulp labels * `-pulp_labels` - Pulp labels (descending) * `description` - Description * `-description` - Description (descending) * `next_version` - Next version * `-next_version` - Next version (descending) * `retain_repo_versions` - Retain repo versions * `-retain_repo_versions` - Retain repo versions (descending) * `user_hidden` - User hidden * `-user_hidden` - User hidden (descending) * `pk` - Pk * `-pk` - Pk (descending)
|
84
89
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
85
90
|
# @option opts [Array<String>] :pulp_id__in Multiple values may be separated by commas.
|
86
91
|
# @option opts [String] :pulp_label_select Filter labels by search string
|
92
|
+
# @option opts [String] :q
|
87
93
|
# @option opts [String] :remote Foreign Key referenced by HREF
|
88
94
|
# @option opts [Integer] :retain_repo_versions Filter results where retain_repo_versions matches value
|
89
95
|
# @option opts [Integer] :retain_repo_versions__gt Filter results where retain_repo_versions is greater than value
|
@@ -104,6 +110,7 @@ describe 'RepositoriesFileApi' do
|
|
104
110
|
end
|
105
111
|
|
106
112
|
# unit tests for list_roles
|
113
|
+
# List roles
|
107
114
|
# List roles assigned to this object.
|
108
115
|
# @param file_file_repository_href
|
109
116
|
# @param [Hash] opts the optional parameters
|
@@ -130,6 +137,7 @@ describe 'RepositoriesFileApi' do
|
|
130
137
|
end
|
131
138
|
|
132
139
|
# unit tests for my_permissions
|
140
|
+
# List user permissions
|
133
141
|
# List permissions available to the current user on this object.
|
134
142
|
# @param file_file_repository_href
|
135
143
|
# @param [Hash] opts the optional parameters
|
@@ -170,6 +178,7 @@ describe 'RepositoriesFileApi' do
|
|
170
178
|
end
|
171
179
|
|
172
180
|
# unit tests for remove_role
|
181
|
+
# Remove a role
|
173
182
|
# Remove a role for this object from users/groups.
|
174
183
|
# @param file_file_repository_href
|
175
184
|
# @param nested_role
|
@@ -181,6 +190,19 @@ describe 'RepositoriesFileApi' do
|
|
181
190
|
end
|
182
191
|
end
|
183
192
|
|
193
|
+
# unit tests for set_label
|
194
|
+
# Set a label
|
195
|
+
# Set a single pulp_label on the object to a specific value or null.
|
196
|
+
# @param file_file_repository_href
|
197
|
+
# @param set_label
|
198
|
+
# @param [Hash] opts the optional parameters
|
199
|
+
# @return [SetLabelResponse]
|
200
|
+
describe 'set_label test' do
|
201
|
+
it 'should work' do
|
202
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
203
|
+
end
|
204
|
+
end
|
205
|
+
|
184
206
|
# unit tests for sync
|
185
207
|
# Sync from a remote
|
186
208
|
# Trigger an asynchronous task to sync file content.
|
@@ -194,6 +216,19 @@ describe 'RepositoriesFileApi' do
|
|
194
216
|
end
|
195
217
|
end
|
196
218
|
|
219
|
+
# unit tests for unset_label
|
220
|
+
# Unset a label
|
221
|
+
# Unset a single pulp_label on the object.
|
222
|
+
# @param file_file_repository_href
|
223
|
+
# @param unset_label
|
224
|
+
# @param [Hash] opts the optional parameters
|
225
|
+
# @return [UnsetLabelResponse]
|
226
|
+
describe 'unset_label test' do
|
227
|
+
it 'should work' do
|
228
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
229
|
+
end
|
230
|
+
end
|
231
|
+
|
197
232
|
# unit tests for update
|
198
233
|
# Update a file repository
|
199
234
|
# Trigger an asynchronous update task
|
@@ -67,6 +67,7 @@ describe 'RepositoriesFileVersionsApi' do
|
|
67
67
|
# @option opts [DateTime] :pulp_created__lte Filter results where pulp_created is less than or equal to value
|
68
68
|
# @option opts [Array<DateTime>] :pulp_created__range Filter results where pulp_created is between two comma separated values
|
69
69
|
# @option opts [Array<String>] :pulp_href__in Multiple values may be separated by commas.
|
70
|
+
# @option opts [String] :q
|
70
71
|
# @option opts [Array<String>] :fields A list of fields to include in the response.
|
71
72
|
# @option opts [Array<String>] :exclude_fields A list of fields to exclude from the response.
|
72
73
|
# @return [PaginatedRepositoryVersionResponseList]
|
data/spec/configuration_spec.rb
CHANGED
@@ -18,7 +18,7 @@ describe PulpFileClient::Configuration do
|
|
18
18
|
before(:each) do
|
19
19
|
# uncomment below to setup host and base_path
|
20
20
|
# require 'URI'
|
21
|
-
# uri = URI.parse("
|
21
|
+
# uri = URI.parse("http://pulp")
|
22
22
|
# PulpFileClient.configure do |c|
|
23
23
|
# c.host = uri.host
|
24
24
|
# c.base_path = uri.path
|
@@ -28,14 +28,14 @@ describe PulpFileClient::Configuration do
|
|
28
28
|
describe '#base_url' do
|
29
29
|
it 'should have the default value' do
|
30
30
|
# uncomment below to test default value of the base path
|
31
|
-
# expect(config.base_url).to eq("
|
31
|
+
# expect(config.base_url).to eq("http://pulp")
|
32
32
|
end
|
33
33
|
|
34
34
|
it 'should remove trailing slashes' do
|
35
35
|
[nil, '', '/', '//'].each do |base_path|
|
36
36
|
config.base_path = base_path
|
37
37
|
# uncomment below to test trailing slashes
|
38
|
-
# expect(config.base_url).to eq("
|
38
|
+
# expect(config.base_url).to eq("http://pulp")
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|