pnap_network_storage_api 1.0.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 +7 -0
- data/Gemfile +9 -0
- data/README.md +158 -0
- data/Rakefile +10 -0
- data/VERSION +1 -0
- data/docs/Error.md +20 -0
- data/docs/NfsPermissions.md +26 -0
- data/docs/Permissions.md +18 -0
- data/docs/Status.md +15 -0
- data/docs/StorageNetwork.md +34 -0
- data/docs/StorageNetworkCreate.md +24 -0
- data/docs/StorageNetworkUpdate.md +20 -0
- data/docs/StorageNetworksApi.md +506 -0
- data/docs/Volume.md +36 -0
- data/docs/VolumeCreate.md +24 -0
- data/lib/pnap_network_storage_api/api/storage_networks_api.rb +474 -0
- data/lib/pnap_network_storage_api/api_client.rb +392 -0
- data/lib/pnap_network_storage_api/api_error.rb +57 -0
- data/lib/pnap_network_storage_api/configuration.rb +278 -0
- data/lib/pnap_network_storage_api/models/error.rb +236 -0
- data/lib/pnap_network_storage_api/models/nfs_permissions.rb +270 -0
- data/lib/pnap_network_storage_api/models/permissions.rb +219 -0
- data/lib/pnap_network_storage_api/models/status.rb +38 -0
- data/lib/pnap_network_storage_api/models/storage_network.rb +303 -0
- data/lib/pnap_network_storage_api/models/storage_network_create.rb +338 -0
- data/lib/pnap_network_storage_api/models/storage_network_update.rb +269 -0
- data/lib/pnap_network_storage_api/models/volume.rb +307 -0
- data/lib/pnap_network_storage_api/models/volume_create.rb +357 -0
- data/lib/pnap_network_storage_api/version.rb +19 -0
- data/lib/pnap_network_storage_api.rb +49 -0
- data/pnap_network_storage_api.gemspec +39 -0
- data/spec/api/storage_networks_api_spec.rb +121 -0
- data/spec/api_client_spec.rb +226 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/error_spec.rb +40 -0
- data/spec/models/nfs_permissions_spec.rb +58 -0
- data/spec/models/permissions_spec.rb +34 -0
- data/spec/models/status_spec.rb +28 -0
- data/spec/models/storage_network_create_spec.rb +52 -0
- data/spec/models/storage_network_spec.rb +82 -0
- data/spec/models/storage_network_update_spec.rb +40 -0
- data/spec/models/volume_create_spec.rb +52 -0
- data/spec/models/volume_spec.rb +88 -0
- data/spec/spec_helper.rb +111 -0
- metadata +140 -0
@@ -0,0 +1,506 @@
|
|
1
|
+
# NetworkStorageApi::StorageNetworksApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.phoenixnap.com/network-storage/v1*
|
4
|
+
|
5
|
+
| Method | HTTP request | Description |
|
6
|
+
| ------ | ------------ | ----------- |
|
7
|
+
| [**storage_networks_get**](StorageNetworksApi.md#storage_networks_get) | **GET** /storage-networks | List all storage networks. |
|
8
|
+
| [**storage_networks_id_delete**](StorageNetworksApi.md#storage_networks_id_delete) | **DELETE** /storage-networks/{storageNetworkId} | Delete a storage network and its volume. |
|
9
|
+
| [**storage_networks_id_get**](StorageNetworksApi.md#storage_networks_id_get) | **GET** /storage-networks/{storageNetworkId} | Get storage network details. |
|
10
|
+
| [**storage_networks_id_patch**](StorageNetworksApi.md#storage_networks_id_patch) | **PATCH** /storage-networks/{storageNetworkId} | Update storage network details. |
|
11
|
+
| [**storage_networks_post**](StorageNetworksApi.md#storage_networks_post) | **POST** /storage-networks | Create a storage network and volume. |
|
12
|
+
| [**storage_networks_storage_network_id_volumes_get**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_get) | **GET** /storage-networks/{storageNetworkId}/volumes | Display one or more volumes belonging to a storage network. |
|
13
|
+
| [**storage_networks_storage_network_id_volumes_volume_id_get**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_get) | **GET** /storage-networks/{storageNetworkId}/volumes/{volumeId} | Get a storage network's volume details. |
|
14
|
+
|
15
|
+
|
16
|
+
## storage_networks_get
|
17
|
+
|
18
|
+
> <Array<StorageNetwork>> storage_networks_get(opts)
|
19
|
+
|
20
|
+
List all storage networks.
|
21
|
+
|
22
|
+
List all storage networks.
|
23
|
+
|
24
|
+
### Examples
|
25
|
+
|
26
|
+
```ruby
|
27
|
+
require 'time'
|
28
|
+
require 'pnap_network_storage_api'
|
29
|
+
# setup authorization
|
30
|
+
NetworkStorageApi.configure do |config|
|
31
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
32
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
33
|
+
end
|
34
|
+
|
35
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
36
|
+
opts = {
|
37
|
+
location: 'PHX' # String | If present will filter the result by the given location.
|
38
|
+
}
|
39
|
+
|
40
|
+
begin
|
41
|
+
# List all storage networks.
|
42
|
+
result = api_instance.storage_networks_get(opts)
|
43
|
+
p result
|
44
|
+
rescue NetworkStorageApi::ApiError => e
|
45
|
+
puts "Error when calling StorageNetworksApi->storage_networks_get: #{e}"
|
46
|
+
end
|
47
|
+
```
|
48
|
+
|
49
|
+
#### Using the storage_networks_get_with_http_info variant
|
50
|
+
|
51
|
+
This returns an Array which contains the response data, status code and headers.
|
52
|
+
|
53
|
+
> <Array(<Array<StorageNetwork>>, Integer, Hash)> storage_networks_get_with_http_info(opts)
|
54
|
+
|
55
|
+
```ruby
|
56
|
+
begin
|
57
|
+
# List all storage networks.
|
58
|
+
data, status_code, headers = api_instance.storage_networks_get_with_http_info(opts)
|
59
|
+
p status_code # => 2xx
|
60
|
+
p headers # => { ... }
|
61
|
+
p data # => <Array<StorageNetwork>>
|
62
|
+
rescue NetworkStorageApi::ApiError => e
|
63
|
+
puts "Error when calling StorageNetworksApi->storage_networks_get_with_http_info: #{e}"
|
64
|
+
end
|
65
|
+
```
|
66
|
+
|
67
|
+
### Parameters
|
68
|
+
|
69
|
+
| Name | Type | Description | Notes |
|
70
|
+
| ---- | ---- | ----------- | ----- |
|
71
|
+
| **location** | **String** | If present will filter the result by the given location. | [optional] |
|
72
|
+
|
73
|
+
### Return type
|
74
|
+
|
75
|
+
[**Array<StorageNetwork>**](StorageNetwork.md)
|
76
|
+
|
77
|
+
### Authorization
|
78
|
+
|
79
|
+
[OAuth2](../README.md#OAuth2)
|
80
|
+
|
81
|
+
### HTTP request headers
|
82
|
+
|
83
|
+
- **Content-Type**: Not defined
|
84
|
+
- **Accept**: application/json
|
85
|
+
|
86
|
+
|
87
|
+
## storage_networks_id_delete
|
88
|
+
|
89
|
+
> storage_networks_id_delete(storage_network_id)
|
90
|
+
|
91
|
+
Delete a storage network and its volume.
|
92
|
+
|
93
|
+
Delete a storage network and its volume. A storage network can only be removed if it's not in 'BUSY' state. Billing stops on storage network deletion.
|
94
|
+
|
95
|
+
### Examples
|
96
|
+
|
97
|
+
```ruby
|
98
|
+
require 'time'
|
99
|
+
require 'pnap_network_storage_api'
|
100
|
+
# setup authorization
|
101
|
+
NetworkStorageApi.configure do |config|
|
102
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
103
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
104
|
+
end
|
105
|
+
|
106
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
107
|
+
storage_network_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of storage network.
|
108
|
+
|
109
|
+
begin
|
110
|
+
# Delete a storage network and its volume.
|
111
|
+
api_instance.storage_networks_id_delete(storage_network_id)
|
112
|
+
rescue NetworkStorageApi::ApiError => e
|
113
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_delete: #{e}"
|
114
|
+
end
|
115
|
+
```
|
116
|
+
|
117
|
+
#### Using the storage_networks_id_delete_with_http_info variant
|
118
|
+
|
119
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
120
|
+
|
121
|
+
> <Array(nil, Integer, Hash)> storage_networks_id_delete_with_http_info(storage_network_id)
|
122
|
+
|
123
|
+
```ruby
|
124
|
+
begin
|
125
|
+
# Delete a storage network and its volume.
|
126
|
+
data, status_code, headers = api_instance.storage_networks_id_delete_with_http_info(storage_network_id)
|
127
|
+
p status_code # => 2xx
|
128
|
+
p headers # => { ... }
|
129
|
+
p data # => nil
|
130
|
+
rescue NetworkStorageApi::ApiError => e
|
131
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_delete_with_http_info: #{e}"
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
### Parameters
|
136
|
+
|
137
|
+
| Name | Type | Description | Notes |
|
138
|
+
| ---- | ---- | ----------- | ----- |
|
139
|
+
| **storage_network_id** | **String** | ID of storage network. | |
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
nil (empty response body)
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
[OAuth2](../README.md#OAuth2)
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: Not defined
|
152
|
+
- **Accept**: application/json
|
153
|
+
|
154
|
+
|
155
|
+
## storage_networks_id_get
|
156
|
+
|
157
|
+
> <StorageNetwork> storage_networks_id_get(storage_network_id)
|
158
|
+
|
159
|
+
Get storage network details.
|
160
|
+
|
161
|
+
Get storage network details.
|
162
|
+
|
163
|
+
### Examples
|
164
|
+
|
165
|
+
```ruby
|
166
|
+
require 'time'
|
167
|
+
require 'pnap_network_storage_api'
|
168
|
+
# setup authorization
|
169
|
+
NetworkStorageApi.configure do |config|
|
170
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
171
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
172
|
+
end
|
173
|
+
|
174
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
175
|
+
storage_network_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of storage network.
|
176
|
+
|
177
|
+
begin
|
178
|
+
# Get storage network details.
|
179
|
+
result = api_instance.storage_networks_id_get(storage_network_id)
|
180
|
+
p result
|
181
|
+
rescue NetworkStorageApi::ApiError => e
|
182
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_get: #{e}"
|
183
|
+
end
|
184
|
+
```
|
185
|
+
|
186
|
+
#### Using the storage_networks_id_get_with_http_info variant
|
187
|
+
|
188
|
+
This returns an Array which contains the response data, status code and headers.
|
189
|
+
|
190
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_get_with_http_info(storage_network_id)
|
191
|
+
|
192
|
+
```ruby
|
193
|
+
begin
|
194
|
+
# Get storage network details.
|
195
|
+
data, status_code, headers = api_instance.storage_networks_id_get_with_http_info(storage_network_id)
|
196
|
+
p status_code # => 2xx
|
197
|
+
p headers # => { ... }
|
198
|
+
p data # => <StorageNetwork>
|
199
|
+
rescue NetworkStorageApi::ApiError => e
|
200
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_get_with_http_info: #{e}"
|
201
|
+
end
|
202
|
+
```
|
203
|
+
|
204
|
+
### Parameters
|
205
|
+
|
206
|
+
| Name | Type | Description | Notes |
|
207
|
+
| ---- | ---- | ----------- | ----- |
|
208
|
+
| **storage_network_id** | **String** | ID of storage network. | |
|
209
|
+
|
210
|
+
### Return type
|
211
|
+
|
212
|
+
[**StorageNetwork**](StorageNetwork.md)
|
213
|
+
|
214
|
+
### Authorization
|
215
|
+
|
216
|
+
[OAuth2](../README.md#OAuth2)
|
217
|
+
|
218
|
+
### HTTP request headers
|
219
|
+
|
220
|
+
- **Content-Type**: Not defined
|
221
|
+
- **Accept**: application/json
|
222
|
+
|
223
|
+
|
224
|
+
## storage_networks_id_patch
|
225
|
+
|
226
|
+
> <StorageNetwork> storage_networks_id_patch(storage_network_id, opts)
|
227
|
+
|
228
|
+
Update storage network details.
|
229
|
+
|
230
|
+
Update storage network details.
|
231
|
+
|
232
|
+
### Examples
|
233
|
+
|
234
|
+
```ruby
|
235
|
+
require 'time'
|
236
|
+
require 'pnap_network_storage_api'
|
237
|
+
# setup authorization
|
238
|
+
NetworkStorageApi.configure do |config|
|
239
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
240
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
241
|
+
end
|
242
|
+
|
243
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
244
|
+
storage_network_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of storage network.
|
245
|
+
opts = {
|
246
|
+
storage_network_update: NetworkStorageApi::StorageNetworkUpdate.new # StorageNetworkUpdate | Storage network to be updated.
|
247
|
+
}
|
248
|
+
|
249
|
+
begin
|
250
|
+
# Update storage network details.
|
251
|
+
result = api_instance.storage_networks_id_patch(storage_network_id, opts)
|
252
|
+
p result
|
253
|
+
rescue NetworkStorageApi::ApiError => e
|
254
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_patch: #{e}"
|
255
|
+
end
|
256
|
+
```
|
257
|
+
|
258
|
+
#### Using the storage_networks_id_patch_with_http_info variant
|
259
|
+
|
260
|
+
This returns an Array which contains the response data, status code and headers.
|
261
|
+
|
262
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_patch_with_http_info(storage_network_id, opts)
|
263
|
+
|
264
|
+
```ruby
|
265
|
+
begin
|
266
|
+
# Update storage network details.
|
267
|
+
data, status_code, headers = api_instance.storage_networks_id_patch_with_http_info(storage_network_id, opts)
|
268
|
+
p status_code # => 2xx
|
269
|
+
p headers # => { ... }
|
270
|
+
p data # => <StorageNetwork>
|
271
|
+
rescue NetworkStorageApi::ApiError => e
|
272
|
+
puts "Error when calling StorageNetworksApi->storage_networks_id_patch_with_http_info: #{e}"
|
273
|
+
end
|
274
|
+
```
|
275
|
+
|
276
|
+
### Parameters
|
277
|
+
|
278
|
+
| Name | Type | Description | Notes |
|
279
|
+
| ---- | ---- | ----------- | ----- |
|
280
|
+
| **storage_network_id** | **String** | ID of storage network. | |
|
281
|
+
| **storage_network_update** | [**StorageNetworkUpdate**](StorageNetworkUpdate.md) | Storage network to be updated. | [optional] |
|
282
|
+
|
283
|
+
### Return type
|
284
|
+
|
285
|
+
[**StorageNetwork**](StorageNetwork.md)
|
286
|
+
|
287
|
+
### Authorization
|
288
|
+
|
289
|
+
[OAuth2](../README.md#OAuth2)
|
290
|
+
|
291
|
+
### HTTP request headers
|
292
|
+
|
293
|
+
- **Content-Type**: application/json
|
294
|
+
- **Accept**: application/json
|
295
|
+
|
296
|
+
|
297
|
+
## storage_networks_post
|
298
|
+
|
299
|
+
> <StorageNetwork> storage_networks_post(opts)
|
300
|
+
|
301
|
+
Create a storage network and volume.
|
302
|
+
|
303
|
+
Create a storage network and volume.
|
304
|
+
|
305
|
+
### Examples
|
306
|
+
|
307
|
+
```ruby
|
308
|
+
require 'time'
|
309
|
+
require 'pnap_network_storage_api'
|
310
|
+
# setup authorization
|
311
|
+
NetworkStorageApi.configure do |config|
|
312
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
313
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
314
|
+
end
|
315
|
+
|
316
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
317
|
+
opts = {
|
318
|
+
storage_network_create: NetworkStorageApi::StorageNetworkCreate.new({name: 'My storage network', location: 'PHX', volumes: [NetworkStorageApi::VolumeCreate.new({name: 'My volume name', capacity_in_gb: 2000})]}) # StorageNetworkCreate |
|
319
|
+
}
|
320
|
+
|
321
|
+
begin
|
322
|
+
# Create a storage network and volume.
|
323
|
+
result = api_instance.storage_networks_post(opts)
|
324
|
+
p result
|
325
|
+
rescue NetworkStorageApi::ApiError => e
|
326
|
+
puts "Error when calling StorageNetworksApi->storage_networks_post: #{e}"
|
327
|
+
end
|
328
|
+
```
|
329
|
+
|
330
|
+
#### Using the storage_networks_post_with_http_info variant
|
331
|
+
|
332
|
+
This returns an Array which contains the response data, status code and headers.
|
333
|
+
|
334
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_post_with_http_info(opts)
|
335
|
+
|
336
|
+
```ruby
|
337
|
+
begin
|
338
|
+
# Create a storage network and volume.
|
339
|
+
data, status_code, headers = api_instance.storage_networks_post_with_http_info(opts)
|
340
|
+
p status_code # => 2xx
|
341
|
+
p headers # => { ... }
|
342
|
+
p data # => <StorageNetwork>
|
343
|
+
rescue NetworkStorageApi::ApiError => e
|
344
|
+
puts "Error when calling StorageNetworksApi->storage_networks_post_with_http_info: #{e}"
|
345
|
+
end
|
346
|
+
```
|
347
|
+
|
348
|
+
### Parameters
|
349
|
+
|
350
|
+
| Name | Type | Description | Notes |
|
351
|
+
| ---- | ---- | ----------- | ----- |
|
352
|
+
| **storage_network_create** | [**StorageNetworkCreate**](StorageNetworkCreate.md) | | [optional] |
|
353
|
+
|
354
|
+
### Return type
|
355
|
+
|
356
|
+
[**StorageNetwork**](StorageNetwork.md)
|
357
|
+
|
358
|
+
### Authorization
|
359
|
+
|
360
|
+
[OAuth2](../README.md#OAuth2)
|
361
|
+
|
362
|
+
### HTTP request headers
|
363
|
+
|
364
|
+
- **Content-Type**: application/json
|
365
|
+
- **Accept**: application/json
|
366
|
+
|
367
|
+
|
368
|
+
## storage_networks_storage_network_id_volumes_get
|
369
|
+
|
370
|
+
> <Array<Volume>> storage_networks_storage_network_id_volumes_get(storage_network_id)
|
371
|
+
|
372
|
+
Display one or more volumes belonging to a storage network.
|
373
|
+
|
374
|
+
Display one or more volumes belonging to a storage network.
|
375
|
+
|
376
|
+
### Examples
|
377
|
+
|
378
|
+
```ruby
|
379
|
+
require 'time'
|
380
|
+
require 'pnap_network_storage_api'
|
381
|
+
# setup authorization
|
382
|
+
NetworkStorageApi.configure do |config|
|
383
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
384
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
385
|
+
end
|
386
|
+
|
387
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
388
|
+
storage_network_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of storage network.
|
389
|
+
|
390
|
+
begin
|
391
|
+
# Display one or more volumes belonging to a storage network.
|
392
|
+
result = api_instance.storage_networks_storage_network_id_volumes_get(storage_network_id)
|
393
|
+
p result
|
394
|
+
rescue NetworkStorageApi::ApiError => e
|
395
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_get: #{e}"
|
396
|
+
end
|
397
|
+
```
|
398
|
+
|
399
|
+
#### Using the storage_networks_storage_network_id_volumes_get_with_http_info variant
|
400
|
+
|
401
|
+
This returns an Array which contains the response data, status code and headers.
|
402
|
+
|
403
|
+
> <Array(<Array<Volume>>, Integer, Hash)> storage_networks_storage_network_id_volumes_get_with_http_info(storage_network_id)
|
404
|
+
|
405
|
+
```ruby
|
406
|
+
begin
|
407
|
+
# Display one or more volumes belonging to a storage network.
|
408
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_get_with_http_info(storage_network_id)
|
409
|
+
p status_code # => 2xx
|
410
|
+
p headers # => { ... }
|
411
|
+
p data # => <Array<Volume>>
|
412
|
+
rescue NetworkStorageApi::ApiError => e
|
413
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_get_with_http_info: #{e}"
|
414
|
+
end
|
415
|
+
```
|
416
|
+
|
417
|
+
### Parameters
|
418
|
+
|
419
|
+
| Name | Type | Description | Notes |
|
420
|
+
| ---- | ---- | ----------- | ----- |
|
421
|
+
| **storage_network_id** | **String** | ID of storage network. | |
|
422
|
+
|
423
|
+
### Return type
|
424
|
+
|
425
|
+
[**Array<Volume>**](Volume.md)
|
426
|
+
|
427
|
+
### Authorization
|
428
|
+
|
429
|
+
[OAuth2](../README.md#OAuth2)
|
430
|
+
|
431
|
+
### HTTP request headers
|
432
|
+
|
433
|
+
- **Content-Type**: Not defined
|
434
|
+
- **Accept**: application/json
|
435
|
+
|
436
|
+
|
437
|
+
## storage_networks_storage_network_id_volumes_volume_id_get
|
438
|
+
|
439
|
+
> <Volume> storage_networks_storage_network_id_volumes_volume_id_get(storage_network_id, volume_id)
|
440
|
+
|
441
|
+
Get a storage network's volume details.
|
442
|
+
|
443
|
+
Get a storage network's volume details.
|
444
|
+
|
445
|
+
### Examples
|
446
|
+
|
447
|
+
```ruby
|
448
|
+
require 'time'
|
449
|
+
require 'pnap_network_storage_api'
|
450
|
+
# setup authorization
|
451
|
+
NetworkStorageApi.configure do |config|
|
452
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
453
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
454
|
+
end
|
455
|
+
|
456
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
457
|
+
storage_network_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of storage network.
|
458
|
+
volume_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of volume.
|
459
|
+
|
460
|
+
begin
|
461
|
+
# Get a storage network's volume details.
|
462
|
+
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_get(storage_network_id, volume_id)
|
463
|
+
p result
|
464
|
+
rescue NetworkStorageApi::ApiError => e
|
465
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_get: #{e}"
|
466
|
+
end
|
467
|
+
```
|
468
|
+
|
469
|
+
#### Using the storage_networks_storage_network_id_volumes_volume_id_get_with_http_info variant
|
470
|
+
|
471
|
+
This returns an Array which contains the response data, status code and headers.
|
472
|
+
|
473
|
+
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_network_id, volume_id)
|
474
|
+
|
475
|
+
```ruby
|
476
|
+
begin
|
477
|
+
# Get a storage network's volume details.
|
478
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_network_id, volume_id)
|
479
|
+
p status_code # => 2xx
|
480
|
+
p headers # => { ... }
|
481
|
+
p data # => <Volume>
|
482
|
+
rescue NetworkStorageApi::ApiError => e
|
483
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_get_with_http_info: #{e}"
|
484
|
+
end
|
485
|
+
```
|
486
|
+
|
487
|
+
### Parameters
|
488
|
+
|
489
|
+
| Name | Type | Description | Notes |
|
490
|
+
| ---- | ---- | ----------- | ----- |
|
491
|
+
| **storage_network_id** | **String** | ID of storage network. | |
|
492
|
+
| **volume_id** | **String** | ID of volume. | |
|
493
|
+
|
494
|
+
### Return type
|
495
|
+
|
496
|
+
[**Volume**](Volume.md)
|
497
|
+
|
498
|
+
### Authorization
|
499
|
+
|
500
|
+
[OAuth2](../README.md#OAuth2)
|
501
|
+
|
502
|
+
### HTTP request headers
|
503
|
+
|
504
|
+
- **Content-Type**: Not defined
|
505
|
+
- **Accept**: application/json
|
506
|
+
|
data/docs/Volume.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# NetworkStorageApi::Volume
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | Volume ID. | [optional] |
|
8
|
+
| **name** | **String** | Volume friendly name. | [optional] |
|
9
|
+
| **description** | **String** | Volume description. | [optional] |
|
10
|
+
| **path** | **String** | Volume's full path. It is in form of `/{volumeId}/pathSuffix`'. | [optional] |
|
11
|
+
| **path_suffix** | **String** | Last part of volume's path. | [optional] |
|
12
|
+
| **capacity_in_gb** | **Integer** | Maximum capacity in GB. | [optional] |
|
13
|
+
| **protocol** | **String** | File system protocol. Currently this field should be set to `NFS`. | [optional] |
|
14
|
+
| **status** | [**Status**](Status.md) | | [optional] |
|
15
|
+
| **created_on** | **Time** | | [optional] |
|
16
|
+
| **permissions** | [**Permissions**](Permissions.md) | | [optional] |
|
17
|
+
|
18
|
+
## Example
|
19
|
+
|
20
|
+
```ruby
|
21
|
+
require 'pnap_network_storage_api'
|
22
|
+
|
23
|
+
instance = NetworkStorageApi::Volume.new(
|
24
|
+
id: 50dc434c-9bba-427b-bcd6-0bdba45c4dd2,
|
25
|
+
name: My volume name,
|
26
|
+
description: My volume description,
|
27
|
+
path: /qjul77ahf5fplr2ba484/shared-docs,
|
28
|
+
path_suffix: /shared-docs,
|
29
|
+
capacity_in_gb: 2000,
|
30
|
+
protocol: NFS,
|
31
|
+
status: null,
|
32
|
+
created_on: 2021-03-13T20:24:32.491Z,
|
33
|
+
permissions: null
|
34
|
+
)
|
35
|
+
```
|
36
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# NetworkStorageApi::VolumeCreate
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | Volume friendly name. | |
|
8
|
+
| **description** | **String** | Volume description. | [optional] |
|
9
|
+
| **path_suffix** | **String** | Last part of volume's path. | [optional] |
|
10
|
+
| **capacity_in_gb** | **Integer** | Capacity of Volume in GB. Currently only whole numbers and multiples of 1000GB are supported. | |
|
11
|
+
|
12
|
+
## Example
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
require 'pnap_network_storage_api'
|
16
|
+
|
17
|
+
instance = NetworkStorageApi::VolumeCreate.new(
|
18
|
+
name: My volume name,
|
19
|
+
description: My volume description,
|
20
|
+
path_suffix: /shared-docs,
|
21
|
+
capacity_in_gb: 2000
|
22
|
+
)
|
23
|
+
```
|
24
|
+
|