pulp_ansible_client 0.2.0b6 → 0.2.0b7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +6 -4
- data/docs/RepositoriesAnsibleApi.md +55 -0
- data/docs/RepositoriesAnsibleVersionsApi.md +4 -4
- data/docs/RepositoryAddRemoveContent.md +21 -0
- data/lib/pulp_ansible_client/api/ansible_collections_api.rb +1 -1
- data/lib/pulp_ansible_client/api/content_collection_versions_api.rb +1 -1
- data/lib/pulp_ansible_client/api/content_roles_api.rb +1 -1
- data/lib/pulp_ansible_client/api/distributions_ansible_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_api_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_collections_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_roles_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v1_versions_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v2_versions_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_galaxy_api_v3_collections_api.rb +1 -1
- data/lib/pulp_ansible_client/api/pulp_ansible_tags_api.rb +1 -1
- data/lib/pulp_ansible_client/api/remotes_ansible_api.rb +1 -1
- data/lib/pulp_ansible_client/api/remotes_collection_api.rb +1 -1
- data/lib/pulp_ansible_client/api/repositories_ansible_api.rb +69 -1
- data/lib/pulp_ansible_client/api/repositories_ansible_versions_api.rb +10 -10
- data/lib/pulp_ansible_client/api_client.rb +1 -1
- data/lib/pulp_ansible_client/api_error.rb +1 -1
- data/lib/pulp_ansible_client/configuration.rb +2 -2
- data/lib/pulp_ansible_client/models/ansible_ansible_distribution.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_ansible_remote.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_ansible_repository.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_collection.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_collection_remote.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_collection_version.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_role.rb +1 -1
- data/lib/pulp_ansible_client/models/ansible_tag.rb +1 -1
- data/lib/pulp_ansible_client/models/async_operation_response.rb +1 -1
- data/lib/pulp_ansible_client/models/collection.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_import_detail.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_metadata.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_namespace.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_ref.rb +1 -1
- data/lib/pulp_ansible_client/models/collection_version.rb +1 -1
- data/lib/pulp_ansible_client/models/content_summary.rb +1 -1
- data/lib/pulp_ansible_client/models/galaxy_collection.rb +1 -1
- data/lib/pulp_ansible_client/models/galaxy_collection_version.rb +1 -1
- data/lib/pulp_ansible_client/models/galaxy_role.rb +1 -1
- data/lib/pulp_ansible_client/models/galaxy_role_version.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response200.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2001.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response20010.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response20011.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response20012.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response20013.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2002.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2003.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2004.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2005.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2006.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2007.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2008.rb +1 -1
- data/lib/pulp_ansible_client/models/inline_response2009.rb +1 -1
- data/lib/pulp_ansible_client/models/repository_add_remove_content.rb +231 -0
- data/lib/pulp_ansible_client/models/repository_sync_url.rb +1 -1
- data/lib/pulp_ansible_client/models/repository_version.rb +1 -1
- data/lib/pulp_ansible_client/models/tag.rb +1 -1
- data/lib/pulp_ansible_client/version.rb +2 -2
- data/lib/pulp_ansible_client.rb +2 -1
- data/pulp_ansible_client.gemspec +2 -2
- data/spec/api/ansible_collections_api_spec.rb +1 -1
- data/spec/api/content_collection_versions_api_spec.rb +1 -1
- data/spec/api/content_roles_api_spec.rb +1 -1
- data/spec/api/distributions_ansible_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_api_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_galaxy_api_collections_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_galaxy_api_roles_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_galaxy_api_v1_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_galaxy_api_v2_versions_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_galaxy_api_v3_collections_api_spec.rb +1 -1
- data/spec/api/pulp_ansible_tags_api_spec.rb +1 -1
- data/spec/api/remotes_ansible_api_spec.rb +1 -1
- data/spec/api/remotes_collection_api_spec.rb +1 -1
- data/spec/api/repositories_ansible_api_spec.rb +13 -1
- data/spec/api/repositories_ansible_versions_api_spec.rb +2 -2
- data/spec/api_client_spec.rb +1 -1
- data/spec/configuration_spec.rb +1 -1
- data/spec/models/ansible_ansible_distribution_spec.rb +1 -1
- data/spec/models/ansible_ansible_remote_spec.rb +1 -1
- data/spec/models/ansible_ansible_repository_spec.rb +1 -1
- data/spec/models/ansible_collection_remote_spec.rb +1 -1
- data/spec/models/ansible_collection_spec.rb +1 -1
- data/spec/models/ansible_collection_version_spec.rb +1 -1
- data/spec/models/ansible_role_spec.rb +1 -1
- data/spec/models/ansible_tag_spec.rb +1 -1
- data/spec/models/async_operation_response_spec.rb +1 -1
- data/spec/models/collection_import_detail_spec.rb +1 -1
- data/spec/models/collection_metadata_spec.rb +1 -1
- data/spec/models/collection_namespace_spec.rb +1 -1
- data/spec/models/collection_ref_spec.rb +1 -1
- data/spec/models/collection_spec.rb +1 -1
- data/spec/models/collection_version_spec.rb +1 -1
- data/spec/models/content_summary_spec.rb +1 -1
- data/spec/models/galaxy_collection_spec.rb +1 -1
- data/spec/models/galaxy_collection_version_spec.rb +1 -1
- data/spec/models/galaxy_role_spec.rb +1 -1
- data/spec/models/galaxy_role_version_spec.rb +1 -1
- data/spec/models/inline_response20010_spec.rb +1 -1
- data/spec/models/inline_response20011_spec.rb +1 -1
- data/spec/models/inline_response20012_spec.rb +1 -1
- data/spec/models/inline_response20013_spec.rb +1 -1
- data/spec/models/inline_response2001_spec.rb +1 -1
- data/spec/models/inline_response2002_spec.rb +1 -1
- data/spec/models/inline_response2003_spec.rb +1 -1
- data/spec/models/inline_response2004_spec.rb +1 -1
- data/spec/models/inline_response2005_spec.rb +1 -1
- data/spec/models/inline_response2006_spec.rb +1 -1
- data/spec/models/inline_response2007_spec.rb +1 -1
- data/spec/models/inline_response2008_spec.rb +1 -1
- data/spec/models/inline_response2009_spec.rb +1 -1
- data/spec/models/inline_response200_spec.rb +1 -1
- data/spec/models/repository_add_remove_content_spec.rb +53 -0
- data/spec/models/repository_sync_url_spec.rb +1 -1
- data/spec/models/repository_version_spec.rb +1 -1
- data/spec/models/tag_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- metadata +7 -3
@@ -0,0 +1,231 @@
|
|
1
|
+
=begin
|
2
|
+
#Pulp 3 API
|
3
|
+
|
4
|
+
#No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
5
|
+
|
6
|
+
The version of the OpenAPI document: v3
|
7
|
+
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 4.2.3-SNAPSHOT
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
|
15
|
+
module PulpAnsibleClient
|
16
|
+
class RepositoryAddRemoveContent
|
17
|
+
# A list of content units to add to a new repository version. This content is added after remove_content_units are removed.
|
18
|
+
attr_accessor :add_content_units
|
19
|
+
|
20
|
+
# A list of content units to remove from the latest repository version. You may also specify '*' as an entry to remove all content. This content is removed before add_content_units are added.
|
21
|
+
attr_accessor :remove_content_units
|
22
|
+
|
23
|
+
# A repository version whose content will be used as the initial set of content for the new repository version
|
24
|
+
attr_accessor :base_version
|
25
|
+
|
26
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
27
|
+
def self.attribute_map
|
28
|
+
{
|
29
|
+
:'add_content_units' => :'add_content_units',
|
30
|
+
:'remove_content_units' => :'remove_content_units',
|
31
|
+
:'base_version' => :'base_version'
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
# Attribute type mapping.
|
36
|
+
def self.openapi_types
|
37
|
+
{
|
38
|
+
:'add_content_units' => :'Array<String>',
|
39
|
+
:'remove_content_units' => :'Array<String>',
|
40
|
+
:'base_version' => :'String'
|
41
|
+
}
|
42
|
+
end
|
43
|
+
|
44
|
+
# List of attributes with nullable: true
|
45
|
+
def self.openapi_nullable
|
46
|
+
Set.new([
|
47
|
+
])
|
48
|
+
end
|
49
|
+
|
50
|
+
# Initializes the object
|
51
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
52
|
+
def initialize(attributes = {})
|
53
|
+
if (!attributes.is_a?(Hash))
|
54
|
+
fail ArgumentError, "The input argument (attributes) must be a hash in `PulpAnsibleClient::RepositoryAddRemoveContent` initialize method"
|
55
|
+
end
|
56
|
+
|
57
|
+
# check to see if the attribute exists and convert string to symbol for hash key
|
58
|
+
attributes = attributes.each_with_object({}) { |(k, v), h|
|
59
|
+
if (!self.class.attribute_map.key?(k.to_sym))
|
60
|
+
fail ArgumentError, "`#{k}` is not a valid attribute in `PulpAnsibleClient::RepositoryAddRemoveContent`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
|
61
|
+
end
|
62
|
+
h[k.to_sym] = v
|
63
|
+
}
|
64
|
+
|
65
|
+
if attributes.key?(:'add_content_units')
|
66
|
+
if (value = attributes[:'add_content_units']).is_a?(Array)
|
67
|
+
self.add_content_units = value
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
if attributes.key?(:'remove_content_units')
|
72
|
+
if (value = attributes[:'remove_content_units']).is_a?(Array)
|
73
|
+
self.remove_content_units = value
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
if attributes.key?(:'base_version')
|
78
|
+
self.base_version = attributes[:'base_version']
|
79
|
+
end
|
80
|
+
end
|
81
|
+
|
82
|
+
# Show invalid properties with the reasons. Usually used together with valid?
|
83
|
+
# @return Array for valid properties with the reasons
|
84
|
+
def list_invalid_properties
|
85
|
+
invalid_properties = Array.new
|
86
|
+
invalid_properties
|
87
|
+
end
|
88
|
+
|
89
|
+
# Check to see if the all the properties in the model are valid
|
90
|
+
# @return true if the model is valid
|
91
|
+
def valid?
|
92
|
+
true
|
93
|
+
end
|
94
|
+
|
95
|
+
# Checks equality by comparing each attribute.
|
96
|
+
# @param [Object] Object to be compared
|
97
|
+
def ==(o)
|
98
|
+
return true if self.equal?(o)
|
99
|
+
self.class == o.class &&
|
100
|
+
add_content_units == o.add_content_units &&
|
101
|
+
remove_content_units == o.remove_content_units &&
|
102
|
+
base_version == o.base_version
|
103
|
+
end
|
104
|
+
|
105
|
+
# @see the `==` method
|
106
|
+
# @param [Object] Object to be compared
|
107
|
+
def eql?(o)
|
108
|
+
self == o
|
109
|
+
end
|
110
|
+
|
111
|
+
# Calculates hash code according to all attributes.
|
112
|
+
# @return [Integer] Hash code
|
113
|
+
def hash
|
114
|
+
[add_content_units, remove_content_units, base_version].hash
|
115
|
+
end
|
116
|
+
|
117
|
+
# Builds the object from hash
|
118
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
119
|
+
# @return [Object] Returns the model itself
|
120
|
+
def self.build_from_hash(attributes)
|
121
|
+
new.build_from_hash(attributes)
|
122
|
+
end
|
123
|
+
|
124
|
+
# Builds the object from hash
|
125
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
126
|
+
# @return [Object] Returns the model itself
|
127
|
+
def build_from_hash(attributes)
|
128
|
+
return nil unless attributes.is_a?(Hash)
|
129
|
+
self.class.openapi_types.each_pair do |key, type|
|
130
|
+
if type =~ /\AArray<(.*)>/i
|
131
|
+
# check to ensure the input is an array given that the attribute
|
132
|
+
# is documented as an array but the input is not
|
133
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
134
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
138
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
139
|
+
end
|
140
|
+
|
141
|
+
self
|
142
|
+
end
|
143
|
+
|
144
|
+
# Deserializes the data based on type
|
145
|
+
# @param string type Data type
|
146
|
+
# @param string value Value to be deserialized
|
147
|
+
# @return [Object] Deserialized data
|
148
|
+
def _deserialize(type, value)
|
149
|
+
case type.to_sym
|
150
|
+
when :DateTime
|
151
|
+
DateTime.parse(value)
|
152
|
+
when :Date
|
153
|
+
Date.parse(value)
|
154
|
+
when :String
|
155
|
+
value.to_s
|
156
|
+
when :Integer
|
157
|
+
value.to_i
|
158
|
+
when :Float
|
159
|
+
value.to_f
|
160
|
+
when :Boolean
|
161
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
162
|
+
true
|
163
|
+
else
|
164
|
+
false
|
165
|
+
end
|
166
|
+
when :Object
|
167
|
+
# generic object (usually a Hash), return directly
|
168
|
+
value
|
169
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
170
|
+
inner_type = Regexp.last_match[:inner_type]
|
171
|
+
value.map { |v| _deserialize(inner_type, v) }
|
172
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
173
|
+
k_type = Regexp.last_match[:k_type]
|
174
|
+
v_type = Regexp.last_match[:v_type]
|
175
|
+
{}.tap do |hash|
|
176
|
+
value.each do |k, v|
|
177
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
178
|
+
end
|
179
|
+
end
|
180
|
+
else # model
|
181
|
+
PulpAnsibleClient.const_get(type).build_from_hash(value)
|
182
|
+
end
|
183
|
+
end
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# to_body is an alias to to_hash (backward compatibility)
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_body
|
194
|
+
to_hash
|
195
|
+
end
|
196
|
+
|
197
|
+
# Returns the object in the form of hash
|
198
|
+
# @return [Hash] Returns the object in the form of hash
|
199
|
+
def to_hash
|
200
|
+
hash = {}
|
201
|
+
self.class.attribute_map.each_pair do |attr, param|
|
202
|
+
value = self.send(attr)
|
203
|
+
if value.nil?
|
204
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
205
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
206
|
+
end
|
207
|
+
|
208
|
+
hash[param] = _to_hash(value)
|
209
|
+
end
|
210
|
+
hash
|
211
|
+
end
|
212
|
+
|
213
|
+
# Outputs non-array value in the form of hash
|
214
|
+
# For object, use to_hash. Otherwise, just return the value
|
215
|
+
# @param [Object] value Any valid value
|
216
|
+
# @return [Hash] Returns the value in the form of hash
|
217
|
+
def _to_hash(value)
|
218
|
+
if value.is_a?(Array)
|
219
|
+
value.compact.map { |v| _to_hash(v) }
|
220
|
+
elsif value.is_a?(Hash)
|
221
|
+
{}.tap do |hash|
|
222
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
223
|
+
end
|
224
|
+
elsif value.respond_to? :to_hash
|
225
|
+
value.to_hash
|
226
|
+
else
|
227
|
+
value
|
228
|
+
end
|
229
|
+
end
|
230
|
+
end
|
231
|
+
end
|
@@ -6,10 +6,10 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
13
13
|
module PulpAnsibleClient
|
14
|
-
VERSION = '0.2.
|
14
|
+
VERSION = '0.2.0b7'
|
15
15
|
end
|
data/lib/pulp_ansible_client.rb
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -51,6 +51,7 @@ require 'pulp_ansible_client/models/inline_response2006'
|
|
51
51
|
require 'pulp_ansible_client/models/inline_response2007'
|
52
52
|
require 'pulp_ansible_client/models/inline_response2008'
|
53
53
|
require 'pulp_ansible_client/models/inline_response2009'
|
54
|
+
require 'pulp_ansible_client/models/repository_add_remove_content'
|
54
55
|
require 'pulp_ansible_client/models/repository_sync_url'
|
55
56
|
require 'pulp_ansible_client/models/repository_version'
|
56
57
|
require 'pulp_ansible_client/models/tag'
|
data/pulp_ansible_client.gemspec
CHANGED
@@ -8,7 +8,7 @@
|
|
8
8
|
The version of the OpenAPI document: v3
|
9
9
|
|
10
10
|
Generated by: https://openapi-generator.tech
|
11
|
-
OpenAPI Generator version: 4.2.
|
11
|
+
OpenAPI Generator version: 4.2.3-SNAPSHOT
|
12
12
|
|
13
13
|
=end
|
14
14
|
|
@@ -24,7 +24,7 @@ Gem::Specification.new do |s|
|
|
24
24
|
s.homepage = "https://openapi-generator.tech"
|
25
25
|
s.summary = "Pulp 3 API Ruby Gem"
|
26
26
|
s.description = "No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)"
|
27
|
-
s.license = 'GPL-2.0'
|
27
|
+
s.license = 'GPL-2.0+'
|
28
28
|
s.required_ruby_version = ">= 1.9"
|
29
29
|
|
30
30
|
s.add_runtime_dependency 'faraday', '>= 0.14.0'
|
@@ -6,7 +6,7 @@
|
|
6
6
|
The version of the OpenAPI document: v3
|
7
7
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
9
|
-
OpenAPI Generator version: 4.2.
|
9
|
+
OpenAPI Generator version: 4.2.3-SNAPSHOT
|
10
10
|
|
11
11
|
=end
|
12
12
|
|
@@ -73,6 +73,18 @@ describe 'RepositoriesAnsibleApi' do
|
|
73
73
|
end
|
74
74
|
end
|
75
75
|
|
76
|
+
# unit tests for modify
|
77
|
+
# Trigger an asynchronous task to create a new repository version.
|
78
|
+
# @param ansible_repository_href URI of Ansible Repository. e.g.: /pulp/api/v3/repositories/ansible/ansible/1/
|
79
|
+
# @param data
|
80
|
+
# @param [Hash] opts the optional parameters
|
81
|
+
# @return [AsyncOperationResponse]
|
82
|
+
describe 'modify test' do
|
83
|
+
it 'should work' do
|
84
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
85
|
+
end
|
86
|
+
end
|
87
|
+
|
76
88
|
# unit tests for partial_update
|
77
89
|
# Partially update an ansible repository
|
78
90
|
# ViewSet for Ansible Remotes.
|