Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error listing the OS Deployment Plans from OneView #222

Closed
marikrg opened this issue Mar 29, 2017 · 3 comments
Closed

Error listing the OS Deployment Plans from OneView #222

marikrg opened this issue Mar 29, 2017 · 3 comments
Assignees

Comments

@marikrg
Copy link

marikrg commented Mar 29, 2017

Scenario/Intent

Error listing the OS Deployment Plans.

For some versions of OneView, the request must be GET '/rest/os-deployment-plans/' (with the slash in the end) instead of GET '/rest/os-deployment-plans'

Environment Details

  • OneView SDK Version: current master
  • OneView Appliance Version: 3.0 Synergy variant
  • OneView Client API Version: 300
  • Ruby Version: Any
  • Platform: Any

Steps to Reproduce

Run the example to list all OS Deployment Plans, against the appliance we are using for testing

Expected Result

List all available OS Deployment Plans

Actual Result

D, [2017-03-29T15:06:54.280982 #25450] DEBUG -- : Making :get rest call to https://ipaddr/rest/os-deployment-plans
D, [2017-03-29T15:06:54.281113 #25450] DEBUG -- :   Options: {"X-API-Version"=>"300", "auth"=>"token", "Content-Type"=>"application/json"}
D, [2017-03-29T15:06:55.993928 #25450] DEBUG -- :   Response: Code=405. Headers={"date"=>["Wed, 29 Mar 2017 17:33:22 GMT"], "server"=>["Apache"], "allow"=>["DELETE, POST, PUT"], "content-language"=>["en-US"], "content-type"=>["application/json;charset=UTF-8"], "pragma"=>["no-cache"], "cache-control"=>["no-cache"], "expires"=>["Thu, 01 Jan 1970 00:00:00 GMT"], "connection"=>["close"], "transfer-encoding"=>["chunked"]}
  Body={"nestedErrors":[],"details":"The request method GET is not supported or not applicable for the requested resource.","errorSource":null,"recommendedActions":["Allowed methods include DELETE. Refer to the API specification to determine the supported HTTP request methods for the resource type."],"errorCode":"HTTP_METHOD_NOT_ALLOWED","data":{},"message":"The request method is not supported or not applicable for this type of resource."}
/home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/exceptions.rb:28:in `raise!': 405 {"nestedErrors":[],"details":"The request method GET is not supported or not applicable for the requested resource.","errorSource":null,"recommendedActions":["Allowed methods include DELETE. Refer to the API specification to determine the supported HTTP request methods for the resource type."],"errorCode":"HTTP_METHOD_NOT_ALLOWED","data":{},"message":"The request method is not supported or not applicable for this type of resource."} (OneviewSDK::RequestError)
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/rest.rb:231:in `response_handler'
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:282:in `block in find_with_pagination'
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:280:in `loop'
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:280:in `find_with_pagination'
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:265:in `find_by'
	from /home/marikrg/dev/oneview-sdk-ruby/lib/oneview-sdk/resource.rb:295:in `get_all'
	from api300/synergy/os_deployment_plan.rb:17:in `<main>'
@aalexmonteiro
Copy link
Contributor

@marikrg , what appliance are you using(3.00 or 3.10)? This error means that this method is not available by OV and this could be a possible bug on Oneview.

@fgbulsoni
Copy link
Contributor

fgbulsoni commented Mar 29, 2017

It was a 300 appliance. I've tried against two different 300 appliances and that error comes up on both.
That comes when you use '/rest/os-deployment-plans' while '/rest/os-deployment-plans/' returns the list of resources as expected.
P.S. the documentation actually shows /rest/os-deployment-plans/ as the correct URL btw.

@aalexmonteiro
Copy link
Contributor

Ok @fgbulsoni , I understood. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants