Closed riconem closed 5 years ago
@riconem - I can see the OneView API version used here is 1000. Please note we are not currently supporting API 1000.
But I am not sure why you are not hitting this exception instead you are getting 400 BadRequest which is weird. Can you try to run your code against API800/600.
@soodpr Sorry you are right API 1000 is not supported now. I have tested it on API 300/600 and 800.
@riconem - Then clearly you are missing some attributes here. Can you please check if you are adding all required attributes as per OneView REST API 300/600 and 800 spec.
Thank you! I saw my mistake right now. I missed some value. Now its working fine!
logicalDrives=[{"name": "Operating System", raidLevel: "RAID1", "bootable": true, "numPhysicalDrives": 2, "driveTechnology": "SasHdd"}]
localStorage={"controllers": [{"deviceSlot": "Embedded", "mode":"RAID", "initialize": true, "logicalDrives": logicalDrives}]}
Scenario/Intent
I was trying to create a new server profile template with the following data: Local Storage->Integrated storage controller: Mode=RAID Add Logical Drive: Name=OS, RAID level=RAID1, Drive technology=SAS HDD, Boot=Checked
Environment Details
Steps to Reproduce
Create a new server profile template with these attributes:
bootMode={manageMode: true, mode: "BIOS"}
logicalDrives=[{bootable: true, name: "Operating System", numPhysicalDrives: 2, raidLevel: "RAID1"}]
localStorage={controllers: [{deviceSlot: "Embedded", logicalDrives: logicalDrives, mode: "RAID"}]}
server_profile_template_name = 'OneViewSDK Test ServerProfileTemplate'
item = OneviewSDK::Synergy::ServerProfileTemplate.new( @client, {name: server_profile_template_name, bootMode: bootMode, localStorage: localStorage})
Expected Result
Creates a server profile template
Actual Result
/opt/oneview/hewlettPackard/oneview-sdk-ruby/lib/oneview-sdk/exceptions.rb:28:in'
raise!': 400 BAD REQUEST {"errorCode":"UNEXPECTED_EXCEPTION","message":"An unexpected error occurred.","details":"An unexpected and unhandled runtime exception occurred.","recommendedActions":["Please contact your authorized support representative and provide them with a support dump."],"errorSource":null,"nestedErrors":[],"data":{}} (OneviewSDK::BadRequest) from /opt/oneview/hewlettPackard/oneview-sdk-ruby/lib/oneview-sdk/rest.rb:230:in
response_handler' from /opt/oneview/hewlettPackard/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:176:increate' from server_profile_template_2.rb:30:in