pnap_network_storage_api 1.2.0 → 1.3.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 +5 -0
- data/VERSION +1 -1
- data/docs/NfsPermissionsCreate.md +26 -0
- data/docs/NfsPermissionsUpdate.md +26 -0
- data/docs/PermissionsCreate.md +18 -0
- data/docs/PermissionsUpdate.md +18 -0
- data/docs/StorageNetworkCreate.md +1 -1
- data/docs/StorageNetworkVolumeCreate.md +24 -0
- data/docs/StorageNetworksApi.md +1 -1
- data/docs/VolumeCreate.md +3 -1
- data/docs/VolumeUpdate.md +3 -1
- data/lib/pnap_network_storage_api/models/nfs_permissions_create.rb +271 -0
- data/lib/pnap_network_storage_api/models/nfs_permissions_update.rb +271 -0
- data/lib/pnap_network_storage_api/models/permissions_create.rb +220 -0
- data/lib/pnap_network_storage_api/models/permissions_update.rb +220 -0
- data/lib/pnap_network_storage_api/models/storage_network_create.rb +1 -1
- data/lib/pnap_network_storage_api/models/storage_network_volume_create.rb +358 -0
- data/lib/pnap_network_storage_api/models/volume_create.rb +13 -4
- data/lib/pnap_network_storage_api/models/volume_update.rb +13 -4
- data/lib/pnap_network_storage_api.rb +5 -0
- data/spec/models/nfs_permissions_create_spec.rb +58 -0
- data/spec/models/nfs_permissions_update_spec.rb +58 -0
- data/spec/models/permissions_create_spec.rb +34 -0
- data/spec/models/permissions_update_spec.rb +34 -0
- data/spec/models/storage_network_volume_create_spec.rb +52 -0
- metadata +26 -6
@@ -0,0 +1,358 @@
|
|
1
|
+
=begin
|
2
|
+
#Network Storage API
|
3
|
+
|
4
|
+
#Create, list, edit, and delete storage networks with the Network Storage API. Use storage networks to expand storage capacity on a private network. <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bare-metal-cloud-storage' target='_blank'>here</a> </span> <br> <b>All URLs are relative to (https://api.phoenixnap.com/network-storage/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'date'
|
14
|
+
require 'time'
|
15
|
+
|
16
|
+
module NetworkStorageApi
|
17
|
+
# Create Volume.
|
18
|
+
class StorageNetworkVolumeCreate
|
19
|
+
# Volume friendly name.
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
# Volume description.
|
23
|
+
attr_accessor :description
|
24
|
+
|
25
|
+
# Last part of volume's path.
|
26
|
+
attr_accessor :path_suffix
|
27
|
+
|
28
|
+
# Capacity of Volume in GB. Currently only whole numbers and multiples of 1000GB are supported.
|
29
|
+
attr_accessor :capacity_in_gb
|
30
|
+
|
31
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
32
|
+
def self.attribute_map
|
33
|
+
{
|
34
|
+
:'name' => :'name',
|
35
|
+
:'description' => :'description',
|
36
|
+
:'path_suffix' => :'pathSuffix',
|
37
|
+
:'capacity_in_gb' => :'capacityInGb'
|
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
|
+
:'name' => :'String',
|
50
|
+
:'description' => :'String',
|
51
|
+
:'path_suffix' => :'String',
|
52
|
+
:'capacity_in_gb' => :'Integer'
|
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 `NetworkStorageApi::StorageNetworkVolumeCreate` 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 `NetworkStorageApi::StorageNetworkVolumeCreate`. 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?(:'name')
|
78
|
+
self.name = attributes[:'name']
|
79
|
+
end
|
80
|
+
|
81
|
+
if attributes.key?(:'description')
|
82
|
+
self.description = attributes[:'description']
|
83
|
+
end
|
84
|
+
|
85
|
+
if attributes.key?(:'path_suffix')
|
86
|
+
self.path_suffix = attributes[:'path_suffix']
|
87
|
+
end
|
88
|
+
|
89
|
+
if attributes.key?(:'capacity_in_gb')
|
90
|
+
self.capacity_in_gb = attributes[:'capacity_in_gb']
|
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?
|
99
|
+
invalid_properties.push('invalid value for "name", name cannot be nil.')
|
100
|
+
end
|
101
|
+
|
102
|
+
if @name.to_s.length > 100
|
103
|
+
invalid_properties.push('invalid value for "name", the character length must be smaller than or equal to 100.')
|
104
|
+
end
|
105
|
+
|
106
|
+
if @name.to_s.length < 1
|
107
|
+
invalid_properties.push('invalid value for "name", the character length must be great than or equal to 1.')
|
108
|
+
end
|
109
|
+
|
110
|
+
if !@description.nil? && @description.to_s.length > 250
|
111
|
+
invalid_properties.push('invalid value for "description", the character length must be smaller than or equal to 250.')
|
112
|
+
end
|
113
|
+
|
114
|
+
if !@path_suffix.nil? && @path_suffix.to_s.length > 27
|
115
|
+
invalid_properties.push('invalid value for "path_suffix", the character length must be smaller than or equal to 27.')
|
116
|
+
end
|
117
|
+
|
118
|
+
if !@path_suffix.nil? && @path_suffix.to_s.length < 0
|
119
|
+
invalid_properties.push('invalid value for "path_suffix", the character length must be great than or equal to 0.')
|
120
|
+
end
|
121
|
+
|
122
|
+
pattern = Regexp.new(/^(\/[\w-]+)+$|^$/)
|
123
|
+
if !@path_suffix.nil? && @path_suffix !~ pattern
|
124
|
+
invalid_properties.push("invalid value for \"path_suffix\", must conform to the pattern #{pattern}.")
|
125
|
+
end
|
126
|
+
|
127
|
+
if @capacity_in_gb.nil?
|
128
|
+
invalid_properties.push('invalid value for "capacity_in_gb", capacity_in_gb cannot be nil.')
|
129
|
+
end
|
130
|
+
|
131
|
+
if @capacity_in_gb < 1000
|
132
|
+
invalid_properties.push('invalid value for "capacity_in_gb", must be greater than or equal to 1000.')
|
133
|
+
end
|
134
|
+
|
135
|
+
invalid_properties
|
136
|
+
end
|
137
|
+
|
138
|
+
# Check to see if the all the properties in the model are valid
|
139
|
+
# @return true if the model is valid
|
140
|
+
def valid?
|
141
|
+
return false if @name.nil?
|
142
|
+
return false if @name.to_s.length > 100
|
143
|
+
return false if @name.to_s.length < 1
|
144
|
+
return false if !@description.nil? && @description.to_s.length > 250
|
145
|
+
return false if !@path_suffix.nil? && @path_suffix.to_s.length > 27
|
146
|
+
return false if !@path_suffix.nil? && @path_suffix.to_s.length < 0
|
147
|
+
return false if !@path_suffix.nil? && @path_suffix !~ Regexp.new(/^(\/[\w-]+)+$|^$/)
|
148
|
+
return false if @capacity_in_gb.nil?
|
149
|
+
return false if @capacity_in_gb < 1000
|
150
|
+
true
|
151
|
+
end
|
152
|
+
|
153
|
+
# Custom attribute writer method with validation
|
154
|
+
# @param [Object] name Value to be assigned
|
155
|
+
def name=(name)
|
156
|
+
if name.nil?
|
157
|
+
fail ArgumentError, 'name cannot be nil'
|
158
|
+
end
|
159
|
+
|
160
|
+
if name.to_s.length > 100
|
161
|
+
fail ArgumentError, 'invalid value for "name", the character length must be smaller than or equal to 100.'
|
162
|
+
end
|
163
|
+
|
164
|
+
if name.to_s.length < 1
|
165
|
+
fail ArgumentError, 'invalid value for "name", the character length must be great than or equal to 1.'
|
166
|
+
end
|
167
|
+
|
168
|
+
@name = name
|
169
|
+
end
|
170
|
+
|
171
|
+
# Custom attribute writer method with validation
|
172
|
+
# @param [Object] description Value to be assigned
|
173
|
+
def description=(description)
|
174
|
+
if !description.nil? && description.to_s.length > 250
|
175
|
+
fail ArgumentError, 'invalid value for "description", the character length must be smaller than or equal to 250.'
|
176
|
+
end
|
177
|
+
|
178
|
+
@description = description
|
179
|
+
end
|
180
|
+
|
181
|
+
# Custom attribute writer method with validation
|
182
|
+
# @param [Object] path_suffix Value to be assigned
|
183
|
+
def path_suffix=(path_suffix)
|
184
|
+
if !path_suffix.nil? && path_suffix.to_s.length > 27
|
185
|
+
fail ArgumentError, 'invalid value for "path_suffix", the character length must be smaller than or equal to 27.'
|
186
|
+
end
|
187
|
+
|
188
|
+
if !path_suffix.nil? && path_suffix.to_s.length < 0
|
189
|
+
fail ArgumentError, 'invalid value for "path_suffix", the character length must be great than or equal to 0.'
|
190
|
+
end
|
191
|
+
|
192
|
+
pattern = Regexp.new(/^(\/[\w-]+)+$|^$/)
|
193
|
+
if !path_suffix.nil? && path_suffix !~ pattern
|
194
|
+
fail ArgumentError, "invalid value for \"path_suffix\", must conform to the pattern #{pattern}."
|
195
|
+
end
|
196
|
+
|
197
|
+
@path_suffix = path_suffix
|
198
|
+
end
|
199
|
+
|
200
|
+
# Custom attribute writer method with validation
|
201
|
+
# @param [Object] capacity_in_gb Value to be assigned
|
202
|
+
def capacity_in_gb=(capacity_in_gb)
|
203
|
+
if capacity_in_gb.nil?
|
204
|
+
fail ArgumentError, 'capacity_in_gb cannot be nil'
|
205
|
+
end
|
206
|
+
|
207
|
+
if capacity_in_gb < 1000
|
208
|
+
fail ArgumentError, 'invalid value for "capacity_in_gb", must be greater than or equal to 1000.'
|
209
|
+
end
|
210
|
+
|
211
|
+
@capacity_in_gb = capacity_in_gb
|
212
|
+
end
|
213
|
+
|
214
|
+
# Checks equality by comparing each attribute.
|
215
|
+
# @param [Object] Object to be compared
|
216
|
+
def ==(o)
|
217
|
+
return true if self.equal?(o)
|
218
|
+
self.class == o.class &&
|
219
|
+
name == o.name &&
|
220
|
+
description == o.description &&
|
221
|
+
path_suffix == o.path_suffix &&
|
222
|
+
capacity_in_gb == o.capacity_in_gb
|
223
|
+
end
|
224
|
+
|
225
|
+
# @see the `==` method
|
226
|
+
# @param [Object] Object to be compared
|
227
|
+
def eql?(o)
|
228
|
+
self == o
|
229
|
+
end
|
230
|
+
|
231
|
+
# Calculates hash code according to all attributes.
|
232
|
+
# @return [Integer] Hash code
|
233
|
+
def hash
|
234
|
+
[name, description, path_suffix, capacity_in_gb].hash
|
235
|
+
end
|
236
|
+
|
237
|
+
# Builds the object from hash
|
238
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
239
|
+
# @return [Object] Returns the model itself
|
240
|
+
def self.build_from_hash(attributes)
|
241
|
+
new.build_from_hash(attributes)
|
242
|
+
end
|
243
|
+
|
244
|
+
# Builds the object from hash
|
245
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
246
|
+
# @return [Object] Returns the model itself
|
247
|
+
def build_from_hash(attributes)
|
248
|
+
return nil unless attributes.is_a?(Hash)
|
249
|
+
attributes = attributes.transform_keys(&:to_sym)
|
250
|
+
self.class.openapi_types.each_pair do |key, type|
|
251
|
+
if attributes[self.class.attribute_map[key]].nil? && self.class.openapi_nullable.include?(key)
|
252
|
+
self.send("#{key}=", nil)
|
253
|
+
elsif type =~ /\AArray<(.*)>/i
|
254
|
+
# check to ensure the input is an array given that the attribute
|
255
|
+
# is documented as an array but the input is not
|
256
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
257
|
+
self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
|
258
|
+
end
|
259
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
260
|
+
self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
|
261
|
+
end
|
262
|
+
end
|
263
|
+
|
264
|
+
self
|
265
|
+
end
|
266
|
+
|
267
|
+
# Deserializes the data based on type
|
268
|
+
# @param string type Data type
|
269
|
+
# @param string value Value to be deserialized
|
270
|
+
# @return [Object] Deserialized data
|
271
|
+
def _deserialize(type, value)
|
272
|
+
case type.to_sym
|
273
|
+
when :Time
|
274
|
+
Time.parse(value)
|
275
|
+
when :Date
|
276
|
+
Date.parse(value)
|
277
|
+
when :String
|
278
|
+
value.to_s
|
279
|
+
when :Integer
|
280
|
+
value.to_i
|
281
|
+
when :Float
|
282
|
+
value.to_f
|
283
|
+
when :Boolean
|
284
|
+
if value.to_s =~ /\A(true|t|yes|y|1)\z/i
|
285
|
+
true
|
286
|
+
else
|
287
|
+
false
|
288
|
+
end
|
289
|
+
when :Object
|
290
|
+
# generic object (usually a Hash), return directly
|
291
|
+
value
|
292
|
+
when /\AArray<(?<inner_type>.+)>\z/
|
293
|
+
inner_type = Regexp.last_match[:inner_type]
|
294
|
+
value.map { |v| _deserialize(inner_type, v) }
|
295
|
+
when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
|
296
|
+
k_type = Regexp.last_match[:k_type]
|
297
|
+
v_type = Regexp.last_match[:v_type]
|
298
|
+
{}.tap do |hash|
|
299
|
+
value.each do |k, v|
|
300
|
+
hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
|
301
|
+
end
|
302
|
+
end
|
303
|
+
else # model
|
304
|
+
# models (e.g. Pet) or oneOf
|
305
|
+
klass = NetworkStorageApi.const_get(type)
|
306
|
+
klass.respond_to?(:openapi_one_of) ? klass.build(value) : klass.build_from_hash(value)
|
307
|
+
end
|
308
|
+
end
|
309
|
+
|
310
|
+
# Returns the string representation of the object
|
311
|
+
# @return [String] String presentation of the object
|
312
|
+
def to_s
|
313
|
+
to_hash.to_s
|
314
|
+
end
|
315
|
+
|
316
|
+
# to_body is an alias to to_hash (backward compatibility)
|
317
|
+
# @return [Hash] Returns the object in the form of hash
|
318
|
+
def to_body
|
319
|
+
to_hash
|
320
|
+
end
|
321
|
+
|
322
|
+
# Returns the object in the form of hash
|
323
|
+
# @return [Hash] Returns the object in the form of hash
|
324
|
+
def to_hash
|
325
|
+
hash = {}
|
326
|
+
self.class.attribute_map.each_pair do |attr, param|
|
327
|
+
value = self.send(attr)
|
328
|
+
if value.nil?
|
329
|
+
is_nullable = self.class.openapi_nullable.include?(attr)
|
330
|
+
next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}"))
|
331
|
+
end
|
332
|
+
|
333
|
+
hash[param] = _to_hash(value)
|
334
|
+
end
|
335
|
+
hash
|
336
|
+
end
|
337
|
+
|
338
|
+
# Outputs non-array value in the form of hash
|
339
|
+
# For object, use to_hash. Otherwise, just return the value
|
340
|
+
# @param [Object] value Any valid value
|
341
|
+
# @return [Hash] Returns the value in the form of hash
|
342
|
+
def _to_hash(value)
|
343
|
+
if value.is_a?(Array)
|
344
|
+
value.compact.map { |v| _to_hash(v) }
|
345
|
+
elsif value.is_a?(Hash)
|
346
|
+
{}.tap do |hash|
|
347
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
348
|
+
end
|
349
|
+
elsif value.respond_to? :to_hash
|
350
|
+
value.to_hash
|
351
|
+
else
|
352
|
+
value
|
353
|
+
end
|
354
|
+
end
|
355
|
+
|
356
|
+
end
|
357
|
+
|
358
|
+
end
|
@@ -28,13 +28,16 @@ module NetworkStorageApi
|
|
28
28
|
# Capacity of Volume in GB. Currently only whole numbers and multiples of 1000GB are supported.
|
29
29
|
attr_accessor :capacity_in_gb
|
30
30
|
|
31
|
+
attr_accessor :permissions
|
32
|
+
|
31
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
34
|
def self.attribute_map
|
33
35
|
{
|
34
36
|
:'name' => :'name',
|
35
37
|
:'description' => :'description',
|
36
38
|
:'path_suffix' => :'pathSuffix',
|
37
|
-
:'capacity_in_gb' => :'capacityInGb'
|
39
|
+
:'capacity_in_gb' => :'capacityInGb',
|
40
|
+
:'permissions' => :'permissions'
|
38
41
|
}
|
39
42
|
end
|
40
43
|
|
@@ -49,7 +52,8 @@ module NetworkStorageApi
|
|
49
52
|
:'name' => :'String',
|
50
53
|
:'description' => :'String',
|
51
54
|
:'path_suffix' => :'String',
|
52
|
-
:'capacity_in_gb' => :'Integer'
|
55
|
+
:'capacity_in_gb' => :'Integer',
|
56
|
+
:'permissions' => :'PermissionsCreate'
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
@@ -89,6 +93,10 @@ module NetworkStorageApi
|
|
89
93
|
if attributes.key?(:'capacity_in_gb')
|
90
94
|
self.capacity_in_gb = attributes[:'capacity_in_gb']
|
91
95
|
end
|
96
|
+
|
97
|
+
if attributes.key?(:'permissions')
|
98
|
+
self.permissions = attributes[:'permissions']
|
99
|
+
end
|
92
100
|
end
|
93
101
|
|
94
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -219,7 +227,8 @@ module NetworkStorageApi
|
|
219
227
|
name == o.name &&
|
220
228
|
description == o.description &&
|
221
229
|
path_suffix == o.path_suffix &&
|
222
|
-
capacity_in_gb == o.capacity_in_gb
|
230
|
+
capacity_in_gb == o.capacity_in_gb &&
|
231
|
+
permissions == o.permissions
|
223
232
|
end
|
224
233
|
|
225
234
|
# @see the `==` method
|
@@ -231,7 +240,7 @@ module NetworkStorageApi
|
|
231
240
|
# Calculates hash code according to all attributes.
|
232
241
|
# @return [Integer] Hash code
|
233
242
|
def hash
|
234
|
-
[name, description, path_suffix, capacity_in_gb].hash
|
243
|
+
[name, description, path_suffix, capacity_in_gb, permissions].hash
|
235
244
|
end
|
236
245
|
|
237
246
|
# Builds the object from hash
|
@@ -28,13 +28,16 @@ module NetworkStorageApi
|
|
28
28
|
# Last part of volume's path.
|
29
29
|
attr_accessor :path_suffix
|
30
30
|
|
31
|
+
attr_accessor :permissions
|
32
|
+
|
31
33
|
# Attribute mapping from ruby-style variable name to JSON key.
|
32
34
|
def self.attribute_map
|
33
35
|
{
|
34
36
|
:'name' => :'name',
|
35
37
|
:'description' => :'description',
|
36
38
|
:'capacity_in_gb' => :'capacityInGb',
|
37
|
-
:'path_suffix' => :'pathSuffix'
|
39
|
+
:'path_suffix' => :'pathSuffix',
|
40
|
+
:'permissions' => :'permissions'
|
38
41
|
}
|
39
42
|
end
|
40
43
|
|
@@ -49,7 +52,8 @@ module NetworkStorageApi
|
|
49
52
|
:'name' => :'String',
|
50
53
|
:'description' => :'String',
|
51
54
|
:'capacity_in_gb' => :'Integer',
|
52
|
-
:'path_suffix' => :'String'
|
55
|
+
:'path_suffix' => :'String',
|
56
|
+
:'permissions' => :'PermissionsUpdate'
|
53
57
|
}
|
54
58
|
end
|
55
59
|
|
@@ -89,6 +93,10 @@ module NetworkStorageApi
|
|
89
93
|
if attributes.key?(:'path_suffix')
|
90
94
|
self.path_suffix = attributes[:'path_suffix']
|
91
95
|
end
|
96
|
+
|
97
|
+
if attributes.key?(:'permissions')
|
98
|
+
self.permissions = attributes[:'permissions']
|
99
|
+
end
|
92
100
|
end
|
93
101
|
|
94
102
|
# Show invalid properties with the reasons. Usually used together with valid?
|
@@ -201,7 +209,8 @@ module NetworkStorageApi
|
|
201
209
|
name == o.name &&
|
202
210
|
description == o.description &&
|
203
211
|
capacity_in_gb == o.capacity_in_gb &&
|
204
|
-
path_suffix == o.path_suffix
|
212
|
+
path_suffix == o.path_suffix &&
|
213
|
+
permissions == o.permissions
|
205
214
|
end
|
206
215
|
|
207
216
|
# @see the `==` method
|
@@ -213,7 +222,7 @@ module NetworkStorageApi
|
|
213
222
|
# Calculates hash code according to all attributes.
|
214
223
|
# @return [Integer] Hash code
|
215
224
|
def hash
|
216
|
-
[name, description, capacity_in_gb, path_suffix].hash
|
225
|
+
[name, description, capacity_in_gb, path_suffix, permissions].hash
|
217
226
|
end
|
218
227
|
|
219
228
|
# Builds the object from hash
|
@@ -19,11 +19,16 @@ require 'pnap_network_storage_api/configuration'
|
|
19
19
|
# Models
|
20
20
|
require 'pnap_network_storage_api/models/error'
|
21
21
|
require 'pnap_network_storage_api/models/nfs_permissions'
|
22
|
+
require 'pnap_network_storage_api/models/nfs_permissions_create'
|
23
|
+
require 'pnap_network_storage_api/models/nfs_permissions_update'
|
22
24
|
require 'pnap_network_storage_api/models/permissions'
|
25
|
+
require 'pnap_network_storage_api/models/permissions_create'
|
26
|
+
require 'pnap_network_storage_api/models/permissions_update'
|
23
27
|
require 'pnap_network_storage_api/models/status'
|
24
28
|
require 'pnap_network_storage_api/models/storage_network'
|
25
29
|
require 'pnap_network_storage_api/models/storage_network_create'
|
26
30
|
require 'pnap_network_storage_api/models/storage_network_update'
|
31
|
+
require 'pnap_network_storage_api/models/storage_network_volume_create'
|
27
32
|
require 'pnap_network_storage_api/models/volume'
|
28
33
|
require 'pnap_network_storage_api/models/volume_create'
|
29
34
|
require 'pnap_network_storage_api/models/volume_update'
|
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
#Network Storage API
|
3
|
+
|
4
|
+
#Create, list, edit, and delete storage networks with the Network Storage API. Use storage networks to expand storage capacity on a private network. <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bare-metal-cloud-storage' target='_blank'>here</a> </span> <br> <b>All URLs are relative to (https://api.phoenixnap.com/network-storage/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for NetworkStorageApi::NfsPermissionsCreate
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe NetworkStorageApi::NfsPermissionsCreate do
|
21
|
+
let(:instance) { NetworkStorageApi::NfsPermissionsCreate.new }
|
22
|
+
|
23
|
+
describe 'test an instance of NfsPermissionsCreate' do
|
24
|
+
it 'should create an instance of NfsPermissionsCreate' do
|
25
|
+
expect(instance).to be_instance_of(NetworkStorageApi::NfsPermissionsCreate)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "read_write"' 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 "read_only"' 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 "root_squash"' 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 "no_squash"' 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
|
+
describe 'test attribute "all_squash"' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,58 @@
|
|
1
|
+
=begin
|
2
|
+
#Network Storage API
|
3
|
+
|
4
|
+
#Create, list, edit, and delete storage networks with the Network Storage API. Use storage networks to expand storage capacity on a private network. <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bare-metal-cloud-storage' target='_blank'>here</a> </span> <br> <b>All URLs are relative to (https://api.phoenixnap.com/network-storage/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for NetworkStorageApi::NfsPermissionsUpdate
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe NetworkStorageApi::NfsPermissionsUpdate do
|
21
|
+
let(:instance) { NetworkStorageApi::NfsPermissionsUpdate.new }
|
22
|
+
|
23
|
+
describe 'test an instance of NfsPermissionsUpdate' do
|
24
|
+
it 'should create an instance of NfsPermissionsUpdate' do
|
25
|
+
expect(instance).to be_instance_of(NetworkStorageApi::NfsPermissionsUpdate)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "read_write"' 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 "read_only"' 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 "root_squash"' 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 "no_squash"' 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
|
+
describe 'test attribute "all_squash"' do
|
53
|
+
it 'should work' do
|
54
|
+
# assertion here. ref: https://www.relishapp.com/rspec/rspec-expectations/docs/built-in-matchers
|
55
|
+
end
|
56
|
+
end
|
57
|
+
|
58
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Network Storage API
|
3
|
+
|
4
|
+
#Create, list, edit, and delete storage networks with the Network Storage API. Use storage networks to expand storage capacity on a private network. <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bare-metal-cloud-storage' target='_blank'>here</a> </span> <br> <b>All URLs are relative to (https://api.phoenixnap.com/network-storage/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for NetworkStorageApi::PermissionsCreate
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe NetworkStorageApi::PermissionsCreate do
|
21
|
+
let(:instance) { NetworkStorageApi::PermissionsCreate.new }
|
22
|
+
|
23
|
+
describe 'test an instance of PermissionsCreate' do
|
24
|
+
it 'should create an instance of PermissionsCreate' do
|
25
|
+
expect(instance).to be_instance_of(NetworkStorageApi::PermissionsCreate)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "nfs"' 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
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
=begin
|
2
|
+
#Network Storage API
|
3
|
+
|
4
|
+
#Create, list, edit, and delete storage networks with the Network Storage API. Use storage networks to expand storage capacity on a private network. <br> <span class='pnap-api-knowledge-base-link'> Knowledge base articles to help you can be found <a href='https://phoenixnap.com/kb/bare-metal-cloud-storage' target='_blank'>here</a> </span> <br> <b>All URLs are relative to (https://api.phoenixnap.com/network-storage/v1/)</b>
|
5
|
+
|
6
|
+
The version of the OpenAPI document: 1.0
|
7
|
+
Contact: support@phoenixnap.com
|
8
|
+
Generated by: https://openapi-generator.tech
|
9
|
+
OpenAPI Generator version: 6.1.0
|
10
|
+
|
11
|
+
=end
|
12
|
+
|
13
|
+
require 'spec_helper'
|
14
|
+
require 'json'
|
15
|
+
require 'date'
|
16
|
+
|
17
|
+
# Unit tests for NetworkStorageApi::PermissionsUpdate
|
18
|
+
# Automatically generated by openapi-generator (https://openapi-generator.tech)
|
19
|
+
# Please update as you see appropriate
|
20
|
+
describe NetworkStorageApi::PermissionsUpdate do
|
21
|
+
let(:instance) { NetworkStorageApi::PermissionsUpdate.new }
|
22
|
+
|
23
|
+
describe 'test an instance of PermissionsUpdate' do
|
24
|
+
it 'should create an instance of PermissionsUpdate' do
|
25
|
+
expect(instance).to be_instance_of(NetworkStorageApi::PermissionsUpdate)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
describe 'test attribute "nfs"' 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
|
+
end
|