pnap_network_storage_api 1.3.0 → 2.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 +4 -4
- data/README.md +14 -8
- data/VERSION +1 -1
- data/docs/StorageNetwork.md +2 -0
- data/docs/StorageNetworkCreate.md +3 -1
- data/docs/StorageNetworkVolumeCreate.md +3 -1
- data/docs/StorageNetworksApi.md +146 -76
- data/docs/TagAssignment.md +26 -0
- data/docs/TagAssignmentRequest.md +20 -0
- data/docs/Volume.md +5 -1
- data/docs/VolumeCreate.md +3 -1
- data/lib/pnap_network_storage_api/api/storage_networks_api.rb +187 -88
- data/lib/pnap_network_storage_api/api_client.rb +24 -21
- data/lib/pnap_network_storage_api/api_error.rb +2 -1
- data/lib/pnap_network_storage_api/configuration.rb +28 -9
- data/lib/pnap_network_storage_api/models/error.rb +16 -19
- data/lib/pnap_network_storage_api/models/nfs_permissions.rb +14 -19
- data/lib/pnap_network_storage_api/models/nfs_permissions_create.rb +14 -19
- data/lib/pnap_network_storage_api/models/nfs_permissions_update.rb +14 -19
- data/lib/pnap_network_storage_api/models/permissions.rb +14 -19
- data/lib/pnap_network_storage_api/models/permissions_create.rb +14 -19
- data/lib/pnap_network_storage_api/models/permissions_update.rb +14 -19
- data/lib/pnap_network_storage_api/models/status.rb +8 -4
- data/lib/pnap_network_storage_api/models/storage_network.rb +47 -20
- data/lib/pnap_network_storage_api/models/storage_network_create.rb +78 -24
- data/lib/pnap_network_storage_api/models/storage_network_update.rb +36 -22
- data/lib/pnap_network_storage_api/models/storage_network_volume_create.rb +57 -27
- data/lib/pnap_network_storage_api/models/tag_assignment.rb +311 -0
- data/lib/pnap_network_storage_api/models/tag_assignment_request.rb +233 -0
- data/lib/pnap_network_storage_api/models/volume.rb +62 -23
- data/lib/pnap_network_storage_api/models/volume_create.rb +57 -27
- data/lib/pnap_network_storage_api/models/volume_update.rb +48 -26
- data/lib/pnap_network_storage_api/version.rb +1 -1
- data/lib/pnap_network_storage_api.rb +3 -1
- data/pnap_network_storage_api.gemspec +2 -2
- data/spec/api/storage_networks_api_spec.rb +70 -15
- data/spec/models/error_spec.rb +6 -4
- data/spec/models/nfs_permissions_create_spec.rb +9 -7
- data/spec/models/nfs_permissions_spec.rb +9 -7
- data/spec/models/nfs_permissions_update_spec.rb +9 -7
- data/spec/models/permissions_create_spec.rb +5 -3
- data/spec/models/permissions_spec.rb +5 -3
- data/spec/models/permissions_update_spec.rb +5 -3
- data/spec/models/status_spec.rb +4 -2
- data/spec/models/storage_network_create_spec.rb +14 -6
- data/spec/models/storage_network_spec.rb +19 -11
- data/spec/models/storage_network_update_spec.rb +6 -4
- data/spec/models/storage_network_volume_create_spec.rb +14 -6
- data/spec/models/tag_assignment_request_spec.rb +42 -0
- data/spec/models/tag_assignment_spec.rb +64 -0
- data/spec/models/volume_create_spec.rb +20 -6
- data/spec/models/volume_spec.rb +32 -12
- data/spec/models/volume_update_spec.rb +29 -3
- data/spec/spec_helper.rb +1 -1
- metadata +20 -16
- data/spec/api_client_spec.rb +0 -226
- data/spec/configuration_spec.rb +0 -42
data/docs/StorageNetworksApi.md
CHANGED
@@ -5,15 +5,16 @@ All URIs are relative to *https://api.phoenixnap.com/network-storage/v1*
|
|
5
5
|
| Method | HTTP request | Description |
|
6
6
|
| ------ | ------------ | ----------- |
|
7
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/{
|
9
|
-
| [**storage_networks_id_get**](StorageNetworksApi.md#storage_networks_id_get) | **GET** /storage-networks/{
|
10
|
-
| [**storage_networks_id_patch**](StorageNetworksApi.md#storage_networks_id_patch) | **PATCH** /storage-networks/{
|
8
|
+
| [**storage_networks_id_delete**](StorageNetworksApi.md#storage_networks_id_delete) | **DELETE** /storage-networks/{storageId} | Delete a storage network and its volume. |
|
9
|
+
| [**storage_networks_id_get**](StorageNetworksApi.md#storage_networks_id_get) | **GET** /storage-networks/{storageId} | Get storage network details. |
|
10
|
+
| [**storage_networks_id_patch**](StorageNetworksApi.md#storage_networks_id_patch) | **PATCH** /storage-networks/{storageId} | Update storage network details. |
|
11
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/{
|
13
|
-
| [**storage_networks_storage_network_id_volumes_post**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_post) | **POST** /storage-networks/{
|
14
|
-
| [**storage_networks_storage_network_id_volumes_volume_id_delete**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_delete) | **DELETE** /storage-networks/{
|
15
|
-
| [**storage_networks_storage_network_id_volumes_volume_id_get**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_get) | **GET** /storage-networks/{
|
16
|
-
| [**storage_networks_storage_network_id_volumes_volume_id_patch**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_patch) | **PATCH** /storage-networks/{
|
12
|
+
| [**storage_networks_storage_network_id_volumes_get**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_get) | **GET** /storage-networks/{storageId}/volumes | Display one or more volumes belonging to a storage network. |
|
13
|
+
| [**storage_networks_storage_network_id_volumes_post**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_post) | **POST** /storage-networks/{storageId}/volumes | Create a volume belonging to a storage network. |
|
14
|
+
| [**storage_networks_storage_network_id_volumes_volume_id_delete**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_delete) | **DELETE** /storage-networks/{storageId}/volumes/{volumeId} | Delete a Storage Network's Volume |
|
15
|
+
| [**storage_networks_storage_network_id_volumes_volume_id_get**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_get) | **GET** /storage-networks/{storageId}/volumes/{volumeId} | Get a storage network's volume details. |
|
16
|
+
| [**storage_networks_storage_network_id_volumes_volume_id_patch**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_patch) | **PATCH** /storage-networks/{storageId}/volumes/{volumeId} | Update a storage network's volume details. |
|
17
|
+
| [**storage_networks_storage_network_id_volumes_volume_id_tags_put**](StorageNetworksApi.md#storage_networks_storage_network_id_volumes_volume_id_tags_put) | **PUT** /storage-networks/{storageId}/volumes/{volumeId}/tags | Overwrites tags assigned for the volume. |
|
17
18
|
|
18
19
|
|
19
20
|
## storage_networks_get
|
@@ -89,7 +90,7 @@ end
|
|
89
90
|
|
90
91
|
## storage_networks_id_delete
|
91
92
|
|
92
|
-
> storage_networks_id_delete(
|
93
|
+
> storage_networks_id_delete(storage_id)
|
93
94
|
|
94
95
|
Delete a storage network and its volume.
|
95
96
|
|
@@ -107,11 +108,11 @@ NetworkStorageApi.configure do |config|
|
|
107
108
|
end
|
108
109
|
|
109
110
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
110
|
-
|
111
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
111
112
|
|
112
113
|
begin
|
113
114
|
# Delete a storage network and its volume.
|
114
|
-
api_instance.storage_networks_id_delete(
|
115
|
+
api_instance.storage_networks_id_delete(storage_id)
|
115
116
|
rescue NetworkStorageApi::ApiError => e
|
116
117
|
puts "Error when calling StorageNetworksApi->storage_networks_id_delete: #{e}"
|
117
118
|
end
|
@@ -121,12 +122,12 @@ end
|
|
121
122
|
|
122
123
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
123
124
|
|
124
|
-
> <Array(nil, Integer, Hash)> storage_networks_id_delete_with_http_info(
|
125
|
+
> <Array(nil, Integer, Hash)> storage_networks_id_delete_with_http_info(storage_id)
|
125
126
|
|
126
127
|
```ruby
|
127
128
|
begin
|
128
129
|
# Delete a storage network and its volume.
|
129
|
-
data, status_code, headers = api_instance.storage_networks_id_delete_with_http_info(
|
130
|
+
data, status_code, headers = api_instance.storage_networks_id_delete_with_http_info(storage_id)
|
130
131
|
p status_code # => 2xx
|
131
132
|
p headers # => { ... }
|
132
133
|
p data # => nil
|
@@ -139,7 +140,7 @@ end
|
|
139
140
|
|
140
141
|
| Name | Type | Description | Notes |
|
141
142
|
| ---- | ---- | ----------- | ----- |
|
142
|
-
| **
|
143
|
+
| **storage_id** | **String** | ID of the storage. | |
|
143
144
|
|
144
145
|
### Return type
|
145
146
|
|
@@ -157,7 +158,7 @@ nil (empty response body)
|
|
157
158
|
|
158
159
|
## storage_networks_id_get
|
159
160
|
|
160
|
-
> <StorageNetwork> storage_networks_id_get(
|
161
|
+
> <StorageNetwork> storage_networks_id_get(storage_id)
|
161
162
|
|
162
163
|
Get storage network details.
|
163
164
|
|
@@ -175,11 +176,11 @@ NetworkStorageApi.configure do |config|
|
|
175
176
|
end
|
176
177
|
|
177
178
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
178
|
-
|
179
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
179
180
|
|
180
181
|
begin
|
181
182
|
# Get storage network details.
|
182
|
-
result = api_instance.storage_networks_id_get(
|
183
|
+
result = api_instance.storage_networks_id_get(storage_id)
|
183
184
|
p result
|
184
185
|
rescue NetworkStorageApi::ApiError => e
|
185
186
|
puts "Error when calling StorageNetworksApi->storage_networks_id_get: #{e}"
|
@@ -190,12 +191,12 @@ end
|
|
190
191
|
|
191
192
|
This returns an Array which contains the response data, status code and headers.
|
192
193
|
|
193
|
-
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_get_with_http_info(
|
194
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_get_with_http_info(storage_id)
|
194
195
|
|
195
196
|
```ruby
|
196
197
|
begin
|
197
198
|
# Get storage network details.
|
198
|
-
data, status_code, headers = api_instance.storage_networks_id_get_with_http_info(
|
199
|
+
data, status_code, headers = api_instance.storage_networks_id_get_with_http_info(storage_id)
|
199
200
|
p status_code # => 2xx
|
200
201
|
p headers # => { ... }
|
201
202
|
p data # => <StorageNetwork>
|
@@ -208,7 +209,7 @@ end
|
|
208
209
|
|
209
210
|
| Name | Type | Description | Notes |
|
210
211
|
| ---- | ---- | ----------- | ----- |
|
211
|
-
| **
|
212
|
+
| **storage_id** | **String** | ID of the storage. | |
|
212
213
|
|
213
214
|
### Return type
|
214
215
|
|
@@ -226,7 +227,7 @@ end
|
|
226
227
|
|
227
228
|
## storage_networks_id_patch
|
228
229
|
|
229
|
-
> <StorageNetwork> storage_networks_id_patch(
|
230
|
+
> <StorageNetwork> storage_networks_id_patch(storage_id, storage_network_update)
|
230
231
|
|
231
232
|
Update storage network details.
|
232
233
|
|
@@ -244,14 +245,12 @@ NetworkStorageApi.configure do |config|
|
|
244
245
|
end
|
245
246
|
|
246
247
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
247
|
-
|
248
|
-
|
249
|
-
storage_network_update: NetworkStorageApi::StorageNetworkUpdate.new # StorageNetworkUpdate | Storage network to be updated.
|
250
|
-
}
|
248
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
249
|
+
storage_network_update = NetworkStorageApi::StorageNetworkUpdate.new # StorageNetworkUpdate | Storage network to be updated.
|
251
250
|
|
252
251
|
begin
|
253
252
|
# Update storage network details.
|
254
|
-
result = api_instance.storage_networks_id_patch(
|
253
|
+
result = api_instance.storage_networks_id_patch(storage_id, storage_network_update)
|
255
254
|
p result
|
256
255
|
rescue NetworkStorageApi::ApiError => e
|
257
256
|
puts "Error when calling StorageNetworksApi->storage_networks_id_patch: #{e}"
|
@@ -262,12 +261,12 @@ end
|
|
262
261
|
|
263
262
|
This returns an Array which contains the response data, status code and headers.
|
264
263
|
|
265
|
-
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_patch_with_http_info(
|
264
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_id_patch_with_http_info(storage_id, storage_network_update)
|
266
265
|
|
267
266
|
```ruby
|
268
267
|
begin
|
269
268
|
# Update storage network details.
|
270
|
-
data, status_code, headers = api_instance.storage_networks_id_patch_with_http_info(
|
269
|
+
data, status_code, headers = api_instance.storage_networks_id_patch_with_http_info(storage_id, storage_network_update)
|
271
270
|
p status_code # => 2xx
|
272
271
|
p headers # => { ... }
|
273
272
|
p data # => <StorageNetwork>
|
@@ -280,8 +279,8 @@ end
|
|
280
279
|
|
281
280
|
| Name | Type | Description | Notes |
|
282
281
|
| ---- | ---- | ----------- | ----- |
|
283
|
-
| **
|
284
|
-
| **storage_network_update** | [**StorageNetworkUpdate**](StorageNetworkUpdate.md) | Storage network to be updated. |
|
282
|
+
| **storage_id** | **String** | ID of the storage. | |
|
283
|
+
| **storage_network_update** | [**StorageNetworkUpdate**](StorageNetworkUpdate.md) | Storage network to be updated. | |
|
285
284
|
|
286
285
|
### Return type
|
287
286
|
|
@@ -299,7 +298,7 @@ end
|
|
299
298
|
|
300
299
|
## storage_networks_post
|
301
300
|
|
302
|
-
> <StorageNetwork> storage_networks_post(
|
301
|
+
> <StorageNetwork> storage_networks_post(storage_network_create)
|
303
302
|
|
304
303
|
Create a storage network and volume.
|
305
304
|
|
@@ -317,13 +316,11 @@ NetworkStorageApi.configure do |config|
|
|
317
316
|
end
|
318
317
|
|
319
318
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
320
|
-
|
321
|
-
storage_network_create: NetworkStorageApi::StorageNetworkCreate.new({name: 'My storage network', location: 'PHX', volumes: [NetworkStorageApi::StorageNetworkVolumeCreate.new({name: 'My volume name', capacity_in_gb: 2000})]}) # StorageNetworkCreate |
|
322
|
-
}
|
319
|
+
storage_network_create = NetworkStorageApi::StorageNetworkCreate.new({name: 'My storage network', location: 'PHX', volumes: [NetworkStorageApi::StorageNetworkVolumeCreate.new({name: 'My volume name', capacity_in_gb: 2000})]}) # StorageNetworkCreate |
|
323
320
|
|
324
321
|
begin
|
325
322
|
# Create a storage network and volume.
|
326
|
-
result = api_instance.storage_networks_post(
|
323
|
+
result = api_instance.storage_networks_post(storage_network_create)
|
327
324
|
p result
|
328
325
|
rescue NetworkStorageApi::ApiError => e
|
329
326
|
puts "Error when calling StorageNetworksApi->storage_networks_post: #{e}"
|
@@ -334,12 +331,12 @@ end
|
|
334
331
|
|
335
332
|
This returns an Array which contains the response data, status code and headers.
|
336
333
|
|
337
|
-
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_post_with_http_info(
|
334
|
+
> <Array(<StorageNetwork>, Integer, Hash)> storage_networks_post_with_http_info(storage_network_create)
|
338
335
|
|
339
336
|
```ruby
|
340
337
|
begin
|
341
338
|
# Create a storage network and volume.
|
342
|
-
data, status_code, headers = api_instance.storage_networks_post_with_http_info(
|
339
|
+
data, status_code, headers = api_instance.storage_networks_post_with_http_info(storage_network_create)
|
343
340
|
p status_code # => 2xx
|
344
341
|
p headers # => { ... }
|
345
342
|
p data # => <StorageNetwork>
|
@@ -352,7 +349,7 @@ end
|
|
352
349
|
|
353
350
|
| Name | Type | Description | Notes |
|
354
351
|
| ---- | ---- | ----------- | ----- |
|
355
|
-
| **storage_network_create** | [**StorageNetworkCreate**](StorageNetworkCreate.md) | |
|
352
|
+
| **storage_network_create** | [**StorageNetworkCreate**](StorageNetworkCreate.md) | | |
|
356
353
|
|
357
354
|
### Return type
|
358
355
|
|
@@ -370,7 +367,7 @@ end
|
|
370
367
|
|
371
368
|
## storage_networks_storage_network_id_volumes_get
|
372
369
|
|
373
|
-
> <Array<Volume>> storage_networks_storage_network_id_volumes_get(
|
370
|
+
> <Array<Volume>> storage_networks_storage_network_id_volumes_get(storage_id, opts)
|
374
371
|
|
375
372
|
Display one or more volumes belonging to a storage network.
|
376
373
|
|
@@ -388,11 +385,14 @@ NetworkStorageApi.configure do |config|
|
|
388
385
|
end
|
389
386
|
|
390
387
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
391
|
-
|
388
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
389
|
+
opts = {
|
390
|
+
tag: ['inner_example'] # Array<String> | A list of query parameters related to tags in the form of tagName.tagValue
|
391
|
+
}
|
392
392
|
|
393
393
|
begin
|
394
394
|
# Display one or more volumes belonging to a storage network.
|
395
|
-
result = api_instance.storage_networks_storage_network_id_volumes_get(
|
395
|
+
result = api_instance.storage_networks_storage_network_id_volumes_get(storage_id, opts)
|
396
396
|
p result
|
397
397
|
rescue NetworkStorageApi::ApiError => e
|
398
398
|
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_get: #{e}"
|
@@ -403,12 +403,12 @@ end
|
|
403
403
|
|
404
404
|
This returns an Array which contains the response data, status code and headers.
|
405
405
|
|
406
|
-
> <Array(<Array<Volume>>, Integer, Hash)> storage_networks_storage_network_id_volumes_get_with_http_info(
|
406
|
+
> <Array(<Array<Volume>>, Integer, Hash)> storage_networks_storage_network_id_volumes_get_with_http_info(storage_id, opts)
|
407
407
|
|
408
408
|
```ruby
|
409
409
|
begin
|
410
410
|
# Display one or more volumes belonging to a storage network.
|
411
|
-
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_get_with_http_info(
|
411
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_get_with_http_info(storage_id, opts)
|
412
412
|
p status_code # => 2xx
|
413
413
|
p headers # => { ... }
|
414
414
|
p data # => <Array<Volume>>
|
@@ -421,7 +421,8 @@ end
|
|
421
421
|
|
422
422
|
| Name | Type | Description | Notes |
|
423
423
|
| ---- | ---- | ----------- | ----- |
|
424
|
-
| **
|
424
|
+
| **storage_id** | **String** | ID of the storage. | |
|
425
|
+
| **tag** | [**Array<String>**](String.md) | A list of query parameters related to tags in the form of tagName.tagValue | [optional] |
|
425
426
|
|
426
427
|
### Return type
|
427
428
|
|
@@ -439,7 +440,7 @@ end
|
|
439
440
|
|
440
441
|
## storage_networks_storage_network_id_volumes_post
|
441
442
|
|
442
|
-
> <Volume> storage_networks_storage_network_id_volumes_post(
|
443
|
+
> <Volume> storage_networks_storage_network_id_volumes_post(storage_id, volume_create)
|
443
444
|
|
444
445
|
Create a volume belonging to a storage network.
|
445
446
|
|
@@ -457,14 +458,12 @@ NetworkStorageApi.configure do |config|
|
|
457
458
|
end
|
458
459
|
|
459
460
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
460
|
-
|
461
|
-
|
462
|
-
volume_create: NetworkStorageApi::VolumeCreate.new({name: 'My volume name', capacity_in_gb: 2000}) # VolumeCreate |
|
463
|
-
}
|
461
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
462
|
+
volume_create = NetworkStorageApi::VolumeCreate.new({name: 'My volume name', capacity_in_gb: 2000}) # VolumeCreate |
|
464
463
|
|
465
464
|
begin
|
466
465
|
# Create a volume belonging to a storage network.
|
467
|
-
result = api_instance.storage_networks_storage_network_id_volumes_post(
|
466
|
+
result = api_instance.storage_networks_storage_network_id_volumes_post(storage_id, volume_create)
|
468
467
|
p result
|
469
468
|
rescue NetworkStorageApi::ApiError => e
|
470
469
|
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_post: #{e}"
|
@@ -475,12 +474,12 @@ end
|
|
475
474
|
|
476
475
|
This returns an Array which contains the response data, status code and headers.
|
477
476
|
|
478
|
-
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_post_with_http_info(
|
477
|
+
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_post_with_http_info(storage_id, volume_create)
|
479
478
|
|
480
479
|
```ruby
|
481
480
|
begin
|
482
481
|
# Create a volume belonging to a storage network.
|
483
|
-
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_post_with_http_info(
|
482
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_post_with_http_info(storage_id, volume_create)
|
484
483
|
p status_code # => 2xx
|
485
484
|
p headers # => { ... }
|
486
485
|
p data # => <Volume>
|
@@ -493,8 +492,8 @@ end
|
|
493
492
|
|
494
493
|
| Name | Type | Description | Notes |
|
495
494
|
| ---- | ---- | ----------- | ----- |
|
496
|
-
| **
|
497
|
-
| **volume_create** | [**VolumeCreate**](VolumeCreate.md) | |
|
495
|
+
| **storage_id** | **String** | ID of the storage. | |
|
496
|
+
| **volume_create** | [**VolumeCreate**](VolumeCreate.md) | | |
|
498
497
|
|
499
498
|
### Return type
|
500
499
|
|
@@ -512,7 +511,7 @@ end
|
|
512
511
|
|
513
512
|
## storage_networks_storage_network_id_volumes_volume_id_delete
|
514
513
|
|
515
|
-
> storage_networks_storage_network_id_volumes_volume_id_delete(
|
514
|
+
> storage_networks_storage_network_id_volumes_volume_id_delete(storage_id, volume_id)
|
516
515
|
|
517
516
|
Delete a Storage Network's Volume
|
518
517
|
|
@@ -530,12 +529,12 @@ NetworkStorageApi.configure do |config|
|
|
530
529
|
end
|
531
530
|
|
532
531
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
533
|
-
|
532
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
534
533
|
volume_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of volume.
|
535
534
|
|
536
535
|
begin
|
537
536
|
# Delete a Storage Network's Volume
|
538
|
-
api_instance.storage_networks_storage_network_id_volumes_volume_id_delete(
|
537
|
+
api_instance.storage_networks_storage_network_id_volumes_volume_id_delete(storage_id, volume_id)
|
539
538
|
rescue NetworkStorageApi::ApiError => e
|
540
539
|
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_delete: #{e}"
|
541
540
|
end
|
@@ -545,12 +544,12 @@ end
|
|
545
544
|
|
546
545
|
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
547
546
|
|
548
|
-
> <Array(nil, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(
|
547
|
+
> <Array(nil, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(storage_id, volume_id)
|
549
548
|
|
550
549
|
```ruby
|
551
550
|
begin
|
552
551
|
# Delete a Storage Network's Volume
|
553
|
-
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(
|
552
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(storage_id, volume_id)
|
554
553
|
p status_code # => 2xx
|
555
554
|
p headers # => { ... }
|
556
555
|
p data # => nil
|
@@ -563,7 +562,7 @@ end
|
|
563
562
|
|
564
563
|
| Name | Type | Description | Notes |
|
565
564
|
| ---- | ---- | ----------- | ----- |
|
566
|
-
| **
|
565
|
+
| **storage_id** | **String** | ID of the storage. | |
|
567
566
|
| **volume_id** | **String** | ID of volume. | |
|
568
567
|
|
569
568
|
### Return type
|
@@ -582,7 +581,7 @@ nil (empty response body)
|
|
582
581
|
|
583
582
|
## storage_networks_storage_network_id_volumes_volume_id_get
|
584
583
|
|
585
|
-
> <Volume> storage_networks_storage_network_id_volumes_volume_id_get(
|
584
|
+
> <Volume> storage_networks_storage_network_id_volumes_volume_id_get(storage_id, volume_id)
|
586
585
|
|
587
586
|
Get a storage network's volume details.
|
588
587
|
|
@@ -600,12 +599,12 @@ NetworkStorageApi.configure do |config|
|
|
600
599
|
end
|
601
600
|
|
602
601
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
603
|
-
|
602
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
604
603
|
volume_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of volume.
|
605
604
|
|
606
605
|
begin
|
607
606
|
# Get a storage network's volume details.
|
608
|
-
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_get(
|
607
|
+
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_get(storage_id, volume_id)
|
609
608
|
p result
|
610
609
|
rescue NetworkStorageApi::ApiError => e
|
611
610
|
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_get: #{e}"
|
@@ -616,12 +615,12 @@ end
|
|
616
615
|
|
617
616
|
This returns an Array which contains the response data, status code and headers.
|
618
617
|
|
619
|
-
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(
|
618
|
+
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_id, volume_id)
|
620
619
|
|
621
620
|
```ruby
|
622
621
|
begin
|
623
622
|
# Get a storage network's volume details.
|
624
|
-
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(
|
623
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_id, volume_id)
|
625
624
|
p status_code # => 2xx
|
626
625
|
p headers # => { ... }
|
627
626
|
p data # => <Volume>
|
@@ -634,7 +633,7 @@ end
|
|
634
633
|
|
635
634
|
| Name | Type | Description | Notes |
|
636
635
|
| ---- | ---- | ----------- | ----- |
|
637
|
-
| **
|
636
|
+
| **storage_id** | **String** | ID of the storage. | |
|
638
637
|
| **volume_id** | **String** | ID of volume. | |
|
639
638
|
|
640
639
|
### Return type
|
@@ -653,7 +652,7 @@ end
|
|
653
652
|
|
654
653
|
## storage_networks_storage_network_id_volumes_volume_id_patch
|
655
654
|
|
656
|
-
> <Volume> storage_networks_storage_network_id_volumes_volume_id_patch(
|
655
|
+
> <Volume> storage_networks_storage_network_id_volumes_volume_id_patch(storage_id, volume_id, volume_update)
|
657
656
|
|
658
657
|
Update a storage network's volume details.
|
659
658
|
|
@@ -671,15 +670,13 @@ NetworkStorageApi.configure do |config|
|
|
671
670
|
end
|
672
671
|
|
673
672
|
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
674
|
-
|
673
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
675
674
|
volume_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of volume.
|
676
|
-
|
677
|
-
volume_update: NetworkStorageApi::VolumeUpdate.new # VolumeUpdate | Storage network volume to be updated.
|
678
|
-
}
|
675
|
+
volume_update = NetworkStorageApi::VolumeUpdate.new # VolumeUpdate | Storage network volume to be updated.
|
679
676
|
|
680
677
|
begin
|
681
678
|
# Update a storage network's volume details.
|
682
|
-
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_patch(
|
679
|
+
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_patch(storage_id, volume_id, volume_update)
|
683
680
|
p result
|
684
681
|
rescue NetworkStorageApi::ApiError => e
|
685
682
|
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_patch: #{e}"
|
@@ -690,12 +687,12 @@ end
|
|
690
687
|
|
691
688
|
This returns an Array which contains the response data, status code and headers.
|
692
689
|
|
693
|
-
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(
|
690
|
+
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(storage_id, volume_id, volume_update)
|
694
691
|
|
695
692
|
```ruby
|
696
693
|
begin
|
697
694
|
# Update a storage network's volume details.
|
698
|
-
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(
|
695
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(storage_id, volume_id, volume_update)
|
699
696
|
p status_code # => 2xx
|
700
697
|
p headers # => { ... }
|
701
698
|
p data # => <Volume>
|
@@ -708,9 +705,82 @@ end
|
|
708
705
|
|
709
706
|
| Name | Type | Description | Notes |
|
710
707
|
| ---- | ---- | ----------- | ----- |
|
711
|
-
| **
|
708
|
+
| **storage_id** | **String** | ID of the storage. | |
|
709
|
+
| **volume_id** | **String** | ID of volume. | |
|
710
|
+
| **volume_update** | [**VolumeUpdate**](VolumeUpdate.md) | Storage network volume to be updated. | |
|
711
|
+
|
712
|
+
### Return type
|
713
|
+
|
714
|
+
[**Volume**](Volume.md)
|
715
|
+
|
716
|
+
### Authorization
|
717
|
+
|
718
|
+
[OAuth2](../README.md#OAuth2)
|
719
|
+
|
720
|
+
### HTTP request headers
|
721
|
+
|
722
|
+
- **Content-Type**: application/json
|
723
|
+
- **Accept**: application/json
|
724
|
+
|
725
|
+
|
726
|
+
## storage_networks_storage_network_id_volumes_volume_id_tags_put
|
727
|
+
|
728
|
+
> <Volume> storage_networks_storage_network_id_volumes_volume_id_tags_put(storage_id, volume_id, tag_assignment_request)
|
729
|
+
|
730
|
+
Overwrites tags assigned for the volume.
|
731
|
+
|
732
|
+
Overwrites tags assigned for the volume.
|
733
|
+
|
734
|
+
### Examples
|
735
|
+
|
736
|
+
```ruby
|
737
|
+
require 'time'
|
738
|
+
require 'pnap_network_storage_api'
|
739
|
+
# setup authorization
|
740
|
+
NetworkStorageApi.configure do |config|
|
741
|
+
# Configure OAuth2 access token for authorization: OAuth2
|
742
|
+
config.access_token = 'YOUR ACCESS TOKEN'
|
743
|
+
end
|
744
|
+
|
745
|
+
api_instance = NetworkStorageApi::StorageNetworksApi.new
|
746
|
+
storage_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of the storage.
|
747
|
+
volume_id = '50dc434c-9bba-427b-bcd6-0bdba45c4dd2' # String | ID of volume.
|
748
|
+
tag_assignment_request = [NetworkStorageApi::TagAssignmentRequest.new({name: 'Environment'})] # Array<TagAssignmentRequest> | Tags to assign to the volume.
|
749
|
+
|
750
|
+
begin
|
751
|
+
# Overwrites tags assigned for the volume.
|
752
|
+
result = api_instance.storage_networks_storage_network_id_volumes_volume_id_tags_put(storage_id, volume_id, tag_assignment_request)
|
753
|
+
p result
|
754
|
+
rescue NetworkStorageApi::ApiError => e
|
755
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_tags_put: #{e}"
|
756
|
+
end
|
757
|
+
```
|
758
|
+
|
759
|
+
#### Using the storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info variant
|
760
|
+
|
761
|
+
This returns an Array which contains the response data, status code and headers.
|
762
|
+
|
763
|
+
> <Array(<Volume>, Integer, Hash)> storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info(storage_id, volume_id, tag_assignment_request)
|
764
|
+
|
765
|
+
```ruby
|
766
|
+
begin
|
767
|
+
# Overwrites tags assigned for the volume.
|
768
|
+
data, status_code, headers = api_instance.storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info(storage_id, volume_id, tag_assignment_request)
|
769
|
+
p status_code # => 2xx
|
770
|
+
p headers # => { ... }
|
771
|
+
p data # => <Volume>
|
772
|
+
rescue NetworkStorageApi::ApiError => e
|
773
|
+
puts "Error when calling StorageNetworksApi->storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info: #{e}"
|
774
|
+
end
|
775
|
+
```
|
776
|
+
|
777
|
+
### Parameters
|
778
|
+
|
779
|
+
| Name | Type | Description | Notes |
|
780
|
+
| ---- | ---- | ----------- | ----- |
|
781
|
+
| **storage_id** | **String** | ID of the storage. | |
|
712
782
|
| **volume_id** | **String** | ID of volume. | |
|
713
|
-
| **
|
783
|
+
| **tag_assignment_request** | [**Array<TagAssignmentRequest>**](TagAssignmentRequest.md) | Tags to assign to the volume. | |
|
714
784
|
|
715
785
|
### Return type
|
716
786
|
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# NetworkStorageApi::TagAssignment
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **id** | **String** | The unique id of the tag. | |
|
8
|
+
| **name** | **String** | The name of the tag. | |
|
9
|
+
| **value** | **String** | The value of the tag assigned to the resource. | [optional] |
|
10
|
+
| **is_billing_tag** | **Boolean** | Whether or not to show the tag as part of billing and invoices | |
|
11
|
+
| **created_by** | **String** | Who the tag was created by. | [optional] |
|
12
|
+
|
13
|
+
## Example
|
14
|
+
|
15
|
+
```ruby
|
16
|
+
require 'pnap_network_storage_api'
|
17
|
+
|
18
|
+
instance = NetworkStorageApi::TagAssignment.new(
|
19
|
+
id: 60ffafcdffb8b074c7968dad,
|
20
|
+
name: Environment,
|
21
|
+
value: PROD,
|
22
|
+
is_billing_tag: true,
|
23
|
+
created_by: null
|
24
|
+
)
|
25
|
+
```
|
26
|
+
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# NetworkStorageApi::TagAssignmentRequest
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
|
5
|
+
| Name | Type | Description | Notes |
|
6
|
+
| ---- | ---- | ----------- | ----- |
|
7
|
+
| **name** | **String** | The name of the tag. Tag names are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}. | |
|
8
|
+
| **value** | **String** | The value of the tag assigned to the resource. Tag values are case-sensitive, and should be composed of a maximum of 100 characters including UTF-8 Unicode letters, numbers, and the following symbols: '-', '_'. Regex: [A-zÀ-ú0-9_-]{1,100}. | [optional] |
|
9
|
+
|
10
|
+
## Example
|
11
|
+
|
12
|
+
```ruby
|
13
|
+
require 'pnap_network_storage_api'
|
14
|
+
|
15
|
+
instance = NetworkStorageApi::TagAssignmentRequest.new(
|
16
|
+
name: Environment,
|
17
|
+
value: PROD
|
18
|
+
)
|
19
|
+
```
|
20
|
+
|
data/docs/Volume.md
CHANGED
@@ -14,7 +14,9 @@
|
|
14
14
|
| **protocol** | **String** | File system protocol. Currently this field should be set to `NFS`. | [optional] |
|
15
15
|
| **status** | [**Status**](Status.md) | | [optional] |
|
16
16
|
| **created_on** | **Time** | | [optional] |
|
17
|
+
| **delete_requested_on** | **Time** | Date and time of the initial request for volume deletion. | [optional] |
|
17
18
|
| **permissions** | [**Permissions**](Permissions.md) | | [optional] |
|
19
|
+
| **tags** | [**Array<TagAssignment>**](TagAssignment.md) | The tags assigned if any. | [optional] |
|
18
20
|
|
19
21
|
## Example
|
20
22
|
|
@@ -32,7 +34,9 @@ instance = NetworkStorageApi::Volume.new(
|
|
32
34
|
protocol: NFS,
|
33
35
|
status: null,
|
34
36
|
created_on: 2021-03-13T20:24:32.491Z,
|
35
|
-
|
37
|
+
delete_requested_on: 2022-04-07T08:50:20.359Z,
|
38
|
+
permissions: null,
|
39
|
+
tags: [{"name":"stage","value":"beta"},{"name":"group","value":"discounted"}]
|
36
40
|
)
|
37
41
|
```
|
38
42
|
|
data/docs/VolumeCreate.md
CHANGED
@@ -9,6 +9,7 @@
|
|
9
9
|
| **path_suffix** | **String** | Last part of volume's path. | [optional] |
|
10
10
|
| **capacity_in_gb** | **Integer** | Capacity of Volume in GB. Currently only whole numbers and multiples of 1000GB are supported. | |
|
11
11
|
| **permissions** | [**PermissionsCreate**](PermissionsCreate.md) | | [optional] |
|
12
|
+
| **tags** | [**Array<TagAssignmentRequest>**](TagAssignmentRequest.md) | Tags to set to the resource. To create a new tag or list all the existing tags that you can use, refer to [Tags API](https://developers.phoenixnap.com/docs/tags/1/overview). | [optional] |
|
12
13
|
|
13
14
|
## Example
|
14
15
|
|
@@ -20,7 +21,8 @@ instance = NetworkStorageApi::VolumeCreate.new(
|
|
20
21
|
description: My volume description,
|
21
22
|
path_suffix: /shared-docs,
|
22
23
|
capacity_in_gb: 2000,
|
23
|
-
permissions: null
|
24
|
+
permissions: null,
|
25
|
+
tags: [{"name":"stage","value":"beta"},{"name":"group","value":"discounted"}]
|
24
26
|
)
|
25
27
|
```
|
26
28
|
|