pulpcore_client 3.0.0rc2.dev.1558538021 → 3.0.0rc2.dev.1558637727

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pulpcore_client might be problematic. Click here for more details.

@@ -0,0 +1,256 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'date'
14
+
15
+ module PulpcoreClient
16
+ # Version information of Pulp components
17
+ class Version
18
+ # Name of a versioned component of Pulp
19
+ attr_accessor :component
20
+
21
+ # Version of the component (e.g. 3.0.0)
22
+ attr_accessor :version
23
+
24
+ # Attribute mapping from ruby-style variable name to JSON key.
25
+ def self.attribute_map
26
+ {
27
+ :'component' => :'component',
28
+ :'version' => :'version'
29
+ }
30
+ end
31
+
32
+ # Attribute type mapping.
33
+ def self.openapi_types
34
+ {
35
+ :'component' => :'String',
36
+ :'version' => :'String'
37
+ }
38
+ end
39
+
40
+ # Initializes the object
41
+ # @param [Hash] attributes Model attributes in the form of hash
42
+ def initialize(attributes = {})
43
+ if (!attributes.is_a?(Hash))
44
+ fail ArgumentError, "The input argument (attributes) must be a hash in `PulpcoreClient::Version` initialize method"
45
+ end
46
+
47
+ # check to see if the attribute exists and convert string to symbol for hash key
48
+ attributes = attributes.each_with_object({}) { |(k, v), h|
49
+ if (!self.class.attribute_map.key?(k.to_sym))
50
+ fail ArgumentError, "`#{k}` is not a valid attribute in `PulpcoreClient::Version`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
51
+ end
52
+ h[k.to_sym] = v
53
+ }
54
+
55
+ if attributes.key?(:'component')
56
+ self.component = attributes[:'component']
57
+ end
58
+
59
+ if attributes.key?(:'version')
60
+ self.version = attributes[:'version']
61
+ end
62
+ end
63
+
64
+ # Show invalid properties with the reasons. Usually used together with valid?
65
+ # @return Array for valid properties with the reasons
66
+ def list_invalid_properties
67
+ invalid_properties = Array.new
68
+ if @component.nil?
69
+ invalid_properties.push('invalid value for "component", component cannot be nil.')
70
+ end
71
+
72
+ if @component.to_s.length < 1
73
+ invalid_properties.push('invalid value for "component", the character length must be great than or equal to 1.')
74
+ end
75
+
76
+ if @version.nil?
77
+ invalid_properties.push('invalid value for "version", version cannot be nil.')
78
+ end
79
+
80
+ if @version.to_s.length < 1
81
+ invalid_properties.push('invalid value for "version", the character length must be great than or equal to 1.')
82
+ end
83
+
84
+ invalid_properties
85
+ end
86
+
87
+ # Check to see if the all the properties in the model are valid
88
+ # @return true if the model is valid
89
+ def valid?
90
+ return false if @component.nil?
91
+ return false if @component.to_s.length < 1
92
+ return false if @version.nil?
93
+ return false if @version.to_s.length < 1
94
+ true
95
+ end
96
+
97
+ # Custom attribute writer method with validation
98
+ # @param [Object] component Value to be assigned
99
+ def component=(component)
100
+ if component.nil?
101
+ fail ArgumentError, 'component cannot be nil'
102
+ end
103
+
104
+ if component.to_s.length < 1
105
+ fail ArgumentError, 'invalid value for "component", the character length must be great than or equal to 1.'
106
+ end
107
+
108
+ @component = component
109
+ end
110
+
111
+ # Custom attribute writer method with validation
112
+ # @param [Object] version Value to be assigned
113
+ def version=(version)
114
+ if version.nil?
115
+ fail ArgumentError, 'version cannot be nil'
116
+ end
117
+
118
+ if version.to_s.length < 1
119
+ fail ArgumentError, 'invalid value for "version", the character length must be great than or equal to 1.'
120
+ end
121
+
122
+ @version = version
123
+ end
124
+
125
+ # Checks equality by comparing each attribute.
126
+ # @param [Object] Object to be compared
127
+ def ==(o)
128
+ return true if self.equal?(o)
129
+ self.class == o.class &&
130
+ component == o.component &&
131
+ version == o.version
132
+ end
133
+
134
+ # @see the `==` method
135
+ # @param [Object] Object to be compared
136
+ def eql?(o)
137
+ self == o
138
+ end
139
+
140
+ # Calculates hash code according to all attributes.
141
+ # @return [Integer] Hash code
142
+ def hash
143
+ [component, version].hash
144
+ end
145
+
146
+ # Builds the object from hash
147
+ # @param [Hash] attributes Model attributes in the form of hash
148
+ # @return [Object] Returns the model itself
149
+ def self.build_from_hash(attributes)
150
+ new.build_from_hash(attributes)
151
+ end
152
+
153
+ # Builds the object from hash
154
+ # @param [Hash] attributes Model attributes in the form of hash
155
+ # @return [Object] Returns the model itself
156
+ def build_from_hash(attributes)
157
+ return nil unless attributes.is_a?(Hash)
158
+ self.class.openapi_types.each_pair do |key, type|
159
+ if type =~ /\AArray<(.*)>/i
160
+ # check to ensure the input is an array given that the attribute
161
+ # is documented as an array but the input is not
162
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
163
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
164
+ end
165
+ elsif !attributes[self.class.attribute_map[key]].nil?
166
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
167
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
168
+ end
169
+
170
+ self
171
+ end
172
+
173
+ # Deserializes the data based on type
174
+ # @param string type Data type
175
+ # @param string value Value to be deserialized
176
+ # @return [Object] Deserialized data
177
+ def _deserialize(type, value)
178
+ case type.to_sym
179
+ when :DateTime
180
+ DateTime.parse(value)
181
+ when :Date
182
+ Date.parse(value)
183
+ when :String
184
+ value.to_s
185
+ when :Integer
186
+ value.to_i
187
+ when :Float
188
+ value.to_f
189
+ when :Boolean
190
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
191
+ true
192
+ else
193
+ false
194
+ end
195
+ when :Object
196
+ # generic object (usually a Hash), return directly
197
+ value
198
+ when /\AArray<(?<inner_type>.+)>\z/
199
+ inner_type = Regexp.last_match[:inner_type]
200
+ value.map { |v| _deserialize(inner_type, v) }
201
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
202
+ k_type = Regexp.last_match[:k_type]
203
+ v_type = Regexp.last_match[:v_type]
204
+ {}.tap do |hash|
205
+ value.each do |k, v|
206
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
207
+ end
208
+ end
209
+ else # model
210
+ PulpcoreClient.const_get(type).build_from_hash(value)
211
+ end
212
+ end
213
+
214
+ # Returns the string representation of the object
215
+ # @return [String] String presentation of the object
216
+ def to_s
217
+ to_hash.to_s
218
+ end
219
+
220
+ # to_body is an alias to to_hash (backward compatibility)
221
+ # @return [Hash] Returns the object in the form of hash
222
+ def to_body
223
+ to_hash
224
+ end
225
+
226
+ # Returns the object in the form of hash
227
+ # @return [Hash] Returns the object in the form of hash
228
+ def to_hash
229
+ hash = {}
230
+ self.class.attribute_map.each_pair do |attr, param|
231
+ value = self.send(attr)
232
+ next if value.nil?
233
+ hash[param] = _to_hash(value)
234
+ end
235
+ hash
236
+ end
237
+
238
+ # Outputs non-array value in the form of hash
239
+ # For object, use to_hash. Otherwise, just return the value
240
+ # @param [Object] value Any valid value
241
+ # @return [Hash] Returns the value in the form of hash
242
+ def _to_hash(value)
243
+ if value.is_a?(Array)
244
+ value.compact.map { |v| _to_hash(v) }
245
+ elsif value.is_a?(Hash)
246
+ {}.tap do |hash|
247
+ value.each { |k, v| hash[k] = _to_hash(v) }
248
+ end
249
+ elsif value.respond_to? :to_hash
250
+ value.to_hash
251
+ else
252
+ value
253
+ end
254
+ end
255
+ end
256
+ end
@@ -13,6 +13,7 @@ OpenAPI Generator version: 4.0.1-SNAPSHOT
13
13
  require 'date'
