pnap_bmc_api 2.2.2 → 2.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -0
- data/VERSION +1 -1
- data/docs/IpBlocksConfiguration.md +1 -1
- data/docs/OsConfiguration.md +3 -1
- data/docs/OsConfigurationCloudInit.md +1 -1
- data/docs/OsConfigurationIPXE.md +20 -0
- data/docs/OsConfigurationIPXENativeVlanConfiguration.md +22 -0
- data/docs/OsConfigurationWindows.md +3 -1
- data/docs/PrivateNetworkConfiguration.md +1 -1
- data/docs/PublicNetworkConfiguration.md +1 -1
- data/docs/RebootRequest.md +20 -0
- data/docs/ReservationTransferDetails.md +18 -0
- data/docs/Server.md +4 -4
- data/docs/ServerCreate.md +3 -3
- data/docs/ServerNetworkUpdate.md +1 -1
- data/docs/ServerPrivateNetwork.md +3 -1
- data/docs/ServerProvision.md +1 -1
- data/docs/ServerPublicNetwork.md +5 -3
- data/docs/ServersApi.md +157 -7
- data/lib/pnap_bmc_api/api/quotas_api.rb +4 -4
- data/lib/pnap_bmc_api/api/servers_api.rb +182 -24
- data/lib/pnap_bmc_api/api/ssh_keys_api.rb +6 -6
- data/lib/pnap_bmc_api/api_client.rb +17 -14
- data/lib/pnap_bmc_api/api_error.rb +1 -1
- data/lib/pnap_bmc_api/api_model_base.rb +88 -0
- data/lib/pnap_bmc_api/configuration.rb +11 -1
- data/lib/pnap_bmc_api/models/action_result.rb +21 -78
- data/lib/pnap_bmc_api/models/delete_result.rb +31 -78
- data/lib/pnap_bmc_api/models/delete_ssh_key_result.rb +31 -78
- data/lib/pnap_bmc_api/models/error.rb +21 -78
- data/lib/pnap_bmc_api/models/esxi_datastore_configuration.rb +13 -80
- data/lib/pnap_bmc_api/models/esxi_os_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/gpu_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/ip_blocks_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/network_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration.rb +24 -82
- data/lib/pnap_bmc_api/models/os_configuration_cloud_init.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_ipxe.rb +186 -0
- data/lib/pnap_bmc_api/models/os_configuration_ipxe_native_vlan_configuration.rb +224 -0
- data/lib/pnap_bmc_api/models/os_configuration_map.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_map_esxi.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_map_proxmox.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_netris_controller.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_netris_softgate.rb +11 -78
- data/lib/pnap_bmc_api/models/os_configuration_windows.rb +27 -82
- data/lib/pnap_bmc_api/models/private_network_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/public_network_configuration.rb +12 -79
- data/lib/pnap_bmc_api/models/quota.rb +61 -78
- data/lib/pnap_bmc_api/models/quota_edit_limit_request.rb +14 -81
- data/lib/pnap_bmc_api/models/quota_edit_limit_request_details.rb +25 -86
- data/lib/pnap_bmc_api/models/reboot_request.rb +212 -0
- data/lib/pnap_bmc_api/models/relinquish_ip_block.rb +11 -78
- data/lib/pnap_bmc_api/models/reservation_transfer_details.rb +166 -0
- data/lib/pnap_bmc_api/models/reset_result.rb +21 -78
- data/lib/pnap_bmc_api/models/server.rb +117 -84
- data/lib/pnap_bmc_api/models/server_create.rb +46 -83
- data/lib/pnap_bmc_api/models/server_ip_block.rb +21 -78
- data/lib/pnap_bmc_api/models/server_network_update.rb +12 -79
- data/lib/pnap_bmc_api/models/server_patch.rb +13 -80
- data/lib/pnap_bmc_api/models/server_private_network.rb +35 -82
- data/lib/pnap_bmc_api/models/server_provision.rb +24 -81
- data/lib/pnap_bmc_api/models/server_public_network.rb +53 -83
- data/lib/pnap_bmc_api/models/server_reserve.rb +21 -78
- data/lib/pnap_bmc_api/models/server_reset.rb +11 -78
- data/lib/pnap_bmc_api/models/ssh_key.rb +81 -78
- data/lib/pnap_bmc_api/models/ssh_key_create.rb +23 -80
- data/lib/pnap_bmc_api/models/ssh_key_update.rb +23 -80
- data/lib/pnap_bmc_api/models/storage_configuration.rb +11 -78
- data/lib/pnap_bmc_api/models/storage_configuration_root_partition.rb +11 -78
- data/lib/pnap_bmc_api/models/tag_assignment.rb +41 -78
- data/lib/pnap_bmc_api/models/tag_assignment_request.rb +21 -78
- data/lib/pnap_bmc_api/version.rb +1 -2
- data/lib/pnap_bmc_api.rb +6 -1
- data/pnap_bmc_api.gemspec +6 -6
- data/spec/api/quotas_api_spec.rb +1 -1
- data/spec/api/servers_api_spec.rb +29 -1
- data/spec/api/ssh_keys_api_spec.rb +1 -1
- data/spec/models/action_result_spec.rb +2 -2
- data/spec/models/delete_result_spec.rb +2 -2
- data/spec/models/delete_ssh_key_result_spec.rb +2 -2
- data/spec/models/error_spec.rb +2 -2
- data/spec/models/esxi_datastore_configuration_spec.rb +2 -2
- data/spec/models/esxi_os_configuration_spec.rb +2 -2
- data/spec/models/gpu_configuration_spec.rb +2 -2
- data/spec/models/ip_blocks_configuration_spec.rb +2 -2
- data/spec/models/network_configuration_spec.rb +2 -2
- data/spec/models/os_configuration_cloud_init_spec.rb +2 -2
- data/spec/models/os_configuration_ipxe_native_vlan_configuration_spec.rb +52 -0
- data/spec/models/os_configuration_ipxe_spec.rb +42 -0
- data/spec/models/os_configuration_map_esxi_spec.rb +2 -2
- data/spec/models/os_configuration_map_proxmox_spec.rb +2 -2
- data/spec/models/os_configuration_map_spec.rb +2 -2
- data/spec/models/os_configuration_netris_controller_spec.rb +2 -2
- data/spec/models/os_configuration_netris_softgate_spec.rb +2 -2
- data/spec/models/os_configuration_spec.rb +8 -2
- data/spec/models/os_configuration_windows_spec.rb +8 -2
- data/spec/models/private_network_configuration_spec.rb +2 -2
- data/spec/models/public_network_configuration_spec.rb +2 -2
- data/spec/models/quota_edit_limit_request_details_spec.rb +2 -2
- data/spec/models/quota_edit_limit_request_spec.rb +2 -2
- data/spec/models/quota_spec.rb +2 -2
- data/spec/models/reboot_request_spec.rb +46 -0
- data/spec/models/relinquish_ip_block_spec.rb +2 -2
- data/spec/models/reservation_transfer_details_spec.rb +36 -0
- data/spec/models/reset_result_spec.rb +2 -2
- data/spec/models/server_create_spec.rb +2 -2
- data/spec/models/server_ip_block_spec.rb +2 -2
- data/spec/models/server_network_update_spec.rb +2 -2
- data/spec/models/server_patch_spec.rb +2 -2
- data/spec/models/server_private_network_spec.rb +8 -2
- data/spec/models/server_provision_spec.rb +2 -2
- data/spec/models/server_public_network_spec.rb +8 -2
- data/spec/models/server_reserve_spec.rb +2 -2
- data/spec/models/server_reset_spec.rb +2 -2
- data/spec/models/server_spec.rb +2 -2
- data/spec/models/ssh_key_create_spec.rb +2 -2
- data/spec/models/ssh_key_spec.rb +2 -2
- data/spec/models/ssh_key_update_spec.rb +2 -2
- data/spec/models/storage_configuration_root_partition_spec.rb +2 -2
- data/spec/models/storage_configuration_spec.rb +2 -2
- data/spec/models/tag_assignment_request_spec.rb +2 -2
- data/spec/models/tag_assignment_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -1
- metadata +60 -39
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
|
7
7
|
Contact: support@phoenixnap.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -45,7 +45,7 @@ module BmcApi
|
|
|
45
45
|
# header parameters
|
|
46
46
|
header_params = opts[:header_params] || {}
|
|
47
47
|
# HTTP header 'Accept' (if needed)
|
|
48
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
49
|
|
|
50
50
|
# form parameters
|
|
51
51
|
form_params = opts[:form_params] || {}
|
|
@@ -114,7 +114,7 @@ module BmcApi
|
|
|
114
114
|
# header parameters
|
|
115
115
|
header_params = opts[:header_params] || {}
|
|
116
116
|
# HTTP header 'Accept' (if needed)
|
|
117
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
117
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
118
118
|
# HTTP header 'Content-Type'
|
|
119
119
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
120
120
|
if !content_type.nil?
|
|
@@ -182,7 +182,7 @@ module BmcApi
|
|
|
182
182
|
# header parameters
|
|
183
183
|
header_params = opts[:header_params] || {}
|
|
184
184
|
# HTTP header 'Accept' (if needed)
|
|
185
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
185
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
186
186
|
|
|
187
187
|
# form parameters
|
|
188
188
|
form_params = opts[:form_params] || {}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
|
7
7
|
Contact: support@phoenixnap.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -57,7 +57,7 @@ module BmcApi
|
|
|
57
57
|
# header parameters
|
|
58
58
|
header_params = opts[:header_params] || {}
|
|
59
59
|
# HTTP header 'Accept' (if needed)
|
|
60
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
60
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
61
61
|
|
|
62
62
|
# form parameters
|
|
63
63
|
form_params = opts[:form_params] || {}
|
|
@@ -92,6 +92,7 @@ module BmcApi
|
|
|
92
92
|
# List all servers owned by account.
|
|
93
93
|
# @param [Hash] opts the optional parameters
|
|
94
94
|
# @option opts [Array<String>] :tag A list of query parameters related to tags in the form of tagName.tagValue
|
|
95
|
+
# @option opts [Array<String>] :location Filters servers by server location
|
|
95
96
|
# @return [Array<Server>]
|
|
96
97
|
def servers_get(opts = {})
|
|
97
98
|
data, _status_code, _headers = servers_get_with_http_info(opts)
|
|
@@ -102,6 +103,7 @@ module BmcApi
|
|
|
102
103
|
# List all servers owned by account.
|
|
103
104
|
# @param [Hash] opts the optional parameters
|
|
104
105
|
# @option opts [Array<String>] :tag A list of query parameters related to tags in the form of tagName.tagValue
|
|
106
|
+
# @option opts [Array<String>] :location Filters servers by server location
|
|
105
107
|
# @return [Array<(Array<Server>, Integer, Hash)>] Array<Server> data, response status code and response headers
|
|
106
108
|
def servers_get_with_http_info(opts = {})
|
|
107
109
|
if @api_client.config.debugging
|
|
@@ -113,11 +115,12 @@ module BmcApi
|
|
|
113
115
|
# query parameters
|
|
114
116
|
query_params = opts[:query_params] || {}
|
|
115
117
|
query_params[:'tag'] = @api_client.build_collection_param(opts[:'tag'], :multi) if !opts[:'tag'].nil?
|
|
118
|
+
query_params[:'location'] = @api_client.build_collection_param(opts[:'location'], :multi) if !opts[:'location'].nil?
|
|
116
119
|
|
|
117
120
|
# header parameters
|
|
118
121
|
header_params = opts[:header_params] || {}
|
|
119
122
|
# HTTP header 'Accept' (if needed)
|
|
120
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
123
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
121
124
|
|
|
122
125
|
# form parameters
|
|
123
126
|
form_params = opts[:form_params] || {}
|
|
@@ -183,7 +186,7 @@ module BmcApi
|
|
|
183
186
|
# header parameters
|
|
184
187
|
header_params = opts[:header_params] || {}
|
|
185
188
|
# HTTP header 'Accept' (if needed)
|
|
186
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
189
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
187
190
|
# HTTP header 'Content-Type'
|
|
188
191
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
189
192
|
if !content_type.nil?
|
|
@@ -257,7 +260,7 @@ module BmcApi
|
|
|
257
260
|
# header parameters
|
|
258
261
|
header_params = opts[:header_params] || {}
|
|
259
262
|
# HTTP header 'Accept' (if needed)
|
|
260
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
263
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
261
264
|
# HTTP header 'Content-Type'
|
|
262
265
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
263
266
|
if !content_type.nil?
|
|
@@ -325,7 +328,7 @@ module BmcApi
|
|
|
325
328
|
# header parameters
|
|
326
329
|
header_params = opts[:header_params] || {}
|
|
327
330
|
# HTTP header 'Accept' (if needed)
|
|
328
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
331
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
329
332
|
|
|
330
333
|
# form parameters
|
|
331
334
|
form_params = opts[:form_params] || {}
|
|
@@ -388,7 +391,7 @@ module BmcApi
|
|
|
388
391
|
# header parameters
|
|
389
392
|
header_params = opts[:header_params] || {}
|
|
390
393
|
# HTTP header 'Accept' (if needed)
|
|
391
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
394
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
392
395
|
|
|
393
396
|
# form parameters
|
|
394
397
|
form_params = opts[:form_params] || {}
|
|
@@ -460,7 +463,7 @@ module BmcApi
|
|
|
460
463
|
# header parameters
|
|
461
464
|
header_params = opts[:header_params] || {}
|
|
462
465
|
# HTTP header 'Accept' (if needed)
|
|
463
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
466
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
464
467
|
# HTTP header 'Content-Type'
|
|
465
468
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
466
469
|
if !content_type.nil?
|
|
@@ -500,6 +503,7 @@ module BmcApi
|
|
|
500
503
|
# Reboot specific server.
|
|
501
504
|
# @param server_id [String] The server's ID.
|
|
502
505
|
# @param [Hash] opts the optional parameters
|
|
506
|
+
# @option opts [RebootRequest] :reboot_request Configuration option to specify the reboot type: STANDARD or IPXE (default: STANDARD).
|
|
503
507
|
# @return [ActionResult]
|
|
504
508
|
def servers_server_id_actions_reboot_post(server_id, opts = {})
|
|
505
509
|
data, _status_code, _headers = servers_server_id_actions_reboot_post_with_http_info(server_id, opts)
|
|
@@ -510,6 +514,7 @@ module BmcApi
|
|
|
510
514
|
# Reboot specific server.
|
|
511
515
|
# @param server_id [String] The server's ID.
|
|
512
516
|
# @param [Hash] opts the optional parameters
|
|
517
|
+
# @option opts [RebootRequest] :reboot_request Configuration option to specify the reboot type: STANDARD or IPXE (default: STANDARD).
|
|
513
518
|
# @return [Array<(ActionResult, Integer, Hash)>] ActionResult data, response status code and response headers
|
|
514
519
|
def servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {})
|
|
515
520
|
if @api_client.config.debugging
|
|
@@ -528,13 +533,18 @@ module BmcApi
|
|
|
528
533
|
# header parameters
|
|
529
534
|
header_params = opts[:header_params] || {}
|
|
530
535
|
# HTTP header 'Accept' (if needed)
|
|
531
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
536
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
537
|
+
# HTTP header 'Content-Type'
|
|
538
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
539
|
+
if !content_type.nil?
|
|
540
|
+
header_params['Content-Type'] = content_type
|
|
541
|
+
end
|
|
532
542
|
|
|
533
543
|
# form parameters
|
|
534
544
|
form_params = opts[:form_params] || {}
|
|
535
545
|
|
|
536
546
|
# http body (model)
|
|
537
|
-
post_body = opts[:debug_body]
|
|
547
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'reboot_request'])
|
|
538
548
|
|
|
539
549
|
# return_type
|
|
540
550
|
return_type = opts[:debug_return_type] || 'ActionResult'
|
|
@@ -597,7 +607,7 @@ module BmcApi
|
|
|
597
607
|
# header parameters
|
|
598
608
|
header_params = opts[:header_params] || {}
|
|
599
609
|
# HTTP header 'Accept' (if needed)
|
|
600
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
610
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
601
611
|
# HTTP header 'Content-Type'
|
|
602
612
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
603
613
|
if !content_type.nil?
|
|
@@ -671,7 +681,7 @@ module BmcApi
|
|
|
671
681
|
# header parameters
|
|
672
682
|
header_params = opts[:header_params] || {}
|
|
673
683
|
# HTTP header 'Accept' (if needed)
|
|
674
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
684
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
675
685
|
# HTTP header 'Content-Type'
|
|
676
686
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
677
687
|
if !content_type.nil?
|
|
@@ -739,7 +749,7 @@ module BmcApi
|
|
|
739
749
|
# header parameters
|
|
740
750
|
header_params = opts[:header_params] || {}
|
|
741
751
|
# HTTP header 'Accept' (if needed)
|
|
742
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
752
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
743
753
|
|
|
744
754
|
# form parameters
|
|
745
755
|
form_params = opts[:form_params] || {}
|
|
@@ -770,6 +780,80 @@ module BmcApi
|
|
|
770
780
|
return data, status_code, headers
|
|
771
781
|
end
|
|
772
782
|
|
|
783
|
+
# Transfer server reservation.
|
|
784
|
+
# 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.
|
|
785
|
+
# @param server_id [String] The server's ID.
|
|
786
|
+
# @param reservation_transfer_details [ReservationTransferDetails]
|
|
787
|
+
# @param [Hash] opts the optional parameters
|
|
788
|
+
# @return [Server]
|
|
789
|
+
def servers_server_id_actions_transfer_reservation(server_id, reservation_transfer_details, opts = {})
|
|
790
|
+
data, _status_code, _headers = servers_server_id_actions_transfer_reservation_with_http_info(server_id, reservation_transfer_details, opts)
|
|
791
|
+
data
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
# Transfer server reservation.
|
|
795
|
+
# 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.
|
|
796
|
+
# @param server_id [String] The server's ID.
|
|
797
|
+
# @param reservation_transfer_details [ReservationTransferDetails]
|
|
798
|
+
# @param [Hash] opts the optional parameters
|
|
799
|
+
# @return [Array<(Server, Integer, Hash)>] Server data, response status code and response headers
|
|
800
|
+
def servers_server_id_actions_transfer_reservation_with_http_info(server_id, reservation_transfer_details, opts = {})
|
|
801
|
+
if @api_client.config.debugging
|
|
802
|
+
@api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_transfer_reservation ...'
|
|
803
|
+
end
|
|
804
|
+
# verify the required parameter 'server_id' is set
|
|
805
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
|
806
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_transfer_reservation"
|
|
807
|
+
end
|
|
808
|
+
# verify the required parameter 'reservation_transfer_details' is set
|
|
809
|
+
if @api_client.config.client_side_validation && reservation_transfer_details.nil?
|
|
810
|
+
fail ArgumentError, "Missing the required parameter 'reservation_transfer_details' when calling ServersApi.servers_server_id_actions_transfer_reservation"
|
|
811
|
+
end
|
|
812
|
+
# resource path
|
|
813
|
+
local_var_path = '/servers/{serverId}/actions/transfer-reservation'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
|
814
|
+
|
|
815
|
+
# query parameters
|
|
816
|
+
query_params = opts[:query_params] || {}
|
|
817
|
+
|
|
818
|
+
# header parameters
|
|
819
|
+
header_params = opts[:header_params] || {}
|
|
820
|
+
# HTTP header 'Accept' (if needed)
|
|
821
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
822
|
+
# HTTP header 'Content-Type'
|
|
823
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
824
|
+
if !content_type.nil?
|
|
825
|
+
header_params['Content-Type'] = content_type
|
|
826
|
+
end
|
|
827
|
+
|
|
828
|
+
# form parameters
|
|
829
|
+
form_params = opts[:form_params] || {}
|
|
830
|
+
|
|
831
|
+
# http body (model)
|
|
832
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(reservation_transfer_details)
|
|
833
|
+
|
|
834
|
+
# return_type
|
|
835
|
+
return_type = opts[:debug_return_type] || 'Server'
|
|
836
|
+
|
|
837
|
+
# auth_names
|
|
838
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
839
|
+
|
|
840
|
+
new_options = opts.merge(
|
|
841
|
+
:operation => :"ServersApi.servers_server_id_actions_transfer_reservation",
|
|
842
|
+
:header_params => header_params,
|
|
843
|
+
:query_params => query_params,
|
|
844
|
+
:form_params => form_params,
|
|
845
|
+
:body => post_body,
|
|
846
|
+
:auth_names => auth_names,
|
|
847
|
+
:return_type => return_type
|
|
848
|
+
)
|
|
849
|
+
|
|
850
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
851
|
+
if @api_client.config.debugging
|
|
852
|
+
@api_client.config.logger.debug "API called: ServersApi#servers_server_id_actions_transfer_reservation\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
853
|
+
end
|
|
854
|
+
return data, status_code, headers
|
|
855
|
+
end
|
|
856
|
+
|
|
773
857
|
# Delete server.
|
|
774
858
|
# Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/{serverId}/actions/deprovision
|
|
775
859
|
# @param server_id [String] The server's ID.
|
|
@@ -802,7 +886,7 @@ module BmcApi
|
|
|
802
886
|
# header parameters
|
|
803
887
|
header_params = opts[:header_params] || {}
|
|
804
888
|
# HTTP header 'Accept' (if needed)
|
|
805
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
889
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
806
890
|
|
|
807
891
|
# form parameters
|
|
808
892
|
form_params = opts[:form_params] || {}
|
|
@@ -865,7 +949,7 @@ module BmcApi
|
|
|
865
949
|
# header parameters
|
|
866
950
|
header_params = opts[:header_params] || {}
|
|
867
951
|
# HTTP header 'Accept' (if needed)
|
|
868
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
952
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
869
953
|
|
|
870
954
|
# form parameters
|
|
871
955
|
form_params = opts[:form_params] || {}
|
|
@@ -940,7 +1024,7 @@ module BmcApi
|
|
|
940
1024
|
# header parameters
|
|
941
1025
|
header_params = opts[:header_params] || {}
|
|
942
1026
|
# HTTP header 'Accept' (if needed)
|
|
943
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1027
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
944
1028
|
# HTTP header 'Content-Type'
|
|
945
1029
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
946
1030
|
if !content_type.nil?
|
|
@@ -1014,7 +1098,7 @@ module BmcApi
|
|
|
1014
1098
|
# header parameters
|
|
1015
1099
|
header_params = opts[:header_params] || {}
|
|
1016
1100
|
# HTTP header 'Accept' (if needed)
|
|
1017
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1101
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1018
1102
|
# HTTP header 'Content-Type'
|
|
1019
1103
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1020
1104
|
if !content_type.nil?
|
|
@@ -1050,6 +1134,80 @@ module BmcApi
|
|
|
1050
1134
|
return data, status_code, headers
|
|
1051
1135
|
end
|
|
1052
1136
|
|
|
1137
|
+
# Updates the iPXE OS configuration.
|
|
1138
|
+
# Updates the iPXE OS configuration by updating the URL and the native VLAN configuration.
|
|
1139
|
+
# @param server_id [String] The server's ID.
|
|
1140
|
+
# @param os_configuration_ipxe [OsConfigurationIPXE]
|
|
1141
|
+
# @param [Hash] opts the optional parameters
|
|
1142
|
+
# @return [OsConfigurationIPXE]
|
|
1143
|
+
def servers_server_id_os_configuration_ipxe_put(server_id, os_configuration_ipxe, opts = {})
|
|
1144
|
+
data, _status_code, _headers = servers_server_id_os_configuration_ipxe_put_with_http_info(server_id, os_configuration_ipxe, opts)
|
|
1145
|
+
data
|
|
1146
|
+
end
|
|
1147
|
+
|
|
1148
|
+
# Updates the iPXE OS configuration.
|
|
1149
|
+
# Updates the iPXE OS configuration by updating the URL and the native VLAN configuration.
|
|
1150
|
+
# @param server_id [String] The server's ID.
|
|
1151
|
+
# @param os_configuration_ipxe [OsConfigurationIPXE]
|
|
1152
|
+
# @param [Hash] opts the optional parameters
|
|
1153
|
+
# @return [Array<(OsConfigurationIPXE, Integer, Hash)>] OsConfigurationIPXE data, response status code and response headers
|
|
1154
|
+
def servers_server_id_os_configuration_ipxe_put_with_http_info(server_id, os_configuration_ipxe, opts = {})
|
|
1155
|
+
if @api_client.config.debugging
|
|
1156
|
+
@api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_os_configuration_ipxe_put ...'
|
|
1157
|
+
end
|
|
1158
|
+
# verify the required parameter 'server_id' is set
|
|
1159
|
+
if @api_client.config.client_side_validation && server_id.nil?
|
|
1160
|
+
fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_os_configuration_ipxe_put"
|
|
1161
|
+
end
|
|
1162
|
+
# verify the required parameter 'os_configuration_ipxe' is set
|
|
1163
|
+
if @api_client.config.client_side_validation && os_configuration_ipxe.nil?
|
|
1164
|
+
fail ArgumentError, "Missing the required parameter 'os_configuration_ipxe' when calling ServersApi.servers_server_id_os_configuration_ipxe_put"
|
|
1165
|
+
end
|
|
1166
|
+
# resource path
|
|
1167
|
+
local_var_path = '/servers/{serverId}/os-configuration/ipxe'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s))
|
|
1168
|
+
|
|
1169
|
+
# query parameters
|
|
1170
|
+
query_params = opts[:query_params] || {}
|
|
1171
|
+
|
|
1172
|
+
# header parameters
|
|
1173
|
+
header_params = opts[:header_params] || {}
|
|
1174
|
+
# HTTP header 'Accept' (if needed)
|
|
1175
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1176
|
+
# HTTP header 'Content-Type'
|
|
1177
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1178
|
+
if !content_type.nil?
|
|
1179
|
+
header_params['Content-Type'] = content_type
|
|
1180
|
+
end
|
|
1181
|
+
|
|
1182
|
+
# form parameters
|
|
1183
|
+
form_params = opts[:form_params] || {}
|
|
1184
|
+
|
|
1185
|
+
# http body (model)
|
|
1186
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(os_configuration_ipxe)
|
|
1187
|
+
|
|
1188
|
+
# return_type
|
|
1189
|
+
return_type = opts[:debug_return_type] || 'OsConfigurationIPXE'
|
|
1190
|
+
|
|
1191
|
+
# auth_names
|
|
1192
|
+
auth_names = opts[:debug_auth_names] || ['OAuth2']
|
|
1193
|
+
|
|
1194
|
+
new_options = opts.merge(
|
|
1195
|
+
:operation => :"ServersApi.servers_server_id_os_configuration_ipxe_put",
|
|
1196
|
+
:header_params => header_params,
|
|
1197
|
+
:query_params => query_params,
|
|
1198
|
+
:form_params => form_params,
|
|
1199
|
+
:body => post_body,
|
|
1200
|
+
:auth_names => auth_names,
|
|
1201
|
+
:return_type => return_type
|
|
1202
|
+
)
|
|
1203
|
+
|
|
1204
|
+
data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
|
|
1205
|
+
if @api_client.config.debugging
|
|
1206
|
+
@api_client.config.logger.debug "API called: ServersApi#servers_server_id_os_configuration_ipxe_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1207
|
+
end
|
|
1208
|
+
return data, status_code, headers
|
|
1209
|
+
end
|
|
1210
|
+
|
|
1053
1211
|
# Patch a Server.
|
|
1054
1212
|
# 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.
|
|
1055
1213
|
# @param server_id [String] The server's ID.
|
|
@@ -1088,7 +1246,7 @@ module BmcApi
|
|
|
1088
1246
|
# header parameters
|
|
1089
1247
|
header_params = opts[:header_params] || {}
|
|
1090
1248
|
# HTTP header 'Accept' (if needed)
|
|
1091
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1249
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1092
1250
|
# HTTP header 'Content-Type'
|
|
1093
1251
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1094
1252
|
if !content_type.nil?
|
|
@@ -1171,7 +1329,7 @@ module BmcApi
|
|
|
1171
1329
|
# header parameters
|
|
1172
1330
|
header_params = opts[:header_params] || {}
|
|
1173
1331
|
# HTTP header 'Accept' (if needed)
|
|
1174
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1332
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1175
1333
|
# HTTP header 'Content-Type'
|
|
1176
1334
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1177
1335
|
if !content_type.nil?
|
|
@@ -1248,7 +1406,7 @@ module BmcApi
|
|
|
1248
1406
|
# header parameters
|
|
1249
1407
|
header_params = opts[:header_params] || {}
|
|
1250
1408
|
# HTTP header 'Accept' (if needed)
|
|
1251
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1409
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1252
1410
|
# HTTP header 'Content-Type'
|
|
1253
1411
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1254
1412
|
if !content_type.nil?
|
|
@@ -1322,7 +1480,7 @@ module BmcApi
|
|
|
1322
1480
|
# header parameters
|
|
1323
1481
|
header_params = opts[:header_params] || {}
|
|
1324
1482
|
# HTTP header 'Accept' (if needed)
|
|
1325
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1483
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1326
1484
|
|
|
1327
1485
|
# form parameters
|
|
1328
1486
|
form_params = opts[:form_params] || {}
|
|
@@ -1400,7 +1558,7 @@ module BmcApi
|
|
|
1400
1558
|
# header parameters
|
|
1401
1559
|
header_params = opts[:header_params] || {}
|
|
1402
1560
|
# HTTP header 'Accept' (if needed)
|
|
1403
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1561
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1404
1562
|
# HTTP header 'Content-Type'
|
|
1405
1563
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1406
1564
|
if !content_type.nil?
|
|
@@ -1477,7 +1635,7 @@ module BmcApi
|
|
|
1477
1635
|
# header parameters
|
|
1478
1636
|
header_params = opts[:header_params] || {}
|
|
1479
1637
|
# HTTP header 'Accept' (if needed)
|
|
1480
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1638
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1481
1639
|
# HTTP header 'Content-Type'
|
|
1482
1640
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1483
1641
|
if !content_type.nil?
|
|
@@ -1551,7 +1709,7 @@ module BmcApi
|
|
|
1551
1709
|
# header parameters
|
|
1552
1710
|
header_params = opts[:header_params] || {}
|
|
1553
1711
|
# HTTP header 'Accept' (if needed)
|
|
1554
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
1712
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1555
1713
|
# HTTP header 'Content-Type'
|
|
1556
1714
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1557
1715
|
if !content_type.nil?
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
|
7
7
|
Contact: support@phoenixnap.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -45,7 +45,7 @@ module BmcApi
|
|
|
45
45
|
# header parameters
|
|
46
46
|
header_params = opts[:header_params] || {}
|
|
47
47
|
# HTTP header 'Accept' (if needed)
|
|
48
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
48
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
49
49
|
|
|
50
50
|
# form parameters
|
|
51
51
|
form_params = opts[:form_params] || {}
|
|
@@ -108,7 +108,7 @@ module BmcApi
|
|
|
108
108
|
# header parameters
|
|
109
109
|
header_params = opts[:header_params] || {}
|
|
110
110
|
# HTTP header 'Accept' (if needed)
|
|
111
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
111
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
112
112
|
# HTTP header 'Content-Type'
|
|
113
113
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
114
114
|
if !content_type.nil?
|
|
@@ -176,7 +176,7 @@ module BmcApi
|
|
|
176
176
|
# header parameters
|
|
177
177
|
header_params = opts[:header_params] || {}
|
|
178
178
|
# HTTP header 'Accept' (if needed)
|
|
179
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
179
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
180
180
|
|
|
181
181
|
# form parameters
|
|
182
182
|
form_params = opts[:form_params] || {}
|
|
@@ -239,7 +239,7 @@ module BmcApi
|
|
|
239
239
|
# header parameters
|
|
240
240
|
header_params = opts[:header_params] || {}
|
|
241
241
|
# HTTP header 'Accept' (if needed)
|
|
242
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
242
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
243
243
|
|
|
244
244
|
# form parameters
|
|
245
245
|
form_params = opts[:form_params] || {}
|
|
@@ -308,7 +308,7 @@ module BmcApi
|
|
|
308
308
|
# header parameters
|
|
309
309
|
header_params = opts[:header_params] || {}
|
|
310
310
|
# HTTP header 'Accept' (if needed)
|
|
311
|
-
header_params['Accept'] = @api_client.select_header_accept(['application/json'])
|
|
311
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
312
312
|
# HTTP header 'Content-Type'
|
|
313
313
|
content_type = @api_client.select_header_content_type(['application/json'])
|
|
314
314
|
if !content_type.nil?
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
The version of the OpenAPI document: 0.1
|
|
7
7
|
Contact: support@phoenixnap.com
|
|
8
8
|
Generated by: https://openapi-generator.tech
|
|
9
|
-
|
|
9
|
+
Generator version: 7.20.0
|
|
10
10
|
|
|
11
11
|
=end
|
|
12
12
|
|
|
@@ -52,7 +52,8 @@ module BmcApi
|
|
|
52
52
|
# the data deserialized from response body (may be a Tempfile or nil), response status code and response headers.
|
|
53
53
|
def call_api(http_method, path, opts = {})
|
|
54
54
|
request = build_request(http_method, path, opts)
|
|
55
|
-
tempfile =
|
|
55
|
+
tempfile = nil
|
|
56
|
+
(download_file(request) { tempfile = _1 }) if opts[:return_type] == 'File'
|
|
56
57
|
response = request.run
|
|
57
58
|
|
|
58
59
|
if @config.debugging
|
|
@@ -191,19 +192,17 @@ module BmcApi
|
|
|
191
192
|
chunk.force_encoding(encoding)
|
|
192
193
|
tempfile.write(chunk)
|
|
193
194
|
end
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
request.on_complete do
|
|
196
|
+
if !tempfile
|
|
197
|
+
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
|
|
198
|
+
end
|
|
197
199
|
tempfile.close
|
|
198
200
|
@config.logger.info "Temp file written to #{tempfile.path}, please copy the file to a proper folder "\
|
|
199
201
|
"with e.g. `FileUtils.cp(tempfile.path, '/new/file/path')` otherwise the temp file "\
|
|
200
202
|
"will be deleted automatically with GC. It's also recommended to delete the temp file "\
|
|
201
203
|
"explicitly with `tempfile.delete`"
|
|
202
|
-
|
|
203
|
-
fail ApiError.new("Failed to create the tempfile based on the HTTP response from the server: #{request.inspect}")
|
|
204
|
+
yield tempfile if block_given?
|
|
204
205
|
end
|
|
205
|
-
|
|
206
|
-
tempfile
|
|
207
206
|
end
|
|
208
207
|
|
|
209
208
|
# Check if the given MIME is a JSON MIME.
|
|
@@ -215,7 +214,7 @@ module BmcApi
|
|
|
215
214
|
# @param [String] mime MIME
|
|
216
215
|
# @return [Boolean] True if the MIME is application/json
|
|
217
216
|
def json_mime?(mime)
|
|
218
|
-
(mime == '*/*') || !(mime =~
|
|
217
|
+
(mime == '*/*') || !(mime =~ /^Application\/.*json(?!p)(;.*)?/i).nil?
|
|
219
218
|
end
|
|
220
219
|
|
|
221
220
|
# Deserialize the response to the given return type.
|
|
@@ -282,9 +281,13 @@ module BmcApi
|
|
|
282
281
|
data.each { |k, v| hash[k] = convert_to_type(v, sub_type) }
|
|
283
282
|
end
|
|
284
283
|
else
|
|
285
|
-
# models (e.g. Pet) or oneOf
|
|
284
|
+
# models (e.g. Pet) or oneOf/anyOf
|
|
286
285
|
klass = BmcApi.const_get(return_type)
|
|
287
|
-
klass.respond_to?(:openapi_one_of)
|
|
286
|
+
if klass.respond_to?(:openapi_one_of) || klass.respond_to?(:openapi_any_of)
|
|
287
|
+
klass.build(data)
|
|
288
|
+
else
|
|
289
|
+
klass.build_from_hash(data)
|
|
290
|
+
end
|
|
288
291
|
end
|
|
289
292
|
end
|
|
290
293
|
|
|
@@ -294,7 +297,7 @@ module BmcApi
|
|
|
294
297
|
# @param [String] filename the filename to be sanitized
|
|
295
298
|
# @return [String] the sanitized filename
|
|
296
299
|
def sanitize_filename(filename)
|
|
297
|
-
filename.
|
|
300
|
+
filename.split(/[\/\\]/).last
|
|
298
301
|
end
|
|
299
302
|
|
|
300
303
|
def build_request_url(path, opts = {})
|
|
@@ -394,4 +397,4 @@ module BmcApi
|
|
|
394
397
|
end
|
|
395
398
|
end
|
|
396
399
|
end
|
|
397
|
-
end
|
|
400
|
+
end
|