Class: BmcApi::ServersApi
- Inherits:
-
Object
- Object
- BmcApi::ServersApi
- Defined in:
- lib/pnap_bmc_api/api/servers_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_private_network(server_id, private_network_id, opts = {}) ⇒ String
Removes the server from private network.
-
#delete_private_network_with_http_info(server_id, private_network_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Removes the server from private network.
-
#initialize(api_client = ApiClient.default) ⇒ ServersApi
constructor
A new instance of ServersApi.
-
#servers_get(opts = {}) ⇒ Array<Server>
List servers.
-
#servers_get_with_http_info(opts = {}) ⇒ Array<(Array<Server>, Integer, Hash)>
List servers.
-
#servers_post(opts = {}) ⇒ Server
Create new server.
-
#servers_post_with_http_info(opts = {}) ⇒ Array<(Server, Integer, Hash)>
Create new server.
-
#servers_server_id_actions_deprovision_post(server_id, opts = {}) ⇒ String
Deprovision a server.
-
#servers_server_id_actions_deprovision_post_with_http_info(server_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Deprovision a server.
-
#servers_server_id_actions_power_off_post(server_id, opts = {}) ⇒ ActionResult
Power off server.
-
#servers_server_id_actions_power_off_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Power off server.
-
#servers_server_id_actions_power_on_post(server_id, opts = {}) ⇒ ActionResult
Power on server.
-
#servers_server_id_actions_power_on_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Power on server.
-
#servers_server_id_actions_reboot_post(server_id, opts = {}) ⇒ ActionResult
Reboot server.
-
#servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Reboot server.
-
#servers_server_id_actions_reserve_post(server_id, opts = {}) ⇒ Server
Reserve server.
-
#servers_server_id_actions_reserve_post_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Reserve server.
-
#servers_server_id_actions_reset_post(server_id, opts = {}) ⇒ ResetResult
Reset server.
-
#servers_server_id_actions_reset_post_with_http_info(server_id, opts = {}) ⇒ Array<(ResetResult, Integer, Hash)>
Reset server.
-
#servers_server_id_actions_shutdown_post(server_id, opts = {}) ⇒ ActionResult
Shutdown server.
-
#servers_server_id_actions_shutdown_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Shutdown server.
-
#servers_server_id_delete(server_id, opts = {}) ⇒ DeleteResult
Delete server.
-
#servers_server_id_delete_with_http_info(server_id, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete server.
-
#servers_server_id_get(server_id, opts = {}) ⇒ Server
Get server.
-
#servers_server_id_get_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Get server.
-
#servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts = {}) ⇒ String
Unassign IP Block from Server.
-
#servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Unassign IP Block from Server.
-
#servers_server_id_ip_blocks_post(server_id, opts = {}) ⇒ ServerIpBlock
Assign IP Block to Server.
-
#servers_server_id_ip_blocks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerIpBlock, Integer, Hash)>
Assign IP Block to Server.
-
#servers_server_id_patch(server_id, opts = {}) ⇒ Server
Patch a Server.
-
#servers_server_id_patch_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Patch a Server.
-
#servers_server_id_private_networks_post(server_id, opts = {}) ⇒ ServerPrivateNetwork
Adds the server to a private network.
-
#servers_server_id_private_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPrivateNetwork, Integer, Hash)>
Adds the server to a private network.
-
#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.
-
#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.
-
#servers_server_id_public_networks_post(server_id, opts = {}) ⇒ ServerPublicNetwork
Adds the server to a Public Network.
-
#servers_server_id_public_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPublicNetwork, Integer, Hash)>
Adds the server to a Public Network.
-
#servers_server_id_tags_put(server_id, opts = {}) ⇒ Server
Overwrite tags assigned for Server.
-
#servers_server_id_tags_put_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Overwrite tags assigned for Server.
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_client ⇒ Object
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.
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. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. <b>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.</b>
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'] = 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, ) 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.
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.
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'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_post(opts = {}) ⇒ Server
Create new server. Create (request) new server for account. Server DNS will be configured to access Google’s public DNS at 8.8.8.8 .
157 158 159 160 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 157 def servers_post(opts = {}) data, _status_code, _headers = servers_post_with_http_info(opts) data end |
#servers_post_with_http_info(opts = {}) ⇒ Array<(Server, Integer, Hash)>
Create new server. Create (request) new server for account. Server DNS will be configured to access Google's public DNS at 8.8.8.8 .
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 168 def servers_post_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_post ...' end # resource path local_var_path = '/servers' # query parameters query_params = opts[:query_params] || {} query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_create']) # return_type return_type = opts[:debug_return_type] || 'Server' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_actions_deprovision_post(server_id, opts = {}) ⇒ String
Deprovision a server. Deprovision the server. Supports advanced deprovision configuration.
224 225 226 227 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 224 def servers_server_id_actions_deprovision_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_deprovision_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_deprovision_post_with_http_info(server_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Deprovision a server. Deprovision the server. Supports advanced deprovision configuration.
235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 235 def servers_server_id_actions_deprovision_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_deprovision_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_deprovision_post" end # resource path local_var_path = '/servers/{serverId}/actions/deprovision'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'relinquish_ip_block']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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.
293 294 295 296 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 293 def servers_server_id_actions_power_off_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_power_off_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_power_off_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Power off server. Power off specific server.
303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 303 def servers_server_id_actions_power_off_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_power_off_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_power_off_post" end # resource path local_var_path = '/servers/{serverId}/actions/power-off'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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.
356 357 358 359 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 356 def servers_server_id_actions_power_on_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_power_on_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_power_on_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Power on server. Power on specific server.
366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 366 def servers_server_id_actions_power_on_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_power_on_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_power_on_post" end # resource path local_var_path = '/servers/{serverId}/actions/power-on'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_actions_power_on_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_actions_reboot_post(server_id, opts = {}) ⇒ ActionResult
Reboot server. Reboot specific server.
419 420 421 422 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 419 def servers_server_id_actions_reboot_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_reboot_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Reboot server. Reboot specific server.
429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 429 def servers_server_id_actions_reboot_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reboot_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reboot_post" end # resource path local_var_path = '/servers/{serverId}/actions/reboot'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_actions_reboot_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_actions_reserve_post(server_id, opts = {}) ⇒ Server
Reserve server. Reserve specific server.
483 484 485 486 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 483 def servers_server_id_actions_reserve_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_reserve_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_reserve_post_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Reserve server. Reserve specific server.
494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 494 def servers_server_id_actions_reserve_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reserve_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reserve_post" end # resource path local_var_path = '/servers/{serverId}/actions/reserve'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_reserve']) # return_type return_type = opts[:debug_return_type] || 'Server' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_actions_reserve_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_actions_reset_post(server_id, opts = {}) ⇒ ResetResult
Reset server. Deprecated: Reset specific server. Reset only supports network configurations of type ‘private network’ or ‘IP blocks’. As an alternative, the suggested action is to deprovision the server and provision a new one with the same configuration.
553 554 555 556 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 553 def servers_server_id_actions_reset_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_reset_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_reset_post_with_http_info(server_id, opts = {}) ⇒ Array<(ResetResult, Integer, Hash)>
Reset server. Deprecated: Reset specific server. Reset only supports network configurations of type '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.
564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 564 def servers_server_id_actions_reset_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_reset_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_reset_post" end # resource path local_var_path = '/servers/{serverId}/actions/reset'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_reset']) # return_type return_type = opts[:debug_return_type] || 'ResetResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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.
622 623 624 625 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 622 def servers_server_id_actions_shutdown_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_actions_shutdown_post_with_http_info(server_id, opts) data end |
#servers_server_id_actions_shutdown_post_with_http_info(server_id, opts = {}) ⇒ Array<(ActionResult, Integer, Hash)>
Shutdown server. Shut down specific server.
632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 632 def servers_server_id_actions_shutdown_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_actions_shutdown_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_actions_shutdown_post" end # resource path local_var_path = '/servers/{serverId}/actions/shutdown'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'ActionResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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
685 686 687 688 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 685 def servers_server_id_delete(server_id, opts = {}) data, _status_code, _headers = servers_server_id_delete_with_http_info(server_id, opts) data end |
#servers_server_id_delete_with_http_info(server_id, opts = {}) ⇒ Array<(DeleteResult, Integer, Hash)>
Delete server. Deprovision specific server. Any IP blocks assigned to this server will also be relinquished and deleted. Deprecated: see /servers/serverId/actions/deprovision
695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 695 def servers_server_id_delete_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_delete ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_delete" end # resource path local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'DeleteResult' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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.
748 749 750 751 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 748 def servers_server_id_get(server_id, opts = {}) data, _status_code, _headers = servers_server_id_get_with_http_info(server_id, opts) data end |
#servers_server_id_get_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Get server. Get server properties.
758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 758 def servers_server_id_get_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_get ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_get" end # resource path local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Server' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts = {}) ⇒ String
Unassign IP Block from Server. Removes the IP block from the server. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. This is an advanced network action that can make your server completely unavailable over any network. Make sure this server is reachable over remote console for guaranteed access in case of misconfiguration.
813 814 815 816 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 813 def servers_server_id_ip_blocks_ip_block_id_delete(server_id, ip_block_id, opts = {}) data, _status_code, _headers = servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts) data end |
#servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts = {}) ⇒ Array<(String, Integer, Hash)>
Unassign IP Block from Server. Removes the IP block from the server. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. <b>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.</b>
825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 825 def servers_server_id_ip_blocks_ip_block_id_delete_with_http_info(server_id, ip_block_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_ip_blocks_ip_block_id_delete ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_ip_blocks_ip_block_id_delete" end # verify the required parameter 'ip_block_id' is set if @api_client.config.client_side_validation && ip_block_id.nil? fail ArgumentError, "Missing the required parameter 'ip_block_id' when calling ServersApi.servers_server_id_ip_blocks_ip_block_id_delete" end # resource path local_var_path = '/servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks/{ipBlockId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)).sub('{' + 'ipBlockId' + '}', CGI.escape(ip_block_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'relinquish_ip_block']) # return_type return_type = opts[:debug_return_type] || 'String' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_ip_blocks_ip_block_id_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_ip_blocks_post(server_id, opts = {}) ⇒ ServerIpBlock
Assign IP Block to Server. Adds an IP block to this server. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-server-with-public-ip-block#ftoc-heading-2’ target=‘_blank’>here</a>.
888 889 890 891 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 888 def servers_server_id_ip_blocks_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_ip_blocks_post_with_http_info(server_id, opts) data end |
#servers_server_id_ip_blocks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerIpBlock, Integer, Hash)>
Assign IP Block to Server. Adds an IP block to this server. <b>No actual configuration is performed on the operating system.</b> 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>.
899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 899 def servers_server_id_ip_blocks_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_ip_blocks_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_ip_blocks_post" end # resource path local_var_path = '/servers/{serverId}/network-configuration/ip-block-configurations/ip-blocks'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_ip_block']) # return_type return_type = opts[:debug_return_type] || 'ServerIpBlock' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_ip_blocks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_patch(server_id, opts = {}) ⇒ Server
Patch a Server. Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server’s settings. Local changes to the server’s hostname will not be reflected in the API or portal.
958 959 960 961 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 958 def servers_server_id_patch(server_id, opts = {}) data, _status_code, _headers = servers_server_id_patch_with_http_info(server_id, opts) data end |
#servers_server_id_patch_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Patch a Server. Any changes to the hostname or description using the BMC API will reflect solely in the BMC API and portal. The changes are intended to keep the BMC data up to date with your server. We do not have access to your server's settings. Local changes to the server's hostname will not be reflected in the API or portal.
969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 969 def servers_server_id_patch_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_patch ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_patch" end # resource path local_var_path = '/servers/{serverId}'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_patch']) # return_type return_type = opts[:debug_return_type] || 'Server' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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_post(server_id, opts = {}) ⇒ ServerPrivateNetwork
Adds the server to a private network. Adds the server to a private network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3’ target=‘_blank’>here</a>.
1029 1030 1031 1032 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1029 def servers_server_id_private_networks_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_private_networks_post_with_http_info(server_id, opts) data end |
#servers_server_id_private_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPrivateNetwork, Integer, Hash)>
Adds the server to a private network. Adds the server to a private network. <b>No actual configuration is performed on the operating system.</b> 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>.
1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1041 def servers_server_id_private_networks_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_private_networks_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_private_networks_post" end # resource path local_var_path = '/servers/{serverId}/network-configuration/private-network-configuration/private-networks'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_private_network']) # return_type return_type = opts[:debug_return_type] || 'ServerPrivateNetwork' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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.
1101 1102 1103 1104 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1101 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. <b>No actual configuration is performed on the operating system.</b> BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. <b>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.</b>
1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1112 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'] = 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, ) 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_post(server_id, opts = {}) ⇒ ServerPublicNetwork
Adds the server to a Public Network. Adds the server to a Public Network. No actual configuration is performed on the operating system. BMC configures exclusively the networking devices in the datacenter infrastructure. Manual network configuration changes in the operating system of this server are required. Knowledge base article to help you can be found <a href=‘phoenixnap.com/kb/configure-bmc-server-after-adding-to-network#ftoc-heading-3’ target=‘_blank’>here</a>.
1171 1172 1173 1174 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1171 def servers_server_id_public_networks_post(server_id, opts = {}) data, _status_code, _headers = servers_server_id_public_networks_post_with_http_info(server_id, opts) data end |
#servers_server_id_public_networks_post_with_http_info(server_id, opts = {}) ⇒ Array<(ServerPublicNetwork, Integer, Hash)>
Adds the server to a Public Network. Adds the server to a Public Network. <b>No actual configuration is performed on the operating system.</b> 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>.
1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1183 def servers_server_id_public_networks_post_with_http_info(server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_public_networks_post ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_public_networks_post" end # resource path local_var_path = '/servers/{serverId}/network-configuration/public-network-configuration/public-networks'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'force'] = opts[:'force'] if !opts[:'force'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'server_public_network']) # return_type return_type = opts[:debug_return_type] || 'ServerPublicNetwork' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: ServersApi#servers_server_id_public_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#servers_server_id_tags_put(server_id, opts = {}) ⇒ Server
Overwrite tags assigned for Server. Overwrites tags assigned for Server and unassigns any tags not part of the request.
1243 1244 1245 1246 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1243 def (server_id, opts = {}) data, _status_code, _headers = (server_id, opts) data end |
#servers_server_id_tags_put_with_http_info(server_id, opts = {}) ⇒ Array<(Server, Integer, Hash)>
Overwrite tags assigned for Server. Overwrites tags assigned for Server and unassigns any tags not part of the request.
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 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 |
# File 'lib/pnap_bmc_api/api/servers_api.rb', line 1254 def (server_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServersApi.servers_server_id_tags_put ...' end # verify the required parameter 'server_id' is set if @api_client.config.client_side_validation && server_id.nil? fail ArgumentError, "Missing the required parameter 'server_id' when calling ServersApi.servers_server_id_tags_put" end # resource path local_var_path = '/servers/{serverId}/tags'.sub('{' + 'serverId' + '}', CGI.escape(server_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'tag_assignment_request']) # return_type return_type = opts[:debug_return_type] || 'Server' # auth_names auth_names = opts[:debug_auth_names] || ['OAuth2'] = 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, ) 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 |