Class: NetworkStorageApi::StorageNetworksApi

Inherits:
Object
  • Object
show all
Defined in:
lib/pnap_network_storage_api/api/storage_networks_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ StorageNetworksApi

Returns a new instance of StorageNetworksApi.



19
20
21
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 19

def initialize(api_client = ApiClient.default)
  @api_client = api_client
end

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#storage_networks_get(opts = {}) ⇒ Array<StorageNetwork>

List all storage networks. List all storage networks.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String)

    If present will filter the result by the given location.

Returns:



27
28
29
30
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 27

def storage_networks_get(opts = {})
  data, _status_code, _headers = storage_networks_get_with_http_info(opts)
  data
end

#storage_networks_get_with_http_info(opts = {}) ⇒ Array<(Array<StorageNetwork>, Integer, Hash)>

List all storage networks. List all storage networks.

Parameters:

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :location (String)

    If present will filter the result by the given location.

Returns:

  • (Array<(Array<StorageNetwork>, Integer, Hash)>)

    Array<StorageNetwork> data, response status code and response headers



37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 37

def storage_networks_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_get ...'
  end
  # resource path
  local_var_path = '/storage-networks'

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'location'] = opts[:'location'] if !opts[:'location'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<StorageNetwork>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_id_delete(storage_id, opts = {}) ⇒ nil

Delete a storage network and its volume. 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.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


87
88
89
90
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 87

def storage_networks_id_delete(storage_id, opts = {})
  storage_networks_id_delete_with_http_info(storage_id, opts)
  nil
end

#storage_networks_id_delete_with_http_info(storage_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a storage network and its volume. Delete a storage network and its volume. A storage network can only be removed if it&#39;s not in &#39;BUSY&#39; state. Billing stops on storage network deletion.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 97

def storage_networks_id_delete_with_http_info(storage_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_id_delete ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_id_delete"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_id_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_id_get(storage_id, opts = {}) ⇒ StorageNetwork

Get storage network details. Get storage network details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



150
151
152
153
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 150

def storage_networks_id_get(storage_id, opts = {})
  data, _status_code, _headers = storage_networks_id_get_with_http_info(storage_id, opts)
  data
end

#storage_networks_id_get_with_http_info(storage_id, opts = {}) ⇒ Array<(StorageNetwork, Integer, Hash)>

Get storage network details. Get storage network details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StorageNetwork, Integer, Hash)>)

    StorageNetwork data, response status code and response headers



160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 160

def storage_networks_id_get_with_http_info(storage_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_id_get ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_id_get"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'StorageNetwork'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_id_patch(storage_id, storage_network_update, opts = {}) ⇒ StorageNetwork

Update storage network details. Update storage network details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • storage_network_update (StorageNetworkUpdate)

    Storage network to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



214
215
216
217
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 214

def storage_networks_id_patch(storage_id, storage_network_update, opts = {})
  data, _status_code, _headers = storage_networks_id_patch_with_http_info(storage_id, storage_network_update, opts)
  data
end

#storage_networks_id_patch_with_http_info(storage_id, storage_network_update, opts = {}) ⇒ Array<(StorageNetwork, Integer, Hash)>

Update storage network details. Update storage network details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • storage_network_update (StorageNetworkUpdate)

    Storage network to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StorageNetwork, Integer, Hash)>)

    StorageNetwork data, response status code and response headers



225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 225

def storage_networks_id_patch_with_http_info(storage_id, storage_network_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_id_patch ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_id_patch"
  end
  # verify the required parameter 'storage_network_update' is set
  if @api_client.config.client_side_validation && storage_network_update.nil?
    fail ArgumentError, "Missing the required parameter 'storage_network_update' when calling StorageNetworksApi.storage_networks_id_patch"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(storage_network_update)

  # return_type
  return_type = opts[:debug_return_type] || 'StorageNetwork'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_id_patch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_post(storage_network_create, opts = {}) ⇒ StorageNetwork

Create a storage network and volume. Create a storage network and volume.

Parameters:

  • storage_network_create (StorageNetworkCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



287
288
289
290
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 287

def storage_networks_post(storage_network_create, opts = {})
  data, _status_code, _headers = storage_networks_post_with_http_info(storage_network_create, opts)
  data
end

#storage_networks_post_with_http_info(storage_network_create, opts = {}) ⇒ Array<(StorageNetwork, Integer, Hash)>

Create a storage network and volume. Create a storage network and volume.

Parameters:

  • storage_network_create (StorageNetworkCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(StorageNetwork, Integer, Hash)>)

    StorageNetwork data, response status code and response headers



297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 297

def storage_networks_post_with_http_info(storage_network_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_post ...'
  end
  # verify the required parameter 'storage_network_create' is set
  if @api_client.config.client_side_validation && storage_network_create.nil?
    fail ArgumentError, "Missing the required parameter 'storage_network_create' when calling StorageNetworksApi.storage_networks_post"
  end
  # resource path
  local_var_path = '/storage-networks'

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(storage_network_create)

  # return_type
  return_type = opts[:debug_return_type] || 'StorageNetwork'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_get(storage_id, opts = {}) ⇒ Array<Volume>

Display one or more volumes belonging to a storage network. Display one or more volumes belonging to a storage network.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tag (Array<String>)

    A list of query parameters related to tags in the form of tagName.tagValue

Returns:



356
357
358
359
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 356

def storage_networks_storage_network_id_volumes_get(storage_id, opts = {})
  data, _status_code, _headers = storage_networks_storage_network_id_volumes_get_with_http_info(storage_id, opts)
  data
end

#storage_networks_storage_network_id_volumes_get_with_http_info(storage_id, opts = {}) ⇒ Array<(Array<Volume>, Integer, Hash)>

Display one or more volumes belonging to a storage network. Display one or more volumes belonging to a storage network.

Parameters:

  • storage_id (String)

    ID of the storage.

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :tag (Array<String>)

    A list of query parameters related to tags in the form of tagName.tagValue

Returns:

  • (Array<(Array<Volume>, Integer, Hash)>)

    Array<Volume> data, response status code and response headers



367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 367

def storage_networks_storage_network_id_volumes_get_with_http_info(storage_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_get ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_get"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}
  query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Array<Volume>'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_post(storage_id, volume_create, opts = {}) ⇒ Volume

Create a volume belonging to a storage network. Create a volume belonging to a storage network.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_create (VolumeCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



422
423
424
425
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 422

def storage_networks_storage_network_id_volumes_post(storage_id, volume_create, opts = {})
  data, _status_code, _headers = storage_networks_storage_network_id_volumes_post_with_http_info(storage_id, volume_create, opts)
  data
end

#storage_networks_storage_network_id_volumes_post_with_http_info(storage_id, volume_create, opts = {}) ⇒ Array<(Volume, Integer, Hash)>

Create a volume belonging to a storage network. Create a volume belonging to a storage network.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_create (VolumeCreate)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume, Integer, Hash)>)

    Volume data, response status code and response headers



433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 433

def storage_networks_storage_network_id_volumes_post_with_http_info(storage_id, volume_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_post ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_post"
  end
  # verify the required parameter 'volume_create' is set
  if @api_client.config.client_side_validation && volume_create.nil?
    fail ArgumentError, "Missing the required parameter 'volume_create' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_post"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(volume_create)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_post",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_volume_id_delete(storage_id, volume_id, opts = {}) ⇒ nil

Delete a Storage Network’s Volume Delete a Storage Network’s Volume

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (nil)


496
497
498
499
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 496

def storage_networks_storage_network_id_volumes_volume_id_delete(storage_id, volume_id, opts = {})
  storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(storage_id, volume_id, opts)
  nil
end

#storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(storage_id, volume_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>

Delete a Storage Network&#39;s Volume Delete a Storage Network&#39;s Volume

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(nil, Integer, Hash)>)

    nil, response status code and response headers



507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 507

def storage_networks_storage_network_id_volumes_volume_id_delete_with_http_info(storage_id, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_delete ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_delete"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_delete"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes/{volumeId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type]

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_delete",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_volume_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_volume_id_get(storage_id, volume_id, opts = {}) ⇒ Volume

Get a storage network’s volume details. Get a storage network’s volume details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



565
566
567
568
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 565

def storage_networks_storage_network_id_volumes_volume_id_get(storage_id, volume_id, opts = {})
  data, _status_code, _headers = storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_id, volume_id, opts)
  data
end

#storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_id, volume_id, opts = {}) ⇒ Array<(Volume, Integer, Hash)>

Get a storage network&#39;s volume details. Get a storage network&#39;s volume details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume, Integer, Hash)>)

    Volume data, response status code and response headers



576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 576

def storage_networks_storage_network_id_volumes_volume_id_get_with_http_info(storage_id, volume_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_get ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_get"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_get"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes/{volumeId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body]

  # return_type
  return_type = opts[:debug_return_type] || 'Volume'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_get",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_volume_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_volume_id_patch(storage_id, volume_id, volume_update, opts = {}) ⇒ Volume

Update a storage network’s volume details. Update a storage network’s volume details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • volume_update (VolumeUpdate)

    Storage network volume to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



635
636
637
638
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 635

def storage_networks_storage_network_id_volumes_volume_id_patch(storage_id, volume_id, volume_update, opts = {})
  data, _status_code, _headers = storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(storage_id, volume_id, volume_update, opts)
  data
end

#storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(storage_id, volume_id, volume_update, opts = {}) ⇒ Array<(Volume, Integer, Hash)>

Update a storage network&#39;s volume details. Update a storage network&#39;s volume details.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • volume_update (VolumeUpdate)

    Storage network volume to be updated.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume, Integer, Hash)>)

    Volume data, response status code and response headers



647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 647

def storage_networks_storage_network_id_volumes_volume_id_patch_with_http_info(storage_id, volume_id, volume_update, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_patch ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_patch"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_patch"
  end
  # verify the required parameter 'volume_update' is set
  if @api_client.config.client_side_validation && volume_update.nil?
    fail ArgumentError, "Missing the required parameter 'volume_update' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_patch"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes/{volumeId}'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(volume_update)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_patch",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_volume_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#storage_networks_storage_network_id_volumes_volume_id_tags_put(storage_id, volume_id, tag_assignment_request, opts = {}) ⇒ Volume

Overwrites tags assigned for the volume. Overwrites tags assigned for the volume.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • tag_assignment_request (Array<TagAssignmentRequest>)

    Tags to assign to the volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



715
716
717
718
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 715

def storage_networks_storage_network_id_volumes_volume_id_tags_put(storage_id, volume_id, tag_assignment_request, opts = {})
  data, _status_code, _headers = storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info(storage_id, volume_id, tag_assignment_request, opts)
  data
end

#storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info(storage_id, volume_id, tag_assignment_request, opts = {}) ⇒ Array<(Volume, Integer, Hash)>

Overwrites tags assigned for the volume. Overwrites tags assigned for the volume.

Parameters:

  • storage_id (String)

    ID of the storage.

  • volume_id (String)

    ID of volume.

  • tag_assignment_request (Array<TagAssignmentRequest>)

    Tags to assign to the volume.

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Volume, Integer, Hash)>)

    Volume data, response status code and response headers



727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
# File 'lib/pnap_network_storage_api/api/storage_networks_api.rb', line 727

def storage_networks_storage_network_id_volumes_volume_id_tags_put_with_http_info(storage_id, volume_id, tag_assignment_request, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_tags_put ...'
  end
  # verify the required parameter 'storage_id' is set
  if @api_client.config.client_side_validation && storage_id.nil?
    fail ArgumentError, "Missing the required parameter 'storage_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_tags_put"
  end
  # verify the required parameter 'volume_id' is set
  if @api_client.config.client_side_validation && volume_id.nil?
    fail ArgumentError, "Missing the required parameter 'volume_id' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_tags_put"
  end
  # verify the required parameter 'tag_assignment_request' is set
  if @api_client.config.client_side_validation && tag_assignment_request.nil?
    fail ArgumentError, "Missing the required parameter 'tag_assignment_request' when calling StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_tags_put"
  end
  # resource path
  local_var_path = '/storage-networks/{storageId}/volumes/{volumeId}/tags'.sub('{' + 'storageId' + '}', CGI.escape(storage_id.to_s)).sub('{' + 'volumeId' + '}', CGI.escape(volume_id.to_s))

  # query parameters
  query_params = opts[:query_params] || {}

  # header parameters
  header_params = opts[:header_params] || {}
  # HTTP header 'Accept' (if needed)
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
  # HTTP header 'Content-Type'
  content_type = @api_client.select_header_content_type(['application/json'])
  if !content_type.nil?
      header_params['Content-Type'] = content_type
  end

  # form parameters
  form_params = opts[:form_params] || {}

  # http body (model)
  post_body = opts[:debug_body] || @api_client.object_to_http_body(tag_assignment_request)

  # return_type
  return_type = opts[:debug_return_type] || 'Volume'

  # auth_names
  auth_names = opts[:debug_auth_names] || ['OAuth2']

  new_options = opts.merge(
    :operation => :"StorageNetworksApi.storage_networks_storage_network_id_volumes_volume_id_tags_put",
    :header_params => header_params,
    :query_params => query_params,
    :form_params => form_params,
    :body => post_body,
    :auth_names => auth_names,
    :return_type => return_type
  )

  data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
  if @api_client.config.debugging
    @api_client.config.logger.debug "API called: StorageNetworksApi#storage_networks_storage_network_id_volumes_volume_id_tags_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end