autosde_openapi_client 1.0.45 → 1.0.46

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1b3c854f346664de8542a49bccf4c2dbae554bf286fbeee529af3a22598f7c22
4
- data.tar.gz: 2da8d0996d9e203e5cf80cfb060b05205a858c29132fed0ca89ee4ec1497ec97
3
+ metadata.gz: b4ca072eafd6460cc2f70e1f8c50e8c69fce59dc88acad8de099a3f0c1c43286
4
+ data.tar.gz: 76ae9a929abf9d17d3686800843817e9c58550a81e265471f1ee07ce253858e6
5
5
  SHA512:
6
- metadata.gz: ef8265a10510f88a7120e85e2111f4ffec5d762b05849222188c33f14c40b67f6752907c0100875983d1e131af7ebc494323fb9b5281c63ef98c2d655fb8f2d9
7
- data.tar.gz: 0d1a66dea59646f5d478e6407bccdc81efd2702cae5b7508cb13fb9247f92a53344352d11f1a2342e7ccc0b197a1a695a9b507c7dc0722ed5f74bf2d0df8d671
6
+ metadata.gz: 2c7383807d44451ab8a2c0d120651351f01e6fda757f1452af299a6714af7fb582a647fafe5786b873ece6b8794e96586ca638920011db1d6d9e939f600746ad
7
+ data.tar.gz: cc731bf9c9bd6e71fb1caac4f50f7af7fbf5832fa34ade6aa5d3d949560a079af4f4ac8c883d597567a676ba97d5486cdc87128e417e85409ee47a87a9e9c044
data/README.md CHANGED
@@ -217,6 +217,7 @@ Class | Method | HTTP request | Description
217
217
  - [AutosdeOpenapiClient::StorageResourceResponse](docs/StorageResourceResponse.md)
218
218
  - [AutosdeOpenapiClient::StorageSystem](docs/StorageSystem.md)
219
219
  - [AutosdeOpenapiClient::StorageSystemCreate](docs/StorageSystemCreate.md)
220
+ - [AutosdeOpenapiClient::StorageSystemUpdate](docs/StorageSystemUpdate.md)
220
221
  - [AutosdeOpenapiClient::SystemType](docs/SystemType.md)
221
222
  - [AutosdeOpenapiClient::SystemTypeCreate](docs/SystemTypeCreate.md)
222
223
  - [AutosdeOpenapiClient::Volume](docs/Volume.md)
@@ -211,7 +211,7 @@ end
211
211
 
212
212
  ## storage_systems_pk_put
213
213
 
214
- > <StorageSystem> storage_systems_pk_put(pk, storage_system)
214
+ > <StorageSystem> storage_systems_pk_put(pk, storage_system_update)
215
215
 
216
216
 
217
217
 
@@ -228,11 +228,11 @@ end
228
228
 
229
229
  api_instance = AutosdeOpenapiClient::StorageSystemApi.new
230
230
  pk = 56 # Integer |
231
- storage_system = AutosdeOpenapiClient::StorageSystem.new # StorageSystem |
231
+ storage_system_update = AutosdeOpenapiClient::StorageSystemUpdate.new # StorageSystemUpdate |
232
232
 
233
233
  begin
234
234
 
235
- result = api_instance.storage_systems_pk_put(pk, storage_system)
235
+ result = api_instance.storage_systems_pk_put(pk, storage_system_update)
236
236
  p result
237
237
  rescue AutosdeOpenapiClient::ApiError => e
238
238
  puts "Error when calling StorageSystemApi->storage_systems_pk_put: #{e}"
@@ -243,12 +243,12 @@ end
243
243
 
244
244
  This returns an Array which contains the response data, status code and headers.
245
245
 
246
- > <Array(<StorageSystem>, Integer, Hash)> storage_systems_pk_put_with_http_info(pk, storage_system)
246
+ > <Array(<StorageSystem>, Integer, Hash)> storage_systems_pk_put_with_http_info(pk, storage_system_update)
247
247
 
