pulp_ansible_client 0.9.2 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +9 -5
- data/docs/AnsibleAnsibleRepository.md +3 -3
- data/docs/AnsibleAnsibleRepositoryResponse.md +3 -3
- data/docs/AnsibleCollection.md +19 -0
- data/docs/AnsibleCollectionVersionResponse.md +4 -4
- data/docs/AnsibleCollectionsApi.md +1 -1
- data/docs/AnsibleCopyApi.md +1 -1
- data/docs/AnsibleRoleResponse.md +3 -3
- data/docs/ApiCollectionsApi.md +1 -1
- data/docs/ApiRolesApi.md +1 -1
- data/docs/CollectionImportApi.md +1 -1
- data/docs/ContentCollectionDeprecationsApi.md +192 -0
- data/docs/ContentCollectionVersionsApi.md +1 -1
- data/docs/ContentRolesApi.md +1 -1
- data/docs/DistributionsAnsibleApi.md +1 -1
- data/docs/GalaxyDetailApi.md +1 -1
- data/docs/PatchedansibleAnsibleRepository.md +3 -3
- data/docs/PulpAnsibleApiApi.md +1 -1
- data/docs/PulpAnsibleApiV2CollectionsVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3Api.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionVersionsAllApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsAllApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsApi.md +4 -4
- data/docs/PulpAnsibleApiV3CollectionsVersionsApi.md +1 -1
- data/docs/PulpAnsibleApiV3CollectionsVersionsDocsBlobApi.md +1 -1
- data/docs/PulpAnsibleArtifactsCollectionsV3Api.md +1 -1
- data/docs/PulpAnsibleTagsApi.md +1 -1
- data/docs/RemotesCollectionApi.md +1 -1
- data/docs/RemotesRoleApi.md +1 -1
- data/docs/RepositoriesAnsibleApi.md +1 -1
- data/docs/RepositoriesAnsibleVersionsApi.md +1 -1
- data/docs/VersionsApi.md +1 -1
- data/lib/pulp_ansible_client/api/content_collection_deprecations_api.rb +234 -0
- data/lib/pulp_ansible_client/api/pulp_ansible_api_v3_collections_api.rb +5 -5
- data/lib/pulp_ansible_client/configuration.rb +2 -2
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +17 -16
- data/lib/pulp_ansible_client/models/ansible_ansible_repository_response.rb +17 -16
- data/lib/pulp_ansible_client/models/ansible_collection.rb +228 -0
- data/lib/pulp_ansible_client/models/ansible_collection_version_response.rb +13 -15
- data/lib/pulp_ansible_client/models/ansible_role_response.rb +11 -11
- data/lib/pulp_ansible_client/models/patchedansible_ansible_repository.rb +17 -16
- data/lib/pulp_ansible_client/version.rb +1 -1
- data/lib/pulp_ansible_client.rb +2 -0
- data/spec/api/content_collection_deprecations_api_spec.rb +80 -0
- data/spec/api/pulp_ansible_api_v3_collections_api_spec.rb +2 -2
- data/spec/configuration_spec.rb +3 -3
- data/spec/models/ansible_ansible_repository_response_spec.rb +1 -1
- data/spec/models/ansible_ansible_repository_spec.rb +1 -1
- data/spec/models/ansible_collection_spec.rb +47 -0
- data/spec/models/ansible_collection_version_response_spec.rb +3 -3
- data/spec/models/ansible_role_response_spec.rb +3 -3
- data/spec/models/patchedansible_ansible_repository_spec.rb +1 -1
- metadata +79 -71
@@ -0,0 +1,228 @@
|
|
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 PulpAnsibleClient
|
16
|
+
# A serializer for Ansible Collections.
|
17
|
+
class AnsibleCollection
|
18
|
+
# The name of the Collection.
|
19
|
+
attr_accessor :name
|
20
|
+
|
21
|
+
# The namespace of the Collection.
|
22
|
+
attr_accessor :namespace
|
23
|
+
|
24
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
25
|
+
def self.attribute_map
|
26
|
+
{
|
27
|
+
:'name' => :'name',
|
28
|
+
:'namespace' => :'namespace'
|
29
|
+
}
|
30
|
+
end
|
31
|
+
|
32
|
+
# Attribute type mapping.
|
33
|
+
def self.openapi_types
|
34
|
+
{
|
35
|
+
:'name' => :'String',
|
36
|
+
:'namespace' => :'String'
|
37
|
+
}
|
38
|
+
end
|
39
|
+
|
40
|
+
# List of attributes with nullable: true
|
41
|
+
def self.openapi_nullable
|
42
|
+
Set.new([
|
43
|
+
])
|
44
|
+
end
|
45
|
+
|
46
|
+
# Initializes the object
|
47
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
48
|
+
def initialize(attributes = {})
|
49
|
+
if (!attributes.is_a?(Hash))
|
50
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::AnsibleCollection` initialize method"
|
51
|
+
end
|
52
|
+
|
53
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
54
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
55
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
56
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::AnsibleCollection`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
57
|
+
end
|
58
|
+
h[k.to_sym] = v
|
59
|
+
}
|
60
|
+
|
61
|
+
if attributes.key?(:'name')
|
62
|
+
self.name = attributes[:'name']
|
63
|
+
end
|
64
|
+
|
65
|
+
if attributes.key?(:'namespace')
|
66
|
+
self.namespace = attributes[:'namespace']
|
67
|
+
end
|
68
|
+
end
|
69
|
+
|
70
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
71
|
+
# @return Array for valid properties with the reasons
|
72
|
+
def list_invalid_properties
|
73
|
+
invalid_properties = Array.new
|
74
|
+
if @name.nil?
|
75
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
76
|
+
end
|
77
|
+
|
78
|
+
if @namespace.nil?
|
79
|
+
invalid_properties.push('invalid value for "namespace", namespace cannot be nil.')
|
80
|
+
end
|
81
|
+
|
82
|
+
invalid_properties
|
83
|
+
end
|
84
|
+
|
85
|
+
# Check to see if the all the properties in the model are valid
|
86
|
+
# @return true if the model is valid
|
87
|
+
def valid?
|
88
|
+
return false if @name.nil?
|
89
|
+
return false if @namespace.nil?
|
90
|
+
true
|
91
|
+
end
|
92
|
+
|
93
|
+
# Checks equality by comparing each attribute.
|
94
|
+
# @param [Object] Object to be compared
|
95
|
+
def ==(o)
|
96
|
+
return true if self.equal?(o)
|
97
|
+
self.class == o.class &&
|
98
|
+
name == o.name &&
|
99
|
+
namespace == o.namespace
|
100
|
+
end
|
101
|
+
|
102
|
+
# @see the `==` method
|
103
|
+
# @param [Object] Object to be compared
|
104
|
+
def eql?(o)
|
105
|
+
self == o
|
106
|
+
end
|
107
|
+
|
108
|
+
# Calculates hash code according to all attributes.
|
109
|
+
# @return [Integer] Hash code
|
110
|
+
def hash
|
111
|
+
[name, namespace].hash
|
112
|
+
end
|
113
|
+
|
114
|
+
# Builds the object from hash
|
115
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
116
|
+
# @return [Object] Returns the model itself
|
117
|
+
def self.build_from_hash(attributes)
|
118
|
+
new.build_from_hash(attributes)
|
119
|
+
end
|
120
|
+
|
121
|
+
# Builds the object from hash
|
122
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
123
|
+
# @return [Object] Returns the model itself
|
124
|
+
def build_from_hash(attributes)
|
125
|
+
return nil unless attributes.is_a?(Hash)
|
126
|
+
self.class.openapi_types.each_pair do |key, type|
|
127
|
+
if type =~ /\AArray<(.*)>/i
|
128
|
+
# check to ensure the input is an array given that the attribute
|
129
|
+
# is documented as an array but the input is not
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
131
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
132
|
+
end
|
133
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
134
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
135
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
136
|
+
end
|
137
|
+
|
138
|
+
self
|
139
|
+
end
|
140
|
+
|
141
|
+
# Deserializes the data based on type
|
142
|
+
# @param string type Data type
|
143
|
+
# @param string value Value to be deserialized
|
144
|
+
# @return [Object] Deserialized data
|
145
|
+
def _deserialize(type, value)
|
146
|
+
case type.to_sym
|
147
|
+
when :DateTime
|
148
|
+
DateTime.parse(value)
|
149
|
+
when :Date
|
150
|
+
Date.parse(value)
|
151
|
+
when :String
|
152
|
+
value.to_s
|
153
|
+
when :Integer
|
154
|
+
value.to_i
|
155
|
+
when :Float
|
156
|
+
value.to_f
|
157
|
+
when :Boolean
|
158
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
159
|
+
true
|
160
|
+
else
|
161
|
+
false
|
162
|
+
end
|
163
|
+
when :Object
|
164
|
+
# generic object (usually a Hash), return directly
|
165
|
+
value
|
166
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
167
|
+
inner_type = Regexp.last_match[:inner_type]
|
168
|
+
value.map { |v| _deserialize(inner_type, v) }
|
169
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
170
|
+
k_type = Regexp.last_match[:k_type]
|
171
|
+
v_type = Regexp.last_match[:v_type]
|
172
|
+
{}.tap do |hash|
|
173
|
+
value.each do |k, v|
|
174
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
175
|
+
end
|
176
|
+
end
|
177
|
+
else # model
|
178
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
179
|
+
end
|
180
|
+
end
|
181
|
+
|
182
|
+
# Returns the string representation of the object
|
183
|
+
# @return [String] String presentation of the object
|
184
|
+
def to_s
|
185
|
+
to_hash.to_s
|
186
|
+
end
|
187
|
+
|
188
|
+
# to_body is an alias to to_hash (backward compatibility)
|
189
|
+
# @return [Hash] Returns the object in the form of hash
|
190
|
+
def to_body
|
191
|
+
to_hash
|
192
|
+
end
|
193
|
+
|
194
|
+
# Returns the object in the form of hash
|
195
|
+
# @return [Hash] Returns the object in the form of hash
|
196
|
+
def to_hash
|
197
|
+
hash = {}
|
198
|
+
self.class.attribute_map.each_pair do |attr, param|
|
199
|
+
value = self.send(attr)
|
200
|
+
if value.nil?
|
201
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
202
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
203
|
+
end
|
204
|
+
|
205
|
+
hash[param] = _to_hash(value)
|
206
|
+
end
|
207
|
+
hash
|
208
|
+
end
|
209
|
+
|
210
|
+
# Outputs non-array value in the form of hash
|
211
|
+
# For object, use to_hash. Otherwise, just return the value
|
212
|
+
# @param [Object] value Any valid value
|
213
|
+
# @return [Hash] Returns the value in the form of hash
|
214
|
+
def _to_hash(value)
|
215
|
+
if value.is_a?(Array)
|
216
|
+
value.compact.map { |v| _to_hash(v) }
|
217
|
+
elsif value.is_a?(Hash)
|
218
|
+
{}.tap do |hash|
|
219
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
220
|
+
end
|
221
|
+
elsif value.respond_to? :to_hash
|
222
|
+
value.to_hash
|
223
|
+
else
|
224
|
+
value
|
225
|
+
end
|
226
|
+
end
|
227
|
+
end
|
228
|
+
end
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module PulpAnsibleClient
|
16
16
|
# A serializer for CollectionVersion Content.
|
17
17
|
class AnsibleCollectionVersionResponse
|
18
|
+
# Artifact file representing the physical content
|
19
|
+
attr_accessor :artifact
|
20
|
+
|
18
21
|
# Timestamp of creation.
|
19
22
|
attr_accessor :pulp_created
|
20
23
|
|
21
24
|
attr_accessor :pulp_href
|
22
25
|
|
23
|
-
# Artifact file representing the physical content
|
24
|
-
attr_accessor :artifact
|
25
|
-
|
26
26
|
# The MD5 checksum if available.
|
27
27
|
attr_accessor :md5
|
28
28
|
|
@@ -97,9 +97,9 @@ module PulpAnsibleClient
|
|
97
97
|
# Attribute mapping from ruby-style variable name to JSON key.
|
98
98
|
def self.attribute_map
|
99
99
|
{
|
100
|
+
:'artifact' => :'artifact',
|
100
101
|
:'pulp_created' => :'pulp_created',
|
101
102
|
:'pulp_href' => :'pulp_href',
|
102
|
-
:'artifact' => :'artifact',
|
103
103
|
:'md5' => :'md5',
|
104
104
|
:'sha1' => :'sha1',
|
105
105
|
:'sha224' => :'sha224',
|
@@ -130,9 +130,9 @@ module PulpAnsibleClient
|
|
130
130
|
# Attribute type mapping.
|
131
131
|
def self.openapi_types
|
132
132
|
{
|
133
|
+
:'artifact' => :'String',
|
133
134
|
:'pulp_created' => :'DateTime',
|
134
135
|
:'pulp_href' => :'String',
|
135
|
-
:'artifact' => :'String',
|
136
136
|
:'md5' => :'String',
|
137
137
|
:'sha1' => :'String',
|
138
138
|
:'sha224' => :'String',
|
@@ -141,7 +141,7 @@ module PulpAnsibleClient
|
|
141
141
|
:'sha512' => :'String',
|
142
142
|
:'id' => :'String',
|
143
143
|
:'authors' => :'Array<String>',
|
144
|
-
:'contents' => :'
|
144
|
+
:'contents' => :'Object',
|
145
145
|
:'dependencies' => :'Object',
|
146
146
|
:'description' => :'String',
|
147
147
|
:'docs_blob' => :'Object',
|
@@ -182,6 +182,10 @@ module PulpAnsibleClient
|
|
182
182
|
h[k.to_sym] = v
|
183
183
|
}
|
184
184
|
|
185
|
+
if attributes.key?(:'artifact')
|
186
|
+
self.artifact = attributes[:'artifact']
|
187
|
+
end
|
188
|
+
|
185
189
|
if attributes.key?(:'pulp_created')
|
186
190
|
self.pulp_created = attributes[:'pulp_created']
|
187
191
|
end
|
@@ -190,10 +194,6 @@ module PulpAnsibleClient
|
|
190
194
|
self.pulp_href = attributes[:'pulp_href']
|
191
195
|
end
|
192
196
|
|
193
|
-
if attributes.key?(:'artifact')
|
194
|
-
self.artifact = attributes[:'artifact']
|
195
|
-
end
|
196
|
-
|
197
197
|
if attributes.key?(:'md5')
|
198
198
|
self.md5 = attributes[:'md5']
|
199
199
|
end
|
@@ -229,9 +229,7 @@ module PulpAnsibleClient
|
|
229
229
|
end
|
230
230
|
|
231
231
|
if attributes.key?(:'contents')
|
232
|
-
|
233
|
-
self.contents = value
|
234
|
-
end
|
232
|
+
self.contents = attributes[:'contents']
|
235
233
|
end
|
236
234
|
|
237
235
|
if attributes.key?(:'dependencies')
|
@@ -550,9 +548,9 @@ module PulpAnsibleClient
|
|
550
548
|
def ==(o)
|
551
549
|
return true if self.equal?(o)
|
552
550
|
self.class == o.class &&
|
551
|
+
artifact == o.artifact &&
|
553
552
|
pulp_created == o.pulp_created &&
|
554
553
|
pulp_href == o.pulp_href &&
|
555
|
-
artifact == o.artifact &&
|
556
554
|
md5 == o.md5 &&
|
557
555
|
sha1 == o.sha1 &&
|
558
556
|
sha224 == o.sha224 &&
|
@@ -588,7 +586,7 @@ module PulpAnsibleClient
|
|
588
586
|
# Calculates hash code according to all attributes.
|
589
587
|
# @return [Integer] Hash code
|
590
588
|
def hash
|
591
|
-
[pulp_created, pulp_href,
|
589
|
+
[artifact, pulp_created, pulp_href, md5, sha1, sha224, sha256, sha384, sha512, id, authors, contents, dependencies, description, docs_blob, manifest, files, documentation, homepage, issues, license, name, namespace, repository, tags, version, requires_ansible].hash
|
592
590
|
end
|
593
591
|
|
594
592
|
# Builds the object from hash
|
@@ -15,14 +15,14 @@ require 'date'
|
|
15
15
|
module PulpAnsibleClient
|
16
16
|
# A serializer for Role versions.
|
17
17
|
class AnsibleRoleResponse
|
18
|
+
# Artifact file representing the physical content
|
19
|
+
attr_accessor :artifact
|
20
|
+
|
18
21
|
# Timestamp of creation.
|
19
22
|
attr_accessor :pulp_created
|
20
23
|
|
21
24
|
attr_accessor :pulp_href
|
22
25
|
|
23
|
-
# Artifact file representing the physical content
|
24
|
-
attr_accessor :artifact
|
25
|
-
|
26
26
|
attr_accessor :version
|
27
27
|
|
28
28
|
attr_accessor :name
|
@@ -32,9 +32,9 @@ module PulpAnsibleClient
|
|
32
32
|
# Attribute mapping from ruby-style variable name to JSON key.
|
33
33
|
def self.attribute_map
|
34
34
|
{
|
35
|
+
:'artifact' => :'artifact',
|
35
36
|
:'pulp_created' => :'pulp_created',
|
36
37
|
:'pulp_href' => :'pulp_href',
|
37
|
-
:'artifact' => :'artifact',
|
38
38
|
:'version' => :'version',
|
39
39
|
:'name' => :'name',
|
40
40
|
:'namespace' => :'namespace'
|
@@ -44,9 +44,9 @@ module PulpAnsibleClient
|
|
44
44
|
# Attribute type mapping.
|
45
45
|
def self.openapi_types
|
46
46
|
{
|
47
|
+
:'artifact' => :'String',
|
47
48
|
:'pulp_created' => :'DateTime',
|
48
49
|
:'pulp_href' => :'String',
|
49
|
-
:'artifact' => :'String',
|
50
50
|
:'version' => :'String',
|
51
51
|
:'name' => :'String',
|
52
52
|
:'namespace' => :'String'
|
@@ -74,6 +74,10 @@ module PulpAnsibleClient
|
|
74
74
|
h[k.to_sym] = v
|
75
75
|
}
|
76
76
|
|
77
|
+
if attributes.key?(:'artifact')
|
78
|
+
self.artifact = attributes[:'artifact']
|
79
|
+
end
|
80
|
+
|
77
81
|
if attributes.key?(:'pulp_created')
|
78
82
|
self.pulp_created = attributes[:'pulp_created']
|
79
83
|
end
|
@@ -82,10 +86,6 @@ module PulpAnsibleClient
|
|
82
86
|
self.pulp_href = attributes[:'pulp_href']
|
83
87
|
end
|
84
88
|
|
85
|
-
if attributes.key?(:'artifact')
|
86
|
-
self.artifact = attributes[:'artifact']
|
87
|
-
end
|
88
|
-
|
89
89
|
if attributes.key?(:'version')
|
90
90
|
self.version = attributes[:'version']
|
91
91
|
end
|
@@ -137,9 +137,9 @@ module PulpAnsibleClient
|
|
137
137
|
def ==(o)
|
138
138
|
return true if self.equal?(o)
|
139
139
|
self.class == o.class &&
|
140
|
+
artifact == o.artifact &&
|
140
141
|
pulp_created == o.pulp_created &&
|
141
142
|
pulp_href == o.pulp_href &&
|
142
|
-
artifact == o.artifact &&
|
143
143
|
version == o.version &&
|
144
144
|
name == o.name &&
|
145
145
|
namespace == o.namespace
|
@@ -154,7 +154,7 @@ module PulpAnsibleClient
|
|
154
154
|
# Calculates hash code according to all attributes.
|
155
155
|
# @return [Integer] Hash code
|
156
156
|
def hash
|
157
|
-
[pulp_created, pulp_href,
|
157
|
+
[artifact, pulp_created, pulp_href, version, name, namespace].hash
|
158
158
|
end
|
159
159
|
|
160
160
|
# Builds the object from hash
|
@@ -24,8 +24,9 @@ module PulpAnsibleClient
|
|
24
24
|
attr_accessor :description
|
25
25
|
|
26
26
|
# Retain X versions of the repository. Default is null which retains all versions. This is provided as a tech preview in Pulp 3 and may change in the future.
|
27
|
-
attr_accessor :
|
27
|
+
attr_accessor :retain_repo_versions
|
28
28
|
|
29
|
+
# An optional remote to use by default when syncing.
|
29
30
|
attr_accessor :remote
|
30
31
|
|
31
32
|
# Last synced metadata time.
|
@@ -37,7 +38,7 @@ module PulpAnsibleClient
|
|
37
38
|
:'pulp_labels' => :'pulp_labels',
|
38
39
|
:'name' => :'name',
|
39
40
|
:'description' => :'description',
|
40
|
-
:'
|
41
|
+
:'retain_repo_versions' => :'retain_repo_versions',
|
41
42
|
:'remote' => :'remote',
|
42
43
|
:'last_synced_metadata_time' => :'last_synced_metadata_time'
|
43
44
|
}
|
@@ -49,7 +50,7 @@ module PulpAnsibleClient
|
|
49
50
|
:'pulp_labels' => :'Object',
|
50
51
|
:'name' => :'String',
|
51
52
|
:'description' => :'String',
|
52
|
-
:'
|
53
|
+
:'retain_repo_versions' => :'Integer',
|
53
54
|
:'remote' => :'String',
|
54
55
|
:'last_synced_metadata_time' => :'DateTime'
|
55
56
|
}
|
@@ -59,7 +60,7 @@ module PulpAnsibleClient
|
|
59
60
|
def self.openapi_nullable
|
60
61
|
Set.new([
|
61
62
|
:'description',
|
62
|
-
:'
|
63
|
+
:'retain_repo_versions',
|
63
64
|
:'remote',
|
64
65
|
:'last_synced_metadata_time'
|
65
66
|
])
|
@@ -92,8 +93,8 @@ module PulpAnsibleClient
|
|
92
93
|
self.description = attributes[:'description']
|
93
94
|
end
|
94
95
|
|
95
|
-
if attributes.key?(:'
|
96
|
-
self.
|
96
|
+
if attributes.key?(:'retain_repo_versions')
|
97
|
+
self.retain_repo_versions = attributes[:'retain_repo_versions']
|
97
98
|
end
|
98
99
|
|
99
100
|
if attributes.key?(:'remote')
|
@@ -109,8 +110,8 @@ module PulpAnsibleClient
|
|
109
110
|
# @return Array for valid properties with the reasons
|
110
111
|
def list_invalid_properties
|
111
112
|
invalid_properties = Array.new
|
112
|
-
if !@
|
113
|
-
invalid_properties.push('invalid value for "
|
113
|
+
if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
114
|
+
invalid_properties.push('invalid value for "retain_repo_versions", must be greater than or equal to 1.')
|
114
115
|
end
|
115
116
|
|
116
117
|
invalid_properties
|
@@ -119,18 +120,18 @@ module PulpAnsibleClient
|
|
119
120
|
# Check to see if the all the properties in the model are valid
|
120
121
|
# @return true if the model is valid
|
121
122
|
def valid?
|
122
|
-
return false if !@
|
123
|
+
return false if !@retain_repo_versions.nil? && @retain_repo_versions < 1
|
123
124
|
true
|
124
125
|
end
|
125
126
|
|
126
127
|
# Custom attribute writer method with validation
|
127
|
-
# @param [Object]
|
128
|
-
def
|
129
|
-
if !
|
130
|
-
fail ArgumentError, 'invalid value for "
|
128
|
+
# @param [Object] retain_repo_versions Value to be assigned
|
129
|
+
def retain_repo_versions=(retain_repo_versions)
|
130
|
+
if !retain_repo_versions.nil? && retain_repo_versions < 1
|
131
|
+
fail ArgumentError, 'invalid value for "retain_repo_versions", must be greater than or equal to 1.'
|
131
132
|
end
|
132
133
|
|
133
|
-
@
|
134
|
+
@retain_repo_versions = retain_repo_versions
|
134
135
|
end
|
135
136
|
|
136
137
|
# Checks equality by comparing each attribute.
|
@@ -141,7 +142,7 @@ module PulpAnsibleClient
|
|
141
142
|
pulp_labels == o.pulp_labels &&
|
142
143
|
name == o.name &&
|
143
144
|
description == o.description &&
|
144
|
-
|
145
|
+
retain_repo_versions == o.retain_repo_versions &&
|
145
146
|
remote == o.remote &&
|
146
147
|
last_synced_metadata_time == o.last_synced_metadata_time
|
147
148
|
end
|
@@ -155,7 +156,7 @@ module PulpAnsibleClient
|
|
155
156
|
# Calculates hash code according to all attributes.
|
156
157
|
# @return [Integer] Hash code
|
157
158
|
def hash
|
158
|
-
[pulp_labels, name, description,
|
159
|
+
[pulp_labels, name, description, retain_repo_versions, remote, last_synced_metadata_time].hash
|
159
160
|
end
|
160
161
|
|
161
162
|
# Builds the object from hash
|
data/lib/pulp_ansible_client.rb
CHANGED
@@ -21,6 +21,7 @@ require 'pulp_ansible_client/models/ansible_ansible_distribution'
|
|
21
21
|
require 'pulp_ansible_client/models/ansible_ansible_distribution_response'
|
22
22
|
require 'pulp_ansible_client/models/ansible_ansible_repository'
|
23
23
|
require 'pulp_ansible_client/models/ansible_ansible_repository_response'
|
24
|
+
require 'pulp_ansible_client/models/ansible_collection'
|
24
25
|
require 'pulp_ansible_client/models/ansible_collection_remote'
|
25
26
|
require 'pulp_ansible_client/models/ansible_collection_remote_response'
|
26
27
|
require 'pulp_ansible_client/models/ansible_collection_response'
|
@@ -85,6 +86,7 @@ require 'pulp_ansible_client/api/ansible_copy_api'
|
|
85
86
|
require 'pulp_ansible_client/api/api_collections_api'
|
86
87
|
require 'pulp_ansible_client/api/api_roles_api'
|
87
88
|
require 'pulp_ansible_client/api/collection_import_api'
|
89
|
+
require 'pulp_ansible_client/api/content_collection_deprecations_api'
|
88
90
|
require 'pulp_ansible_client/api/content_collection_versions_api'
|
89
91
|
require 'pulp_ansible_client/api/content_roles_api'
|
90
92
|
require 'pulp_ansible_client/api/distributions_ansible_api'
|
@@ -0,0 +1,80 @@
|
|
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 PulpAnsibleClient::ContentCollectionDeprecationsApi
|
17
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
18
|
+
# Please update as you see appropriate
|
19
|
+
describe 'ContentCollectionDeprecationsApi' do
|
20
|
+
before do
|
21
|
+
# run before each test
|
22
|
+
@api_instance = PulpAnsibleClient::ContentCollectionDeprecationsApi.new
|
23
|
+
end
|
24
|
+
|
25
|
+
after do
|
26
|
+
# run after each test
|
27
|
+
end
|
28
|
+
|
29
|
+
describe 'test an instance of ContentCollectionDeprecationsApi' do
|
30
|
+
it 'should create an instance of ContentCollectionDeprecationsApi' do
|
31
|
+
expect(@api_instance).to be_instance_of(PulpAnsibleClient::ContentCollectionDeprecationsApi)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# unit tests for create
|
36
|
+
# Create an ansible collection deprecated
|
37
|
+
# ViewSet for AnsibleCollectionDeprecated.
|
38
|
+
# @param ansible_collection
|
39
|
+
# @param [Hash] opts the optional parameters
|
40
|
+
# @return [AnsibleCollectionResponse]
|
41
|
+
describe 'create test' 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
|
+
# unit tests for list
|
48
|
+
# List ansible collection deprecateds
|
49
|
+
# ViewSet for AnsibleCollectionDeprecated.
|
50
|
+
# @param [Hash] opts the optional parameters
|
51
|
+
# @option opts [Integer] :limit Number of results to return per page.
|
52
|
+
# @option opts [Integer] :offset The initial index from which to return the results.
|
53
|
+
# @option opts [String] :ordering Which field to use when ordering the results.
|
54
|
+
# @option opts [String] :repository_version Repository Version referenced by HREF
|
55
|
+
# @option opts [String] :repository_version_added Repository Version referenced by HREF
|
56
|
+
# @option opts [String] :repository_version_removed Repository Version referenced by HREF
|
57
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
58
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
59
|
+
# @return [PaginatedansibleCollectionResponseList]
|
60
|
+
describe 'list test' do
|
61
|
+
it 'should work' do
|
62
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
# unit tests for read
|
67
|
+
# Inspect an ansible collection deprecated
|
68
|
+
# ViewSet for AnsibleCollectionDeprecated.
|
69
|
+
# @param ansible_ansible_collection_deprecated_href
|
70
|
+
# @param [Hash] opts the optional parameters
|
71
|
+
# @option opts [String] :fields A list of fields to include in the response.
|
72
|
+
# @option opts [String] :exclude_fields A list of fields to exclude from the response.
|
73
|
+
# @return [AnsibleCollectionResponse]
|
74
|
+
describe 'read test' do
|
75
|
+
it 'should work' do
|
76
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
end
|
@@ -66,13 +66,13 @@ describe 'PulpAnsibleApiV3CollectionsApi' do
|
|
66
66
|
end
|
67
67
|
|
68
68
|
# unit tests for update
|
69
|
-
#
|
69
|
+
# Trigger an asynchronous update task
|
70
70
|
# @param name
|
71
71
|
# @param namespace
|
72
72
|
# @param path
|
73
73
|
# @param body
|
74
74
|
# @param [Hash] opts the optional parameters
|
75
|
-
# @return [
|
75
|
+
# @return [AsyncOperationResponse]
|
76
76
|
describe 'update test' do
|
77
77
|
it 'should work' do
|
78
78
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
data/spec/configuration_spec.rb
CHANGED
@@ -18,7 +18,7 @@ describe PulpAnsibleClient::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("https://pulp")
|
22
22
|
# PulpAnsibleClient.configure do |c|
|
23
23
|
# c.host = uri.host
|
24
24
|
# c.base_path = uri.path
|
@@ -28,14 +28,14 @@ describe PulpAnsibleClient::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("https://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("https://pulp")
|
39
39
|
end
|
40
40
|
end
|
41
41
|
end
|
@@ -74,7 +74,7 @@ describe 'AnsibleAnsibleRepositoryResponse' do
|
|
74
74
|
end
|
75
75
|
end
|
76
76
|
|
77
|
-
describe 'test attribute "
|
77
|
+
describe 'test attribute "retain_repo_versions"' do
|
78
78
|
it 'should work' do
|
79
79
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
80
80
|
end
|
@@ -50,7 +50,7 @@ describe 'AnsibleAnsibleRepository' do
|
|
50
50
|
end
|
51
51
|
end
|
52
52
|
|
53
|
-
describe 'test attribute "
|
53
|
+
describe 'test attribute "retain_repo_versions"' do
|
54
54
|
it 'should work' do
|
55
55
|
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
56
56
|
end
|