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

Overridden methods without receiving header parameter #294

Closed
tmiotto opened this issue Oct 25, 2017 · 1 comment
Closed

Overridden methods without receiving header parameter #294

tmiotto opened this issue Oct 25, 2017 · 1 comment

Comments

@tmiotto
Copy link
Contributor

tmiotto commented Oct 25, 2017

Scenario/Intent

I'm trying to delete a API300::C7000::Scope passing a header as a parameter, but I can't and the default code fails (Resource#create!).

Environment Details

  • OneView SDK Version: 5.2.0
  • OneView Client API Version: API300

Steps to Reproduce

Run API300::C7000::Scope#create!

Expected Result

The scope should be deleted and created successfully

Actual Result

It fails saying the delete won't receive any arguments (the header)

Root cause

API300::C7000::Scope is overriding the delete without parameters, so it is causing it to fail.

@ricardogpsf
Copy link
Member

ricardogpsf commented Oct 25, 2017

The default code create! do 3 calls, it calls the retrieve!, delete and create methods. So, any resource that overwrite that methods without the argument "header", the default implementation of create! will fail. Below we can see all resources that have overwrote at least one of the retrieve!, delete or create methods and which will fail when call the create! method.

We can mark the checkbox if some one that resources is ok after some change.

  • storage_system
    • #retrieve!method
  • storage_pool
    • #retrieve!method
      Note: The create method to storage_pool is unavailable, so we should call the add method. We have to decide if we will mark the create! method as unavailable or add the add! method working as default create! method.
  • server_hardware
    • #retrieve!method
  • user
    • #createmethod
  • logical_switch
    • #createmethod
  • logical_interconnect_group
    • #createmethod
  • logical_interconnect
    • #createmethod
    • #deletemethod
      Note: maybe in this case, the good way is overwriting the #create! method
  • volume
    • #retrieve!method
    • #createmethod
    • #deletemethod
  • volume_template
    • #deletemethod
  • scope
    • #deletemethod

@aalexmonteiro aalexmonteiro changed the title Scopes API300 C7000 are overriding "delete" method without receiving header parameter Overridden methods without receiving header parameter Oct 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants