Method: OneviewSDK::API500::Synergy::Enclosure#patch

Defined in:
lib/oneview-sdk/resource/api500/synergy/enclosure.rb

#patch(operation, path, value = nil) ⇒ Hash

Note:

The scopeUris attribute is subject to incompatible changes in future release versions.

Performs a specific patch operation.

Parameters:

  • operation (String)

    The operation to be performed

  • path (String)

    The path of operation

  • value (String) (defaults to: nil)

    The value

Returns:

  • (Hash)

    hash with response



47
48
49
50
51
52
53
# File 'lib/oneview-sdk/resource/api500/synergy/enclosure.rb', line 47

def patch(operation, path, value = nil)
  ensure_client && ensure_uri
  body = [{ 'op' => operation, 'path' => path, 'value' => value }]
  patch_options = { 'If-Match' => @data['eTag'] }
  response = @client.rest_patch(@data['uri'], patch_options.merge('body' => body), @api_version)
  @client.response_handler(response)
end