14
14
 
15
15
  module PulpcoreClient
16
+ # List of online workers known to the application. An online worker is actively heartbeating and can respond to new work
16
17
  class Worker
17
18
  attr_accessor :_href
18
19
 
@@ -11,5 +11,5 @@ OpenAPI Generator version: 4.0.1-SNAPSHOT
11
11
  =end
12
12
 
13
13
  module PulpcoreClient
14
- VERSION = '3.0.0rc2.dev.1558538021'
14
+ VERSION = '3.0.0rc2.dev.1558637727'
15
15
  end
@@ -32,12 +32,12 @@ describe 'StatusApi' do
32
32
  end
33
33
  end
34
34
 
35
- # unit tests for status_list
35
+ # unit tests for status_read
36
36
  # Inspect status of Pulp
37
37
  # Returns app information including the version of pulpcore and loaded pulp plugins, known workers, database connection status, and messaging connection status
38
38
  # @param [Hash] opts the optional parameters
39
- # @return [nil]
40
- describe 'status_list test' do
39
+ # @return [Status]
40
+ describe 'status_read test' do
41
41
  it 'should work' do
42
42
  # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
43
  end
@@ -0,0 +1,41 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for PulpcoreClient::DatabaseConnection
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'DatabaseConnection' do
21
+ before do
22
+ # run before each test
23
+ @instance = PulpcoreClient::DatabaseConnection.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of DatabaseConnection' do
31
+ it 'should create an instance of DatabaseConnection' do
32
+ expect(@instance).to be_instance_of(PulpcoreClient::DatabaseConnection)
33
+ end
34
+ end
35
+ describe 'test attribute "connected"' 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
+ end
@@ -0,0 +1,41 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for PulpcoreClient::RedisConnection
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'RedisConnection' do
21
+ before do
22
+ # run before each test
23
+ @instance = PulpcoreClient::RedisConnection.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of RedisConnection' do
31
+ it 'should create an instance of RedisConnection' do
32
+ expect(@instance).to be_instance_of(PulpcoreClient::RedisConnection)
33
+ end
34
+ end
35
+ describe 'test attribute "connected"' 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
+ end
@@ -0,0 +1,65 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for PulpcoreClient::Status
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Status' do
21
+ before do
22
+ # run before each test
23
+ @instance = PulpcoreClient::Status.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Status' do
31
+ it 'should create an instance of Status' do
32
+ expect(@instance).to be_instance_of(PulpcoreClient::Status)
33
+ end
34
+ end
35
+ describe 'test attribute "versions"' 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 "online_workers"' 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 "missing_workers"' 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
+ describe 'test attribute "database_connection"' do
54
+ it 'should work' do
55
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
56
+ end
57
+ end
58
+
59
+ describe 'test attribute "redis_connection"' do
60
+ it 'should work' do
61
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
62
+ end
63
+ end
64
+
65
+ end
@@ -0,0 +1,47 @@
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.0.1-SNAPSHOT
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for PulpcoreClient::Version
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe 'Version' do
21
+ before do
22
+ # run before each test
23
+ @instance = PulpcoreClient::Version.new
24
+ end
25
+
26
+ after do
27
+ # run after each test
28
+ end
29
+
30
+ describe 'test an instance of Version' do
31
+ it 'should create an instance of Version' do
32
+ expect(@instance).to be_instance_of(PulpcoreClient::Version)
33
+ end
34
+ end
35
+ describe 'test attribute "component"' 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 "version"' 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
+ end