Class: IbmCloudPower::PCloudPVMInstancesApi
- Inherits:
-
Object
- Object
- IbmCloudPower::PCloudPVMInstancesApi
- Defined in:
- lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ PCloudPVMInstancesApi
constructor
A new instance of PCloudPVMInstancesApi.
-
#pcloud_pvminstances_action_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance.
-
#pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance.
-
#pcloud_pvminstances_capture_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Capture a PVM instance and create a deployable image.
-
#pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Capture a PVM instance and create a deployable image.
-
#pcloud_pvminstances_console_post(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstanceConsole
Generate the noVNC console URL.
-
#pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstanceConsole, Integer, Hash)>
Generate the noVNC console URL.
-
#pcloud_pvminstances_delete(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Object
Delete a PCloud PVM instance.
-
#pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a PCloud PVM instance.
-
#pcloud_pvminstances_get(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstance
Get a PVM instance’s current state or information.
-
#pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstance, Integer, Hash)>
Get a PVM instance's current state or information.
-
#pcloud_pvminstances_getall(cloud_instance_id, opts = {}) ⇒ PVMInstances
Get all the PVM instances for this cloud instance.
-
#pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(PVMInstances, Integer, Hash)>
Get all the PVM instances for this cloud instance.
-
#pcloud_pvminstances_networks_delete(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Object
Remove all addresses of network from a PVM instance.
-
#pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Remove all addresses of network from a PVM instance.
-
#pcloud_pvminstances_networks_get(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ PVMInstanceNetworks
Get a PVM instance’s network information.
-
#pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Array<(PVMInstanceNetworks, Integer, Hash)>
Get a PVM instance's network information.
-
#pcloud_pvminstances_networks_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstanceNetworks
Get all networks for this PVM instance.
-
#pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstanceNetworks, Integer, Hash)>
Get all networks for this PVM instance.
-
#pcloud_pvminstances_networks_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ PVMInstanceNetwork
Perform network addition, deletion, and listing.
-
#pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(PVMInstanceNetwork, Integer, Hash)>
Perform network addition, deletion, and listing.
-
#pcloud_pvminstances_operations_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Perform an operation on a PVMInstance.
-
#pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform an operation on a PVMInstance.
-
#pcloud_pvminstances_post(cloud_instance_id, body, opts = {}) ⇒ Array<PVMInstance>
Create a new PVM instance The order of network IDs passed in will be the order of interfaces defined to the VM.
-
#pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Array<PVMInstance>, Integer, Hash)>
Create a new PVM instance The order of network IDs passed in will be the order of interfaces defined to the VM.
-
#pcloud_pvminstances_put(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ PVMInstanceUpdateResponse
Update a PCloud PVM instance.
-
#pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(PVMInstanceUpdateResponse, Integer, Hash)>
Update a PCloud PVM instance.
-
#pcloud_pvminstances_snapshots_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Snapshots
Get all snapshots for this PVM instance.
-
#pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Snapshots, Integer, Hash)>
Get all snapshots for this PVM instance.
-
#pcloud_pvminstances_snapshots_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ SnapshotCreateResponse
Create a PVM instance snapshot.
-
#pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(SnapshotCreateResponse, Integer, Hash)>
Create a PVM instance snapshot.
-
#pcloud_pvminstances_snapshots_restore_post(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) ⇒ nil
Restore a PVM Instance snapshot To roll back the clone operation, append ‘?restore_fail_action=rollback’ to the cURL URL.
-
#pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Restore a PVM Instance snapshot To roll back the clone operation, append '?restore_fail_action=rollback' to the cURL URL.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ PCloudPVMInstancesApi
19 20 21 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_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/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#pcloud_pvminstances_action_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance
28 29 30 31 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 28 def pcloud_pvminstances_action_post(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform an action (start stop reboot immediate-shutdown reset) on a PVMInstance
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 90 91 92 93 94 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 39 def pcloud_pvminstances_action_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_action_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_action_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/action'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_action_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_capture_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Capture a PVM instance and create a deployable image
102 103 104 105 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 102 def pcloud_pvminstances_capture_post(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Capture a PVM instance and create a deployable image
113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 113 def pcloud_pvminstances_capture_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_capture_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_capture_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/capture'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_capture_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_console_post(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstanceConsole
Generate the noVNC console URL
175 176 177 178 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 175 def pcloud_pvminstances_console_post(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstanceConsole, Integer, Hash)>
Generate the noVNC console URL
185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 185 def pcloud_pvminstances_console_post_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_console_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_console_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_console_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/console'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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[:body] # return_type return_type = opts[:return_type] || 'PVMInstanceConsole' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_console_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_delete(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Object
Delete a PCloud PVM instance
241 242 243 244 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 241 def pcloud_pvminstances_delete(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Delete a PCloud PVM instance
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 251 def pcloud_pvminstances_delete_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_delete" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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(['*/*']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_get(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstance
Get a PVM instance’s current state or information
307 308 309 310 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 307 def pcloud_pvminstances_get(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstance, Integer, Hash)>
Get a PVM instance's current state or information
317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 317 def pcloud_pvminstances_get_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_get" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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[:body] # return_type return_type = opts[:return_type] || 'PVMInstance' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_getall(cloud_instance_id, opts = {}) ⇒ PVMInstances
Get all the PVM instances for this cloud instance
372 373 374 375 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 372 def pcloud_pvminstances_getall(cloud_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts) data end |
#pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts = {}) ⇒ Array<(PVMInstances, Integer, Hash)>
Get all the PVM instances for this cloud instance
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 381 def pcloud_pvminstances_getall_with_http_info(cloud_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_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[:body] # return_type return_type = opts[:return_type] || 'PVMInstances' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_networks_delete(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Object
Remove all addresses of network from a PVM instance
435 436 437 438 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 435 def pcloud_pvminstances_networks_delete(cloud_instance_id, pvm_instance_id, network_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts) data end |
#pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Remove all addresses of network from a PVM instance
447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 447 def pcloud_pvminstances_networks_delete_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete" end # verify the required parameter 'network_id' is set if @api_client.config.client_side_validation && network_id.nil? fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_delete" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(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']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(opts[:'body']) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_networks_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_networks_get(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ PVMInstanceNetworks
Get a PVM instance’s network information
510 511 512 513 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 510 def pcloud_pvminstances_networks_get(cloud_instance_id, pvm_instance_id, network_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts) data end |
#pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) ⇒ Array<(PVMInstanceNetworks, Integer, Hash)>
Get a PVM instance's network information
521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 521 def pcloud_pvminstances_networks_get_with_http_info(cloud_instance_id, pvm_instance_id, network_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_get ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get" end # verify the required parameter 'network_id' is set if @api_client.config.client_side_validation && network_id.nil? fail ArgumentError, "Missing the required parameter 'network_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_get" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks/{network_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'network_id' + '}', CGI.escape(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[:body] # return_type return_type = opts[:return_type] || 'PVMInstanceNetworks' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_networks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_networks_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ PVMInstanceNetworks
Get all networks for this PVM instance
581 582 583 584 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 581 def pcloud_pvminstances_networks_getall(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(PVMInstanceNetworks, Integer, Hash)>
Get all networks for this PVM instance
591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 591 def pcloud_pvminstances_networks_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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[:body] # return_type return_type = opts[:return_type] || 'PVMInstanceNetworks' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_networks_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_networks_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ PVMInstanceNetwork
Perform network addition, deletion, and listing
648 649 650 651 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 648 def pcloud_pvminstances_networks_post(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(PVMInstanceNetwork, Integer, Hash)>
Perform network addition, deletion, and listing
659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 659 def pcloud_pvminstances_networks_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_networks_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_networks_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/networks'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'PVMInstanceNetwork' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_networks_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_operations_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Object
Perform an operation on a PVMInstance
722 723 724 725 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 722 def pcloud_pvminstances_operations_post(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(Object, Integer, Hash)>
Perform an operation on a PVMInstance
733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 733 def pcloud_pvminstances_operations_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_operations_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_operations_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/operations'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Object' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_operations_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_post(cloud_instance_id, body, opts = {}) ⇒ Array<PVMInstance>
Create a new PVM instance The order of network IDs passed in will be the order of interfaces defined to the VM.
797 798 799 800 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 797 def pcloud_pvminstances_post(cloud_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts) data end |
#pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts = {}) ⇒ Array<(Array<PVMInstance>, Integer, Hash)>
Create a new PVM instance The order of network IDs passed in will be the order of interfaces defined to the VM.
809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 809 def pcloud_pvminstances_post_with_http_info(cloud_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'skipHostValidation'] = opts[:'skip_host_validation'] if !opts[:'skip_host_validation'].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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'Array<PVMInstance>' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_put(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ PVMInstanceUpdateResponse
Update a PCloud PVM instance
869 870 871 872 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 869 def pcloud_pvminstances_put(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(PVMInstanceUpdateResponse, Integer, Hash)>
Update a PCloud PVM instance
880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 880 def pcloud_pvminstances_put_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_put ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_put" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'PVMInstanceUpdateResponse' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_put\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_snapshots_getall(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Snapshots
Get all snapshots for this PVM instance
942 943 944 945 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 942 def pcloud_pvminstances_snapshots_getall(cloud_instance_id, pvm_instance_id, opts = {}) data, _status_code, _headers = pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts) data end |
#pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) ⇒ Array<(Snapshots, Integer, Hash)>
Get all snapshots for this PVM instance
952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 952 def pcloud_pvminstances_snapshots_getall_with_http_info(cloud_instance_id, pvm_instance_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_getall" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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[:body] # return_type return_type = opts[:return_type] || 'Snapshots' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_getall\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_snapshots_post(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ SnapshotCreateResponse
Create a PVM instance snapshot
1009 1010 1011 1012 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 1009 def pcloud_pvminstances_snapshots_post(cloud_instance_id, pvm_instance_id, body, opts = {}) data, _status_code, _headers = pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts) data end |
#pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) ⇒ Array<(SnapshotCreateResponse, Integer, Hash)>
Create a PVM instance snapshot
1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 1020 def pcloud_pvminstances_snapshots_post_with_http_info(cloud_instance_id, pvm_instance_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_post" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] || 'SnapshotCreateResponse' # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#pcloud_pvminstances_snapshots_restore_post(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) ⇒ nil
Restore a PVM Instance snapshot To roll back the clone operation, append ‘?restore_fail_action=rollback’ to the cURL URL. If you’d like to try the clone operation again, append ‘?restore_fail_action=retry’ to the cURL URL.
1086 1087 1088 1089 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 1086 def pcloud_pvminstances_snapshots_restore_post(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts) nil end |
#pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Restore a PVM Instance snapshot To roll back the clone operation, append '?restore_fail_action=rollback' to the cURL URL. If you'd like to try the clone operation again, append '?restore_fail_action=retry' to the cURL URL.
1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 |
# File 'lib/ibm_cloud_power/api/p_cloud_pvm_instances_api.rb', line 1100 def pcloud_pvminstances_snapshots_restore_post_with_http_info(cloud_instance_id, pvm_instance_id, snapshot_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post ...' end # verify the required parameter 'cloud_instance_id' is set if @api_client.config.client_side_validation && cloud_instance_id.nil? fail ArgumentError, "Missing the required parameter 'cloud_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post" end # verify the required parameter 'pvm_instance_id' is set if @api_client.config.client_side_validation && pvm_instance_id.nil? fail ArgumentError, "Missing the required parameter 'pvm_instance_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post" end # verify the required parameter 'snapshot_id' is set if @api_client.config.client_side_validation && snapshot_id.nil? fail ArgumentError, "Missing the required parameter 'snapshot_id' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling PCloudPVMInstancesApi.pcloud_pvminstances_snapshots_restore_post" end allowable_values = ["retry", "rollback"] if @api_client.config.client_side_validation && opts[:'restore_fail_action'] && !allowable_values.include?(opts[:'restore_fail_action']) fail ArgumentError, "invalid value for \"restore_fail_action\", must be one of #{allowable_values}" end # resource path local_var_path = '/pcloud/v1/cloud-instances/{cloud_instance_id}/pvm-instances/{pvm_instance_id}/snapshots/{snapshot_id}/restore'.sub('{' + 'cloud_instance_id' + '}', CGI.escape(cloud_instance_id.to_s)).sub('{' + 'pvm_instance_id' + '}', CGI.escape(pvm_instance_id.to_s)).sub('{' + 'snapshot_id' + '}', CGI.escape(snapshot_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'restore_fail_action'] = opts[:'restore_fail_action'] if !opts[:'restore_fail_action'].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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) # return_type return_type = opts[:return_type] # auth_names auth_names = opts[:auth_names] || [] = opts.merge( :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: PCloudPVMInstancesApi#pcloud_pvminstances_snapshots_restore_post\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |