-
Notifications
You must be signed in to change notification settings - Fork 897
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
Adding options_description class method to base_manager #15799
Adding options_description class method to base_manager #15799
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
straightforward.
So, from looking at the PRs provider_settings
will return a description what to expect in options
?
Is provider_settings
already used somewhere? If not, I'd rather call it options_description
to make it a) more related to the options
field and b) express that it only contains a description.
It would be also great to see an example in either a spec or a method comment or the git commit msg
I only used it in ManageIQ/manageiq-providers-kubernetes#45, and ManageIQ/manageiq-api#3. I can change it in both places. |
Oh, so there are already If thats only used in the kubernetes provider currently, I'd really rename that now before it spreads to other providers. For the ansible tower credentials we've put the description into constants here @jameswnl wdyt on naming those methods? |
16ee22d
to
8a33241
Compare
options_description
class method to base_manager
options_description
class method to base_manager
@durandom I made this change in all the places that used this function. |
How about using same convention as the ansible options? as @durandom pointed out? https://github.com/ManageIQ/manageiq-providers-ansible_tower/blob/479dd815e1969044f20082adb21fbda84da1253d/app/models/manageiq/providers/ansible_tower/shared/automation_manager/network_credential.rb |
ok, so what do you think of streamlining this via a roping in @imtayadeway as well |
@durandom If you were asking me then I think |
ping @durandom @imtayadeway @jameswnl do we have a decision? Do we want it in a constant or a function? |
@enoodle a function seems fine to me. |
Then we can merge this and ManageIQ/manageiq-providers-kubernetes#91 to proceed with ManageIQ/manageiq-api#3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you'll want to remove the yarn.lock
file.
Also, either in a comment above the method I would shortly point out what it's used for. I know that we dont do this a lot, but it's never too late to start.
At least for those base methods in base managers which are supposed to be overwritten
8a33241
to
b7aa783
Compare
@durandom PTAL |
Checked commit enoodle@b7aa783 with ruby 2.2.6, rubocop 0.47.1, and haml-lint 0.20.0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a metadata function that should return the description of the data that is stored in the
options
field (added in ManageIQ/manageiq-schema#23)requested here: ManageIQ/manageiq-api#3 (comment)