248
248
  ```ruby
249
249
  begin
250
250
 
251
- data, status_code, headers = api_instance.storage_systems_pk_put_with_http_info(pk, storage_system)
251
+ data, status_code, headers = api_instance.storage_systems_pk_put_with_http_info(pk, storage_system_update)
252
252
  p status_code # => 2xx
253
253
  p headers # => { ... }
254
254
  p data # => <StorageSystem>
@@ -262,7 +262,7 @@ end
262
262
  | Name | Type | Description | Notes |
263
263
  | ---- | ---- | ----------- | ----- |
264
264
  | **pk** | **Integer** | | |
265
- | **storage_system** | [**StorageSystem**](StorageSystem.md) | | |
265
+ | **storage_system_update** | [**StorageSystemUpdate**](StorageSystemUpdate.md) | | |
266
266
 
267
267
  ### Return type
268
268
 
@@ -0,0 +1,24 @@
1
+ # AutosdeOpenapiClient::StorageSystemUpdate
2
+
3
+ ## Properties
4
+
5
+ | Name | Type | Description | Notes |
6
+ | ---- | ---- | ----------- | ----- |
7
+ | **management_ip** | **String** | management_ip | [optional] |
8
+ | **name** | **String** | name | [optional] |
9
+ | **password** | **String** | password | [optional] |
10
+ | **user** | **String** | user | [optional] |
11
+
12
+ ## Example
13
+
14
+ ```ruby
15
+ require 'autosde_openapi_client'
16
+
17
+ instance = AutosdeOpenapiClient::StorageSystemUpdate.new(
18
+ management_ip: null,
19
+ name: null,
20
+ password: null,
21
+ user: null
22
+ )
23
+ ```
24
+
@@ -57,6 +57,7 @@ require 'autosde_openapi_client/models/storage_resource_create'
57
57
  require 'autosde_openapi_client/models/storage_resource_response'
58
58
  require 'autosde_openapi_client/models/storage_system'
59
59
  require 'autosde_openapi_client/models/storage_system_create'
60
+ require 'autosde_openapi_client/models/storage_system_update'
60
61
  require 'autosde_openapi_client/models/system_type'
61
62
  require 'autosde_openapi_client/models/system_type_create'
62
63
  require 'autosde_openapi_client/models/volume'
@@ -191,19 +191,19 @@ module AutosdeOpenapiClient
191
191
  end
192
192
 
193
193
  # @param pk [Integer]
194
- # @param storage_system [StorageSystem]
194
+ # @param storage_system_update [StorageSystemUpdate]
195
195
  # @param [Hash] opts the optional parameters
196
196
  # @return [StorageSystem]
197
- def storage_systems_pk_put(pk, storage_system, opts = {})
198
- data, _status_code, _headers = storage_systems_pk_put_with_http_info(pk, storage_system, opts)
197
+ def storage_systems_pk_put(pk, storage_system_update, opts = {})
198
+ data, _status_code, _headers = storage_systems_pk_put_with_http_info(pk, storage_system_update, opts)
199
199
  data
200
200
  end
201
201
 
202
202
  # @param pk [Integer]
203
- # @param storage_system [StorageSystem]
203
+ # @param storage_system_update [StorageSystemUpdate]
204
204
  # @param [Hash] opts the optional parameters
205
205
  # @return [Array<(StorageSystem, Integer, Hash)>] StorageSystem data, response status code and response headers
206
- def storage_systems_pk_put_with_http_info(pk, storage_system, opts = {})
206
+ def storage_systems_pk_put_with_http_info(pk, storage_system_update, opts = {})
207
207
  if @api_client.config.debugging
208
208
  @api_client.config.logger.debug 'Calling API: StorageSystemApi.storage_systems_pk_put ...'
209
209
  end
@@ -211,9 +211,9 @@ module AutosdeOpenapiClient
211
211
  if @api_client.config.client_side_validation && pk.nil?
212
212
  fail ArgumentError, "Missing the required parameter 'pk' when calling StorageSystemApi.storage_systems_pk_put"
213
213
  end
214
- # verify the required parameter 'storage_system' is set
215
- if @api_client.config.client_side_validation && storage_system.nil?
216
- fail ArgumentError, "Missing the required parameter 'storage_system' when calling StorageSystemApi.storage_systems_pk_put"
214
+ # verify the required parameter 'storage_system_update' is set
215
+ if @api_client.config.client_side_validation && storage_system_update.nil?
216
+ fail ArgumentError, "Missing the required parameter 'storage_system_update' when calling StorageSystemApi.storage_systems_pk_put"
217
217
  end
218
218
  # resource path
219
219
  local_var_path = '/storage-systems/{pk}'.sub('{' + 'pk' + '}', CGI.escape(pk.to_s))
@@ -232,7 +232,7 @@ module AutosdeOpenapiClient
232
232
  form_params = opts[:form_params] || {}
233
233
 
234
234
  # http body (model)
235
- post_body = opts[:debug_body] || @api_client.object_to_http_body(storage_system)
235
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(storage_system_update)
236
236
 
237
237
  # return_type
238
238
  return_type = opts[:debug_return_type] || 'StorageSystem'
@@ -0,0 +1,265 @@
1
+ =begin
2
+ #Site Manager API
3
+
4
+ #Site Manager API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: autosde@il.ibm.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'date'
14
+ require 'time'
15
+
16
+ module AutosdeOpenapiClient
17
+ # TODO add description
18
+ class StorageSystemUpdate
19
+ # management_ip
20
+ attr_accessor :management_ip
21
+
22
+ # name
23
+ attr_accessor :name
24
+
25
+ # password
26
+ attr_accessor :password
27
+
28
+ # user
29
+ attr_accessor :user
30
+
31
+ # Attribute mapping from ruby-style variable name to JSON key.
32
+ def self.attribute_map
33
+ {
34
+ :'management_ip' => :'management_ip',
35
+ :'name' => :'name',
36
+ :'password' => :'password',
37
+ :'user' => :'user'
38
+ }
39
+ end
40
+
41
+ # Returns all the JSON keys this model knows about
42
+ def self.acceptable_attributes
43
+ attribute_map.values
44
+ end
45
+
46
+ # Attribute type mapping.
47
+ def self.openapi_types
48
+ {
49
+ :'management_ip' => :'String',
50
+ :'name' => :'String',
51
+ :'password' => :'String',
52
+ :'user' => :'String'
53
+ }
54
+ end
55
+
56
+ # List of attributes with nullable: true
57
+ def self.openapi_nullable
58
+ Set.new([
59
+ ])
60
+ end
61
+
62
+ # Initializes the object
63
+ # @param [Hash] attributes Model attributes in the form of hash
64
+ def initialize(attributes = {})
65
+ if (!attributes.is_a?(Hash))
66
+ fail ArgumentError, "The input argument (attributes) must be a hash in `AutosdeOpenapiClient::StorageSystemUpdate` initialize method"
67
+ end
68
+
69
+ # check to see if the attribute exists and convert string to symbol for hash key
70
+ attributes = attributes.each_with_object({}) { |(k, v), h|
71
+ if (!self.class.attribute_map.key?(k.to_sym))
72
+ fail ArgumentError, "`#{k}` is not a valid attribute in `AutosdeOpenapiClient::StorageSystemUpdate`. Please check the name to make sure it's valid. List of attributes: " + self.class.attribute_map.keys.inspect
73
+ end
74
+ h[k.to_sym] = v
75
+ }
76
+
77
+ if attributes.key?(:'management_ip')
78
+ self.management_ip = attributes[:'management_ip']
79
+ end
80
+
81
+ if attributes.key?(:'name')
82
+ self.name = attributes[:'name']
83
+ end
84
+
85
+ if attributes.key?(:'password')
86
+ self.password = attributes[:'password']
87
+ end
88
+
89
+ if attributes.key?(:'user')
90
+ self.user = attributes[:'user']
91
+ end
92
+ end
93
+
94
+ # Show invalid properties with the reasons. Usually used together with valid?
95
+ # @return Array for valid properties with the reasons
96
+ def list_invalid_properties
97
+ invalid_properties = Array.new
98
+ if !@name.nil? && @name.to_s.length > 15
99
+ invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 15.')
100
+ end
101
+
102
+ invalid_properties
103
+ end
104
+
105
+ # Check to see if the all the properties in the model are valid
106
+ # @return true if the model is valid
107
+ def valid?
108
+ return false if !@name.nil? && @name.to_s.length > 15
109
+ true
110
+ end
111
+
112
+ # Custom attribute writer method with validation
113
+ # @param [Object] name Value to be assigned
114
+ def name=(name)
115
+ if !name.nil? && name.to_s.length > 15
116
+ fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 15.'
117
+ end
118
+
119
+ @name = name
120
+ end
121
+
122
+ # Checks equality by comparing each attribute.
123
+ # @param [Object] Object to be compared
124
+ def ==(o)
125
+ return true if self.equal?(o)
126
+ self.class == o.class &&
127
+ management_ip == o.management_ip &&
128
+ name == o.name &&
129
+ password == o.password &&
130
+ user == o.user
131
+ end
132
+
133
+ # @see the `==` method
134
+ # @param [Object] Object to be compared
135
+ def eql?(o)
136
+ self == o
137
+ end
138
+
139
+ # Calculates hash code according to all attributes.
140
+ # @return [Integer] Hash code
141
+ def hash
142
+ [management_ip, name, password, user].hash
143
+ end
144
+
145
+ # Builds the object from hash
146
+ # @param [Hash] attributes Model attributes in the form of hash
147
+ # @return [Object] Returns the model itself
148
+ def self.build_from_hash(attributes)
149
+ new.build_from_hash(attributes)
150
+ end
151
+
152
+ # Builds the object from hash
153
+ # @param [Hash] attributes Model attributes in the form of hash
154
+ # @return [Object] Returns the model itself
155
+ def build_from_hash(attributes)
156
+ return nil unless attributes.is_a?(Hash)
157
+ self.class.openapi_types.each_pair do |key, type|
158
+ if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
159
+ self.send("#{key}=", nil)
160
+ elsif type =~ /\AArray<(.*)>/i
161
+ # check to ensure the input is an array given that the attribute
162
+ # is documented as an array but the input is not
163
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
164
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
165
+ end
166
+ elsif !attributes[self.class.attribute_map[key]].nil?
167
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
168
+ end
169
+ end
170
+
171
+ self
172
+ end
173
+
174
+ # Deserializes the data based on type
175
+ # @param string type Data type
176
+ # @param string value Value to be deserialized
177
+ # @return [Object] Deserialized data
178
+ def _deserialize(type, value)
179
+ case type.to_sym
180
+ when :Time
181
+ Time.parse(value)
182
+ when :Date
183
+ Date.parse(value)
184
+ when :String
185
+ value.to_s
186
+ when :Integer
187
+ value.to_i
188
+ when :Float
189
+ value.to_f
190
+ when :Boolean
191
+ if value.to_s =~ /\A(true|t|yes|y|1)\z/i
192
+ true
193
+ else
194
+ false
195
+ end
196
+ when :Object
197
+ # generic object (usually a Hash), return directly
198
+ value
199
+ when /\AArray<(?<inner_type>.+)>\z/
200
+ inner_type = Regexp.last_match[:inner_type]
201
+ value.map { |v| _deserialize(inner_type, v) }
202
+ when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
203
+ k_type = Regexp.last_match[:k_type]
204
+ v_type = Regexp.last_match[:v_type]
205
+ {}.tap do |hash|
206
+ value.each do |k, v|
207
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
208
+ end
209
+ end
210
+ else # model
211
+ # models (e.g. Pet) or oneOf
212
+ klass = AutosdeOpenapiClient.const_get(type)
213
+ klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
214
+ end
215
+ end
216
+
217
+ # Returns the string representation of the object
218
+ # @return [String] String presentation of the object
219
+ def to_s
220
+ to_hash.to_s
221
+ end
222
+
223
+ # to_body is an alias to to_hash (backward compatibility)
224
+ # @return [Hash] Returns the object in the form of hash
225
+ def to_body
226
+ to_hash
227
+ end
228
+
229
+ # Returns the object in the form of hash
230
+ # @return [Hash] Returns the object in the form of hash
231
+ def to_hash
232
+ hash = {}
233
+ self.class.attribute_map.each_pair do |attr, param|
234
+ value = self.send(attr)
235
+ if value.nil?
236
+ is_nullable = self.class.openapi_nullable.include?(attr)
237
+ next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
238
+ end
239
+
240
+ hash[param] = _to_hash(value)
241
+ end
242
+ hash
243
+ end
244
+
245
+ # Outputs non-array value in the form of hash
246
+ # For object, use to_hash. Otherwise, just return the value
247
+ # @param [Object] value Any valid value
248
+ # @return [Hash] Returns the value in the form of hash
249
+ def _to_hash(value)
250
+ if value.is_a?(Array)
251
+ value.compact.map { |v| _to_hash(v) }
252
+ elsif value.is_a?(Hash)
253
+ {}.tap do |hash|
254
+ value.each { |k, v| hash[k] = _to_hash(v) }
255
+ end
256
+ elsif value.respond_to? :to_hash
257
+ value.to_hash
258
+ else
259
+ value
260
+ end
261
+ end
262
+
263
+ end
264
+
265
+ end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #Site Manager API
5
5
 
