Class: BmcApi::ServersApi

Inherits:
Object
  • Object
show all
Defined in:
lib/pnap_bmc_api/api/servers_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ServersApi

Returns a new instance of ServersApi.



19
20
21
# File 'lib/pnap_bmc_api/api/servers_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_bmc_api/api/servers_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

#delete_private_network(server_id, private_network_id, opts = {}) ⇒ String

Removes the server from private network. Removes the server from private network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.

Parameters:

  • server_id (String)

    The server's ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Returns:

  • (String)


28
29
30
31
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 28

def delete_private_network(server_id, private_network_id, opts = {})
  data, _status_code, _headers = delete_private_network_with_http_info(server_id, private_network_id, opts)
  data
end

#delete_private_network_with_http_info(server_id, private_network_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Removes the server from private network. Removes the server from private network. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. &lt;b&gt;This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.&lt;/b&gt;

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
81
82
83
84
85
86
87
88
89
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 39

def delete_private_network_with_http_info(server_id, private_network_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.delete_private_network ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.delete_private_network"
  end
  # verify the required parameter 'private_network_id' is set
  if @api_client.config.client_side_validation && private_network_id.nil?
    fail ArgumentError, "Missing the required parameter 'private_network_id' when calling ServersApi.delete_private_network"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/private-network-configuration/private-networks/{privateNetworkId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'privateNetworkId' + '}', CGI.escape(private_network_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] || 'String'

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

  new_options = opts.merge(
    :operation => :"ServersApi.delete_private_network",
    :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: ServersApi#delete_private_network\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_get(opts = {}) ⇒ Array<Server>

List servers. List all servers owned by account.

Parameters:

  • 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:



96
97
98
99
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 96

def servers_get(opts = {})
  data, _status_code, _headers = servers_get_with_http_info(opts)
  data
end

#servers_get_with_http_info(opts = {}) ⇒ Array<(Array<Server>, Integer, Hash)>

List servers. List all servers owned by account.

Parameters:

  • 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<Server>, Integer, Hash)>)

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



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
144
145
146
147
148
149
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 106

def servers_get_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_get ...'
  end
  # resource path
  local_var_path = '/servers'

  # 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<Server>'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_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: ServersApi#servers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_post(opts = {}) ⇒ Server

Create new server. Create (request) new server for account. Server DNS will be configured to access Google’s public DNS at 8.8.8.8 .

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_create (ServerCreate)

Returns:



157
158
159
160
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 157

def servers_post(opts = {})
  data, _status_code, _headers = servers_post_with_http_info(opts)
  data
end

#servers_post_with_http_info(opts = {}) ⇒ Array<(Server, Integer, Hash)>

Create new server. Create (request) new server for account. Server DNS will be configured to access Google&#39;s public DNS at 8.8.8.8 .

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_create (ServerCreate)

Returns:

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

    Server data, response status code and response headers



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
207
208
209
210
211
212
213
214
215
216
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 168

def servers_post_with_http_info(opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_post ...'
  end
  # resource path
  local_var_path = '/servers'

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

  # 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(opts[:'server_create'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_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: ServersApi#servers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_deprovision_post(server_id, opts = {}) ⇒ String

Deprovision a server. Deprovision the server. Supports advanced deprovision configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


224
225
226
227
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 224

def servers_server_id_actions_deprovision_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_deprovision_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_deprovision_post_with_http_info(server_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Deprovision a server. Deprovision the server. Supports advanced deprovision configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String data, response status code and response headers



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
281
282
283
284
285
286
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 235

def servers_server_id_actions_deprovision_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_deprovision_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_deprovision_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/deprovision'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'relinquish_ip_block'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_deprovision_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: ServersApi#servers_server_id_actions_deprovision_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_power_off_post(server_id, opts = {}) ⇒ ActionResult

Power off server. Power off specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



293
294
295
296
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 293

def servers_server_id_actions_power_off_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_power_off_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_power_off_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>

Power off server. Power off specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    ActionResult data, response status code and response headers



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
349
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 303

def servers_server_id_actions_power_off_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_power_off_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_power_off_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/power-off'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'ActionResult'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_power_off_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: ServersApi#servers_server_id_actions_power_off_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_power_on_post(server_id, opts = {}) ⇒ ActionResult

Power on server. Power on specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



356
357
358
359
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 356

def servers_server_id_actions_power_on_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_power_on_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_power_on_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>

Power on server. Power on specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    ActionResult data, response status code and response headers



366
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 366

def servers_server_id_actions_power_on_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_power_on_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_power_on_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/power-on'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'ActionResult'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_power_on_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: ServersApi#servers_server_id_actions_power_on_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_reboot_post(server_id, opts = {}) ⇒ ActionResult

Reboot server. Reboot specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



419
420
421
422
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 419

def servers_server_id_actions_reboot_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_reboot_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>

Reboot server. Reboot specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    ActionResult data, response status code and response headers



429
430
431
432
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 429

def servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reboot_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reboot_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/reboot'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'ActionResult'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_reboot_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: ServersApi#servers_server_id_actions_reboot_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_reserve_post(server_id, opts = {}) ⇒ Server

Reserve server. Reserve specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



483
484
485
486
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 483

def servers_server_id_actions_reserve_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_reserve_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_reserve_post_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>

Reserve server. Reserve specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Server data, response status code and response headers



494
495
496
497
498
499
500
501
502
503
504
505
506
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 494

def servers_server_id_actions_reserve_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reserve_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reserve_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/reserve'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'server_reserve'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_reserve_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: ServersApi#servers_server_id_actions_reserve_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_reset_post(server_id, opts = {}) ⇒ ResetResult

Reset server. Deprecated: Reset specific server. Reset only supports network configurations of type ‘private network’ or ‘IP blocks’. As an alternative, the suggested action is to deprovision the server and provision a new one with the same configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



553
554
555
556
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 553

def servers_server_id_actions_reset_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_reset_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_reset_post_with_http_info(server_id, opts = {}) ⇒ Array<(ResetResult, Integer, Hash)>

Reset server. Deprecated: Reset specific server. Reset only supports network configurations of type &#39;private network&#39; or &#39;IP blocks&#39;. As an alternative, the suggested action is to deprovision the server and provision a new one with the same configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ResetResult data, response status code and response headers



564
565
566
567
568
569
570
571
572
573
574
575
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 564

def servers_server_id_actions_reset_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reset_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reset_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/reset'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'server_reset'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_reset_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: ServersApi#servers_server_id_actions_reset_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_actions_shutdown_post(server_id, opts = {}) ⇒ ActionResult

Shutdown server. Shut down specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



622
623
624
625
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 622

def servers_server_id_actions_shutdown_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_actions_shutdown_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_actions_shutdown_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>

Shutdown server. Shut down specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    ActionResult data, response status code and response headers



632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 632

def servers_server_id_actions_shutdown_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_shutdown_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_shutdown_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/shutdown'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'ActionResult'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_actions_shutdown_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: ServersApi#servers_server_id_actions_shutdown_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_delete(server_id, opts = {}) ⇒ DeleteResult

Delete server. Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/serverId/actions/deprovision

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



685
686
687
688
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 685

def servers_server_id_delete(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_delete_with_http_info(server_id, opts)
  data
end

#servers_server_id_delete_with_http_info(server_id, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>

Delete server. Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/serverId/actions/deprovision

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    DeleteResult data, response status code and response headers



695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 695

def servers_server_id_delete_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_delete ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_delete"
  end
  # resource path
  local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'DeleteResult'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_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: ServersApi#servers_server_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_get(server_id, opts = {}) ⇒ Server

Get server. Get server properties.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



748
749
750
751
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 748

def servers_server_id_get(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_get_with_http_info(server_id, opts)
  data
end

#servers_server_id_get_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>

Get server. Get server properties.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    Server data, response status code and response headers



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
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 758

def servers_server_id_get_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_get ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_get"
  end
  # resource path
  local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_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] || 'Server'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_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: ServersApi#servers_server_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts = {}) ⇒ String

Unassign IP Block from Server. Removes the IP block from the server. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • ip_block_id (String)

    The IP Block identifier.

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

    the optional parameters

Options Hash (opts):

Returns:

  • (String)


813
814
815
816
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 813

def servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts = {})
  data, _status_code, _headers = servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts)
  data
end

#servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Unassign IP Block from Server. Removes the IP block from the server. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. &lt;b&gt;This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.&lt;/b&gt;

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • ip_block_id (String)

    The IP Block identifier.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    String data, response status code and response headers



825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 825

def servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_ip_blocks_ip_block_id_delete ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_ip_blocks_ip_block_id_delete"
  end
  # verify the required parameter 'ip_block_id' is set
  if @api_client.config.client_side_validation && ip_block_id.nil?
    fail ArgumentError, "Missing the required parameter 'ip_block_id' when calling ServersApi.servers_server_id_ip_blocks_ip_block_id_delete"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks/{ipBlockId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'ipBlockId' + '}', CGI.escape(ip_block_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(opts[:'relinquish_ip_block'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_ip_blocks_ip_block_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: ServersApi#servers_server_id_ip_blocks_ip_block_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_ip_blocks_post(server_id, opts = {}) ⇒ ServerIpBlock

Assign IP Block to Server. Adds an IP block to this server. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-server-with-public-ip-block#ftoc-heading-2’ target=‘_blank’>here</a>.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



888
889
890
891
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 888

def servers_server_id_ip_blocks_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_ip_blocks_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_ip_blocks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerIpBlock, Integer, Hash)>

Assign IP Block to Server. Adds an IP block to this server. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found &lt;a href&#x3D;&#39;phoenixnap.com/kb/configure-server-with-public-ip-block#ftoc-heading-2&#39; target&#x3D;&#39;_blank&#39;&gt;here&lt;/a&gt;.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    ServerIpBlock data, response status code and response headers



899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 899

def servers_server_id_ip_blocks_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_ip_blocks_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_ip_blocks_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'server_ip_block'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_ip_blocks_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: ServersApi#servers_server_id_ip_blocks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_patch(server_id, opts = {}) ⇒ Server

Patch a Server. Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server’s settings. Local changes to the server’s hostname will not be reflected in the API or portal.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



958
959
960
961
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 958

def servers_server_id_patch(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_patch_with_http_info(server_id, opts)
  data
end

#servers_server_id_patch_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>

Patch a Server. Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server&#39;s settings. Local changes to the server&#39;s hostname will not be reflected in the API or portal.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Server data, response status code and response headers



969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 969

def servers_server_id_patch_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_patch ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_patch"
  end
  # resource path
  local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'server_patch'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_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: ServersApi#servers_server_id_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_private_networks_patch(server_id, private_network_id, opts = {}) ⇒ ServerPrivateNetwork

Updates the server’s private network’s IP addresses IP address changes intended to keep the BMC data up to date with server’s operating system. We do not have access to the server’s operating system and therefore manual configuration is required to apply the changes on the host. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-6’ target=‘_blank’>here</a>

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_network_update (ServerNetworkUpdate)

Returns:



1030
1031
1032
1033
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1030

def servers_server_id_private_networks_patch(server_id, private_network_id, opts = {})
  data, _status_code, _headers = servers_server_id_private_networks_patch_with_http_info(server_id, private_network_id, opts)
  data
end

#servers_server_id_private_networks_patch_with_http_info(server_id, private_network_id, opts = {}) ⇒ Array<(ServerPrivateNetwork, Integer, Hash)>

Updates the server&#39;s private network&#39;s IP addresses IP address changes intended to keep the BMC data up to date with server&#39;s operating system. We do not have access to the server&#39;s operating system and therefore manual configuration is required to apply the changes on the host. Knowledge base article to help you can be found &lt;a href&#x3D;&#39;phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-6&#39; target&#x3D;&#39;_blank&#39;&gt;here&lt;/a&gt;

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_network_update (ServerNetworkUpdate)

Returns:

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

    ServerPrivateNetwork data, response status code and response headers



1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1043

def servers_server_id_private_networks_patch_with_http_info(server_id, private_network_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_private_networks_patch ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_private_networks_patch"
  end
  # verify the required parameter 'private_network_id' is set
  if @api_client.config.client_side_validation && private_network_id.nil?
    fail ArgumentError, "Missing the required parameter 'private_network_id' when calling ServersApi.servers_server_id_private_networks_patch"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/private-network-configuration/private-networks/{privateNetworkId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'privateNetworkId' + '}', CGI.escape(private_network_id.to_s))

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

  # 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(opts[:'server_network_update'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_private_networks_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: ServersApi#servers_server_id_private_networks_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_private_networks_post(server_id, opts = {}) ⇒ ServerPrivateNetwork

Adds the server to a private network. Adds the server to a private network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3’ target=‘_blank’>here</a>.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_private_network (ServerPrivateNetwork)

Returns:



1108
1109
1110
1111
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1108

def servers_server_id_private_networks_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_private_networks_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_private_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPrivateNetwork, Integer, Hash)>

Adds the server to a private network. Adds the server to a private network. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found &lt;a href&#x3D;&#39;phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3&#39; target&#x3D;&#39;_blank&#39;&gt;here&lt;/a&gt;.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_private_network (ServerPrivateNetwork)

Returns:

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

    ServerPrivateNetwork data, response status code and response headers



1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1120

def servers_server_id_private_networks_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_private_networks_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_private_networks_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/private-network-configuration/private-networks'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))

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

  # 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(opts[:'server_private_network'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_private_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: ServersApi#servers_server_id_private_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_public_networks_delete(server_id, public_network_id, opts = {}) ⇒ String

Removes the server from the Public Network Removes the server from the Public Network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • public_network_id (String)

    The Public Network identifier.

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

    the optional parameters

Returns:

  • (String)


1180
1181
1182
1183
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1180

def servers_server_id_public_networks_delete(server_id, public_network_id, opts = {})
  data, _status_code, _headers = servers_server_id_public_networks_delete_with_http_info(server_id, public_network_id, opts)
  data
end

#servers_server_id_public_networks_delete_with_http_info(server_id, public_network_id, opts = {}) ⇒ Array<(String, Integer, Hash)>

Removes the server from the Public Network Removes the server from the Public Network. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. &lt;b&gt;This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.&lt;/b&gt;

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • public_network_id (String)

    The Public Network identifier.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1191

def servers_server_id_public_networks_delete_with_http_info(server_id, public_network_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_public_networks_delete ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_public_networks_delete"
  end
  # verify the required parameter 'public_network_id' is set
  if @api_client.config.client_side_validation && public_network_id.nil?
    fail ArgumentError, "Missing the required parameter 'public_network_id' when calling ServersApi.servers_server_id_public_networks_delete"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/public-network-configuration/public-networks/{publicNetworkId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'publicNetworkId' + '}', CGI.escape(public_network_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] || 'String'

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_public_networks_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: ServersApi#servers_server_id_public_networks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_public_networks_patch(server_id, public_network_id, opts = {}) ⇒ ServerPublicNetwork

Updates the server’s public network’s IP addresses. IP address changes intended to keep the BMC data up to date with server’s operating system. We do not have access to the server’s operating system and therefore manual configuration is required to apply the changes on the host. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-6’ target=‘_blank’>here</a>

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • public_network_id (String)

    The Public Network identifier.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_network_update (ServerNetworkUpdate)

Returns:



1251
1252
1253
1254
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1251

def servers_server_id_public_networks_patch(server_id, public_network_id, opts = {})
  data, _status_code, _headers = servers_server_id_public_networks_patch_with_http_info(server_id, public_network_id, opts)
  data
end

#servers_server_id_public_networks_patch_with_http_info(server_id, public_network_id, opts = {}) ⇒ Array<(ServerPublicNetwork, Integer, Hash)>

Updates the server&#39;s public network&#39;s IP addresses. IP address changes intended to keep the BMC data up to date with server&#39;s operating system. We do not have access to the server&#39;s operating system and therefore manual configuration is required to apply the changes on the host. Knowledge base article to help you can be found &lt;a href&#x3D;&#39;phoenixnap.com/kb/bmc-server-management-via-api#ftoc-heading-6&#39; target&#x3D;&#39;_blank&#39;&gt;here&lt;/a&gt;

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • public_network_id (String)

    The Public Network identifier.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_network_update (ServerNetworkUpdate)

Returns:

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

    ServerPublicNetwork data, response status code and response headers



1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1264

def servers_server_id_public_networks_patch_with_http_info(server_id, public_network_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_public_networks_patch ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_public_networks_patch"
  end
  # verify the required parameter 'public_network_id' is set
  if @api_client.config.client_side_validation && public_network_id.nil?
    fail ArgumentError, "Missing the required parameter 'public_network_id' when calling ServersApi.servers_server_id_public_networks_patch"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/public-network-configuration/public-networks/{publicNetworkId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'publicNetworkId' + '}', CGI.escape(public_network_id.to_s))

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

  # 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(opts[:'server_network_update'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_public_networks_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: ServersApi#servers_server_id_public_networks_patch\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_public_networks_post(server_id, opts = {}) ⇒ ServerPublicNetwork

Adds the server to a Public Network. Adds the server to a Public Network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3’ target=‘_blank’>here</a>.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_public_network (ServerPublicNetwork)

Returns:



1329
1330
1331
1332
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1329

def servers_server_id_public_networks_post(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_public_networks_post_with_http_info(server_id, opts)
  data
end

#servers_server_id_public_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPublicNetwork, Integer, Hash)>

Adds the server to a Public Network. Adds the server to a Public Network. &lt;b&gt;No actual configuration is performed on the operating system.&lt;/b&gt; BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found &lt;a href&#x3D;&#39;phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3&#39; target&#x3D;&#39;_blank&#39;&gt;here&lt;/a&gt;.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

  • :force (Boolean)

    Query parameter controlling advanced features availability. Currently applicable for networking. It is advised to use with caution since it might lead to unhealthy setups. (default to false)

  • :server_public_network (ServerPublicNetwork)

Returns:

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

    ServerPublicNetwork data, response status code and response headers



1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1341

def servers_server_id_public_networks_post_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_public_networks_post ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_public_networks_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/network-configuration/public-network-configuration/public-networks'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))

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

  # 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(opts[:'server_public_network'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_id_public_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: ServersApi#servers_server_id_public_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end

#servers_server_id_tags_put(server_id, opts = {}) ⇒ Server

Overwrite tags assigned for Server. Overwrites tags assigned for Server and unassigns any tags not part of the request.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:



1401
1402
1403
1404
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1401

def servers_server_id_tags_put(server_id, opts = {})
  data, _status_code, _headers = servers_server_id_tags_put_with_http_info(server_id, opts)
  data
end

#servers_server_id_tags_put_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>

Overwrite tags assigned for Server. Overwrites tags assigned for Server and unassigns any tags not part of the request.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Options Hash (opts):

Returns:

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

    Server data, response status code and response headers



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1412

def servers_server_id_tags_put_with_http_info(server_id, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_tags_put ...'
  end
  # verify the required parameter 'server_id' is set
  if @api_client.config.client_side_validation && server_id.nil?
    fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_tags_put"
  end
  # resource path
  local_var_path = '/servers/{serverId}/tags'.sub('{' + 'serverId' + '}', CGI.escape(server_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(opts[:'tag_assignment_request'])

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

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

  new_options = opts.merge(
    :operation => :"ServersApi.servers_server_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: ServersApi#servers_server_id_tags_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
  end
  return data, status_code, headers
end