HewlettPackard / oneview-sdk-ruby

This project is no longer being developed and has limited support. In the near future this repository will be fully deprecated. Please consider using other OneView projects, such as Golang and Python.
Apache License 2.0
12 stars 16 forks source link

Add_rack_resource method returns NOMATCHING_ETAG_MESSAGE #226

Closed fgbulsoni closed 6 years ago

fgbulsoni commented 7 years ago

Scenario/Intent

Run the OneviewSDK::Rack's method add_rack_resource to add a new resource to the rack.

Environment Details

Steps to Reproduce

I've used the example and added the add_rack_resource method expecting it to work, but got issues. Follows the updated example:

item = OneviewSDK::API300::C7000::Rack.new(@client, options)
item.add
puts "Rack #{item['name']} was added with uri='#{item['uri']}'"

enc = OneviewSDK::API300::C7000::Enclosure.find_by(@client, {}).first
item.add_rack_resource(enc)
item.update #fails at this point with the NOMATCHING_ETAG_MESSAGE message
puts "Rack #{item['name']} was updated with new enclosure '#{enc['name']}'" ## We don't really get here

Expected Result

The enclosure would've been added to the rack

Actual Result

NOMATCHING_ETAG_MESSAGE raised

fgbulsoni commented 7 years ago

Adding info: Tried the same with an unmanaged device and had no issues. This might be specific to handling enclosures.