6
- The version of the OpenAPI document: 1.0.45
6
+ The version of the OpenAPI document: 1.0.46
7
7
  Contact: autosde@il.ibm.com
8
8
  Generated by: https://openapi-generator.tech
9
9
  OpenAPI Generator version: 5.0.0
@@ -11,5 +11,5 @@ OpenAPI Generator version: 5.0.0
11
11
  =end
12
12
 
13
13
  module AutosdeOpenapiClient
14
- VERSION = '1.0.45'
14
+ VERSION = '1.0.46'
15
15
  end
@@ -63,7 +63,7 @@ describe 'StorageSystemApi' do
63
63
 
64
64
  # unit tests for storage_systems_pk_put
65
65
  # @param pk
66
- # @param storage_system
66
+ # @param storage_system_update
67
67
  # @param [Hash] opts the optional parameters
68
68
  # @return [StorageSystem]
69
69
  describe 'storage_systems_pk_put test' do
@@ -0,0 +1,52 @@
1
+ =begin
2
+ #Site Manager API
3
+
4
+ #Site Manager API
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Contact: autosde@il.ibm.com
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 5.0.0
10
+
11
+ =end
12
+
13
+ require 'spec_helper'
14
+ require 'json'
15
+ require 'date'
16
+
17
+ # Unit tests for AutosdeOpenapiClient::StorageSystemUpdate
18
+ # Automatically generated by openapi-generator (https://openapi-generator.tech)
19
+ # Please update as you see appropriate
20
+ describe AutosdeOpenapiClient::StorageSystemUpdate do
21
+ let(:instance) { AutosdeOpenapiClient::StorageSystemUpdate.new }
22
+
23
+ describe 'test an instance of StorageSystemUpdate' do
24
+ it 'should create an instance of StorageSystemUpdate' do
25
+ expect(instance).to be_instance_of(AutosdeOpenapiClient::StorageSystemUpdate)
26
+ end
27
+ end
28
+ describe 'test attribute "management_ip"' do
29
+ it 'should work' do
30
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
31
+ end
32
+ end
33
+
34
+ describe 'test attribute "name"' do
35
+ it 'should work' do
36
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
37
+ end
38
+ end
39
+
40
+ describe 'test attribute "password"' do
41
+ it 'should work' do
42
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
43
+ end
44
+ end
45
+
46
+ describe 'test attribute "user"' do
47
+ it 'should work' do
48
+ # assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
49
+ end
50
+ end
51
+
52
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autosde_openapi_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.45
4
+ version: 1.0.46
5
5
  platform: ruby
