HewlettPackard / oneview-chef

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 Terraform and Ansible Collection
https://supermarket.chef.io/cookbooks/oneview
Apache License 2.0
17 stars 15 forks source link

Create Mixins for the resource providers common methods #180

Closed tmiotto closed 3 years ago

tmiotto commented 7 years ago

Scenario/Intent

i'm seeing a lot of code that is common between one or more resources, but it won't make sense to use inheritance to avoid the code duplication, nor putting these methods in the main resource provider.

So I guess we could improve the code with Mixins implementing these common methods. having tests for them will also avoid implementing contless tests for the same feature.

Environment Details

Actions to reuse:

jsmartt commented 7 years ago

Are there any specific methods or resource providers you would like to attach to this issue @tmiotto ?

tmiotto commented 7 years ago

Yes @jsmartt ,

There are #reset, #set_power_state, #set_uid_light, #set_refresh_state, #reapply_configuration, #update_from_group, that repeat all over the resources.

I will categorize them and list what kind of Mixins we should add to the cookbook.

:thought_balloon: : This actually may also apply to HewlettPackard/oneview-sdk-ruby

yuvirani commented 3 years ago

This SDK has limited support and will not be actively developed for the foreseeable future.