Class: BmcApi::ServersApi

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(api_client = ApiClient.default) ⇒ ServersApi

Returns a new instance of ServersApi.



19
20
21
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 19

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

Instance Attribute Details

#api_clientObject

Returns the value of attribute api_client.



17
18
19
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 17

def api_client
  @api_client
end

Instance Method Details

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

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

Parameters:

  • server_id (String)

    The server's ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Returns:

  • (String)


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

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

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

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

Parameters:

  • server_id (String)

    The server&#39;s ID.

  • private_network_id (String)

    The private network identifier.

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

    the optional parameters

Returns:

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

    String data, response status code and response headers



39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 39

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

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

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

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

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

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

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

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

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

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

List servers. List all servers owned by account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tag (Array<String>)

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

Returns:



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

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

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

List servers. List all servers owned by account.

Parameters:

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

    the optional parameters

Options Hash (opts):

  • :tag (Array<String>)

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

Returns:

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

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



106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 106

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

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

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

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

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

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

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

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

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

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



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

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



168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 168

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'])
  # 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)


228
229
230
231
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 228

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



239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 239

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'])
  # 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:



301
302
303
304
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 301

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



311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 311

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

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

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

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

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

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

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

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

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

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

Power on server. Power on specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



364
365
366
367
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 364

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



374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 374

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

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

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

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

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

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

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

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

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

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



429
430
431
432
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 429

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



441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 441

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'])
  # 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

Returns:



504
505
506
507
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 504

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

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

Reboot server. Reboot specific server.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:

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

    ActionResult data, response status code and response headers



514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 514

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

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

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

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

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

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

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

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

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

#servers_server_id_actions_reserve_post(server_id, 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:



568
569
570
571
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 568

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



579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 579

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'])
  # 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:



642
643
644
645
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 642

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



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

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'])
  # 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:



715
716
717
718
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 715

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



725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 725

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

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

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

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

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

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

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

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

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

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

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

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



778
779
780
781
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 778

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



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

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

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

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

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

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

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

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

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

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

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

Get server. Get server properties.

Parameters:

  • server_id (String)

    The server&#39;s ID.

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

    the optional parameters

Returns:



841
842
843
844
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 841

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



851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 851

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

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

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

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

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

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

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

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

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

#servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, 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)


906
907
908
909
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 906

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



918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 918

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'])
  # 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. 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:



985
986
987
988
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 985

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. 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



996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 996

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'])
  # 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_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:



1059
1060
1061
1062
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1059

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



1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1070

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'])
  # 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:



1135
1136
1137
1138
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1135

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



1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1148

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'])
  # 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:



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

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



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

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'])
  # 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)


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

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



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

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

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

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

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

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

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

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

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

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

#servers_server_id_public_networks_patch(server_id, public_network_id, 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:



1364
1365
1366
1367
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1364

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



1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
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
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1377

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'])
  # 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:



1446
1447
1448
1449
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1446

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



1458
1459
1460
1461
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
1513
1514
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1458

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'])
  # 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:



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

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



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

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'])
  # 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