6
6
  authors:
7
7
  - OpenAPI-Generator
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-09 00:00:00.000000000 Z
11
+ date: 2021-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: typhoeus
@@ -122,6 +122,7 @@ files:
122
122
  - docs/StorageSystem.md
123
123
  - docs/StorageSystemApi.md
124
124
  - docs/StorageSystemCreate.md
125
+ - docs/StorageSystemUpdate.md
125
126
  - docs/SystemType.md
126
127
  - docs/SystemTypeApi.md
127
128
  - docs/SystemTypeCreate.md
@@ -202,6 +203,7 @@ files:
202
203
  - lib/autosde_openapi_client/models/storage_resource_response.rb
203
204
  - lib/autosde_openapi_client/models/storage_system.rb
204
205
  - lib/autosde_openapi_client/models/storage_system_create.rb
206
+ - lib/autosde_openapi_client/models/storage_system_update.rb
205
207
  - lib/autosde_openapi_client/models/system_type.rb
206
208
  - lib/autosde_openapi_client/models/system_type_create.rb
207
209
  - lib/autosde_openapi_client/models/volume.rb
@@ -277,6 +279,7 @@ files:
277
279
  - spec/models/storage_resource_spec.rb
278
280
  - spec/models/storage_system_create_spec.rb
279
281
  - spec/models/storage_system_spec.rb
282
+ - spec/models/storage_system_update_spec.rb
280
283
  - spec/models/system_type_create_spec.rb
281
284
  - spec/models/system_type_spec.rb
282
285
  - spec/models/volume_create_spec.rb
@@ -357,6 +360,7 @@ test_files:
357
360
  - spec/models/capability_translation_spec.rb
358
361
  - spec/models/host_volume_connection_spec.rb
359
362
  - spec/models/volume_safe_delete_spec.rb
363
+ - spec/models/storage_system_update_spec.rb
360
364
  - spec/models/auth_response_spec.rb
361
365
  - spec/models/system_type_spec.rb
362
366
  - spec/models/storage_system_spec.rb