Method: OneviewSDK::API300::C7000::Scope#update

Defined in:
lib/oneview-sdk/resource/api300/c7000/scope.rb

#update(attributes = {}) ⇒ Resource

Set data and save to OneView

Parameters:

  • attributes (Hash) (defaults to: {})

    The attributes to add/change for this resource (key-value pairs)

Returns:

Raises:



37
38
39
40
41
42
43
44
45
46
47
# File 'lib/oneview-sdk/resource/api300/c7000/scope.rb', line 37

def update(attributes = {})
  set_all(attributes)
  ensure_client && ensure_uri
  options = {
    'If-Match' => @data.delete('eTag'),
    'body' => @data
  }
  response = @client.rest_put(@data['uri'], options, @api_version)
  @client.response_handler(response)
  self
end