Closed tmiotto closed 3 years ago
Are there any specific methods or resource providers you would like to attach to this issue @tmiotto ?
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
This SDK has limited support and will not be actively developed for the foreseeable future.
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:
#reset
#set_power_state
#set_uid_light
#set_refresh_state
#reapply_configuration
#update_from_group