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']) unless header_params['Accept']

  # 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

  • :location (Array<String>)

    Filters servers by server location

Returns:



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

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

  • :location (Array<String>)

    Filters servers by server location

Returns:

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

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



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

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?
  query_params[:'location'] = @api_client.build_collection_param(opts[:'location'], :multi) 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']) unless header_params['Accept']

  # 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(server_create, opts = {}) ⇒ Server

Create new server. Create (request) a new server for the account. Server DNS will be configured to access Google’s public DNS at 8.8.8.8 . Note that the product availability API can be used prior to doing the provision request. Refer to developers.phoenixnap.com/docs/bmc-billing/1/routes/product-availability/get.

Parameters:

  • server_create (ServerCreate)
  • 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)

Returns:



160
161
162
163
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 160

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

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

Create new server. Create (request) a new server for the account. Server DNS will be configured to access Google&#39;s public DNS at 8.8.8.8 . Note that the product availability API can be used prior to doing the provision request. Refer to developers.phoenixnap.com/docs/bmc-billing/1/routes/product-availability/get.

Parameters:

  • server_create (ServerCreate)
  • 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)

Returns:

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

    Server data, response status code and response headers



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
217
218
219
220
221
222
223
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 171

def servers_post_with_http_info(server_create, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_post ...'
  end
  # verify the required parameter 'server_create' is set
  if @api_client.config.client_side_validation && server_create.nil?
    fail ArgumentError, "Missing the required parameter 'server_create' when calling 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']) unless header_params['Accept']
  # 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(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, relinquish_ip_block, opts = {}) ⇒ String

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

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

  • (String)


231
232
233
234
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 231

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

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

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

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



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
287
288
289
290
291
292
293
294
295
296
297
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 242

def servers_server_id_actions_deprovision_post_with_http_info(server_id, relinquish_ip_block, 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
  # verify the required parameter 'relinquish_ip_block' is set
  if @api_client.config.client_side_validation && relinquish_ip_block.nil?
    fail ArgumentError, "Missing the required parameter 'relinquish_ip_block' 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']) unless header_params['Accept']
  # 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(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:



304
305
306
307
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 304

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



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
350
351
352
353
354
355
356
357
358
359
360
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 314

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']) unless header_params['Accept']

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



367
368
369
370
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 367

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



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
415
416
417
418
419
420
421
422
423
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 377

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']) unless header_params['Accept']

  # 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_provision_post(server_id, server_provision, opts = {}) ⇒ Server

Provision server. Provision reserved server. Server DNS will be configured to access Google’s public DNS at 8.8.8.8.

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • server_provision (ServerProvision)
  • 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)

Returns:



432
433
434
435
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 432

def servers_server_id_actions_provision_post(server_id, server_provision, opts = {})
  data, _status_code, _headers = servers_server_id_actions_provision_post_with_http_info(server_id, server_provision, opts)
  data
end

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

Provision server. Provision reserved server. Server DNS will be configured to access Google&#39;s public DNS at 8.8.8.8.

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • server_provision (ServerProvision)
  • 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)

Returns:

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

    Server data, response status code and response headers



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
489
490
491
492
493
494
495
496
497
498
499
500
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 444

def servers_server_id_actions_provision_post_with_http_info(server_id, server_provision, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_provision_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_provision_post"
  end
  # verify the required parameter 'server_provision' is set
  if @api_client.config.client_side_validation && server_provision.nil?
    fail ArgumentError, "Missing the required parameter 'server_provision' when calling ServersApi.servers_server_id_actions_provision_post"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/provision'.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']) unless header_params['Accept']
  # 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(server_provision)

  # 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_provision_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_provision_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

Options Hash (opts):

  • :reboot_request (RebootRequest)

    Configuration option to specify the reboot type: STANDARD or IPXE (default: STANDARD).

Returns:



508
509
510
511
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 508

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

Options Hash (opts):

  • :reboot_request (RebootRequest)

    Configuration option to specify the reboot type: STANDARD or IPXE (default: STANDARD).

Returns:

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

    ActionResult data, response status code and response headers



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
558
559
560
561
562
563
564
565
566
567
568
569
570
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 519

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']) unless header_params['Accept']
  # 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[:'reboot_request'])

  # 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, server_reserve, opts = {}) ⇒ Server

Reserve server. Reserve specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



578
579
580
581
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 578

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

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

Reserve server. Reserve specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    Server data, response status code and response headers



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

def servers_server_id_actions_reserve_post_with_http_info(server_id, server_reserve, 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
  # verify the required parameter 'server_reserve' is set
  if @api_client.config.client_side_validation && server_reserve.nil?
    fail ArgumentError, "Missing the required parameter 'server_reserve' 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']) unless header_params['Accept']
  # 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(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, server_reset, 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.

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

    the optional parameters

Returns:



652
653
654
655
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 652

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

#servers_server_id_actions_reset_post_with_http_info(server_id, server_reset, 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.

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

    the optional parameters

Returns:

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

    ResetResult data, response status code and response headers



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
707
708
709
710
711
712
713
714
715
716
717
718
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 663

def servers_server_id_actions_reset_post_with_http_info(server_id, server_reset, 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
  # verify the required parameter 'server_reset' is set
  if @api_client.config.client_side_validation && server_reset.nil?
    fail ArgumentError, "Missing the required parameter 'server_reset' 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']) unless header_params['Accept']
  # 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(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:



725
726
727
728
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 725

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



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

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']) unless header_params['Accept']

  # 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_actions_transfer_reservation(server_id, reservation_transfer_details, opts = {}) ⇒ Server

Transfer server reservation. Transfer server reservation. An active (READY) reservation can be transferred from a server in ERROR or RESERVED status to another HOURLY provisioned server of the same location and type.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



789
790
791
792
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 789

def servers_server_id_actions_transfer_reservation(server_id, reservation_transfer_details, opts = {})
  data, _status_code, _headers = servers_server_id_actions_transfer_reservation_with_http_info(server_id, reservation_transfer_details, opts)
  data
end

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

Transfer server reservation. Transfer server reservation. An active (READY) reservation can be transferred from a server in ERROR or RESERVED status to another HOURLY provisioned server of the same location and type.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    Server data, response status code and response headers



800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 800

def servers_server_id_actions_transfer_reservation_with_http_info(server_id, reservation_transfer_details, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_transfer_reservation ...'
  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_transfer_reservation"
  end
  # verify the required parameter 'reservation_transfer_details' is set
  if @api_client.config.client_side_validation && reservation_transfer_details.nil?
    fail ArgumentError, "Missing the required parameter 'reservation_transfer_details' when calling ServersApi.servers_server_id_actions_transfer_reservation"
  end
  # resource path
  local_var_path = '/servers/{serverId}/actions/transfer-reservation'.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']) unless header_params['Accept']
  # 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(reservation_transfer_details)

  # 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_transfer_reservation",
    :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_transfer_reservation\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:



862
863
864
865
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 862

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



872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 872

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']) unless header_params['Accept']

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



925
926
927
928
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 925

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



935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 935

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']) unless header_params['Accept']

  # 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, relinquish_ip_block, 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.

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

    the optional parameters

Returns:

  • (String)


990
991
992
993
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 990

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

#servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, relinquish_ip_block, 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.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1002

def servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, relinquish_ip_block, 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
  # verify the required parameter 'relinquish_ip_block' is set
  if @api_client.config.client_side_validation && relinquish_ip_block.nil?
    fail ArgumentError, "Missing the required parameter 'relinquish_ip_block' 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']) unless header_params['Accept']
  # 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(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, server_ip_block, 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. A server can have at most one IPv4 block and one IPv6 block assigned simultaneously. Assigning IPv6 to server is only supported post-provision. 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.

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

    the optional parameters

Returns:



1069
1070
1071
1072
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1069

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

#servers_server_id_ip_blocks_post_with_http_info(server_id, server_ip_block, 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. A server can have at most one IPv4 block and one IPv6 block assigned simultaneously. Assigning IPv6 to server is only supported post-provision. 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.

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

    the optional parameters

Returns:

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

    ServerIpBlock data, response status code and response headers



1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1080

def servers_server_id_ip_blocks_post_with_http_info(server_id, server_ip_block, 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
  # verify the required parameter 'server_ip_block' is set
  if @api_client.config.client_side_validation && server_ip_block.nil?
    fail ArgumentError, "Missing the required parameter 'server_ip_block' 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']) unless header_params['Accept']
  # 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(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_os_configuration_ipxe_put(server_id, os_configuration_ipxe, opts = {}) ⇒ OsConfigurationIPXE

Updates the iPXE OS configuration. Updates the iPXE OS configuration by updating the URL and the native VLAN configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



1143
1144
1145
1146
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1143

def servers_server_id_os_configuration_ipxe_put(server_id, os_configuration_ipxe, opts = {})
  data, _status_code, _headers = servers_server_id_os_configuration_ipxe_put_with_http_info(server_id, os_configuration_ipxe, opts)
  data
end

#servers_server_id_os_configuration_ipxe_put_with_http_info(server_id, os_configuration_ipxe, opts = {}) ⇒ Array<(OsConfigurationIPXE, Integer, Hash)>

Updates the iPXE OS configuration. Updates the iPXE OS configuration by updating the URL and the native VLAN configuration.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    OsConfigurationIPXE data, response status code and response headers



1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1154

def servers_server_id_os_configuration_ipxe_put_with_http_info(server_id, os_configuration_ipxe, opts = {})
  if @api_client.config.debugging
    @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_os_configuration_ipxe_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_os_configuration_ipxe_put"
  end
  # verify the required parameter 'os_configuration_ipxe' is set
  if @api_client.config.client_side_validation && os_configuration_ipxe.nil?
    fail ArgumentError, "Missing the required parameter 'os_configuration_ipxe' when calling ServersApi.servers_server_id_os_configuration_ipxe_put"
  end
  # resource path
  local_var_path = '/servers/{serverId}/os-configuration/ipxe'.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']) unless header_params['Accept']
  # 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(os_configuration_ipxe)

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

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

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

#servers_server_id_patch(server_id, server_patch, 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.

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

    the optional parameters

Returns:



1217
1218
1219
1220
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1217

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

#servers_server_id_patch_with_http_info(server_id, server_patch, 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.

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

    the optional parameters

Returns:

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

    Server data, response status code and response headers



1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1228

def servers_server_id_patch_with_http_info(server_id, server_patch, 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
  # verify the required parameter 'server_patch' is set
  if @api_client.config.client_side_validation && server_patch.nil?
    fail ArgumentError, "Missing the required parameter 'server_patch' 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']) unless header_params['Accept']
  # 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(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, server_network_update, 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.

  • server_network_update (ServerNetworkUpdate)
  • 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)

Returns:



1293
1294
1295
1296
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1293

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

#servers_server_id_private_networks_patch_with_http_info(server_id, private_network_id, server_network_update, 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.

  • server_network_update (ServerNetworkUpdate)
  • 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)

Returns:

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

    ServerPrivateNetwork data, response status code and response headers



1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1306

def servers_server_id_private_networks_patch_with_http_info(server_id, private_network_id, server_network_update, 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
  # verify the required parameter 'server_network_update' is set
  if @api_client.config.client_side_validation && server_network_update.nil?
    fail ArgumentError, "Missing the required parameter 'server_network_update' 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']) unless header_params['Accept']
  # 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(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, server_private_network, 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.

  • server_private_network (ServerPrivateNetwork)
  • 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)

Returns:



1375
1376
1377
1378
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1375

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

#servers_server_id_private_networks_post_with_http_info(server_id, server_private_network, 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.

  • server_private_network (ServerPrivateNetwork)
  • 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)

Returns:

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

    ServerPrivateNetwork data, response status code and response headers



1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1387

def servers_server_id_private_networks_post_with_http_info(server_id, server_private_network, 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
  # verify the required parameter 'server_private_network' is set
  if @api_client.config.client_side_validation && server_private_network.nil?
    fail ArgumentError, "Missing the required parameter 'server_private_network' 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']) unless header_params['Accept']
  # 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(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)


1451
1452
1453
1454
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1451

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



1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1462

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']) unless header_params['Accept']

  # 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, server_network_update, 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.

  • server_network_update (ServerNetworkUpdate)
  • 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)

Returns:



1522
1523
1524
1525
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1522

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

#servers_server_id_public_networks_patch_with_http_info(server_id, public_network_id, server_network_update, 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.

  • server_network_update (ServerNetworkUpdate)
  • 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)

Returns:

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

    ServerPublicNetwork data, response status code and response headers



1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1535

def servers_server_id_public_networks_patch_with_http_info(server_id, public_network_id, server_network_update, 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
  # verify the required parameter 'server_network_update' is set
  if @api_client.config.client_side_validation && server_network_update.nil?
    fail ArgumentError, "Missing the required parameter 'server_network_update' 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']) unless header_params['Accept']
  # 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(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, server_public_network, 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.

  • server_public_network (ServerPublicNetwork)
  • 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)

Returns:



1604
1605
1606
1607
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1604

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

#servers_server_id_public_networks_post_with_http_info(server_id, server_public_network, 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.

  • server_public_network (ServerPublicNetwork)
  • 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)

Returns:

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

    ServerPublicNetwork data, response status code and response headers



1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1616

def servers_server_id_public_networks_post_with_http_info(server_id, server_public_network, 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
  # verify the required parameter 'server_public_network' is set
  if @api_client.config.client_side_validation && server_public_network.nil?
    fail ArgumentError, "Missing the required parameter 'server_public_network' 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']) unless header_params['Accept']
  # 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(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, tag_assignment_request, 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.

  • tag_assignment_request (Array<TagAssignmentRequest>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



1680
1681
1682
1683
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1680

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

#servers_server_id_tags_put_with_http_info(server_id, tag_assignment_request, 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.

  • tag_assignment_request (Array<TagAssignmentRequest>)
  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

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

    Server data, response status code and response headers



1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1691

def servers_server_id_tags_put_with_http_info(server_id, tag_assignment_request, 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
  # 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 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']) unless header_params['Accept']
  # 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] || '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