Module: OneviewSDK::ResourceHelper
- Defined in:
- lib/oneview-sdk/resource_helper.rb
Overview
Contains helper methods to include certain functionalities on resources
Instance Method Summary collapse
-
#patch(operation, path, value = nil, header_options = {}) ⇒ Object
Performs a specific patch operation for the given resource.
Instance Method Details
#patch(operation, path, value = nil, header_options = {}) ⇒ Object
Note:
This attribute is subject to incompatible changes in future release versions, including redefinition or removal.
Performs a specific patch operation for the given resource. If the resource supports the particular operation, the operation is performed and a response is returned to the caller with the results.
22 23 24 25 26 27 28 |
# File 'lib/oneview-sdk/resource_helper.rb', line 22 def patch(operation, path, value = nil, = {}) ensure_client && ensure_uri = { 'body' => [op: operation, path: path, value: value] } = .merge() response = @client.rest_patch(@data['uri'], , @api_version) @client.response_handler(response) end |