module OneviewSDK::ResourceHelper::PatchOperation

Contains helper method to call patch endpoint of resource

Public Instance Methods

patch(operation, path, value = nil, header_options = {}) click to toggle source

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. @param [String] operation The operation to be performed @param [String] path The path of operation @param [String] value The value @note This attribute is subject to incompatible changes in future release versions, including redefinition or removal.

# File lib/oneview-sdk/resource_helper.rb, line 24
def patch(operation, path, value = nil, header_options = {})
  ensure_client && ensure_uri
  options = { 'body' => [op: operation, path: path, value: value] }
  options = options.merge(header_options)
  response = @client.rest_patch(@data['uri'], options, @api_version)
  @client.response_handler(response)
end