Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Pluggable credential types #22995
Pluggable credential types #22995
Changes from all commits
e036c57
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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'm wondering if we even need this method. It acts as a key into a hash that's presented over the API, but
a) maybe we don't need the key at all
b) if we do need some sort of key, just use the class name
c) if we do need the key and it can't be the class name, then just derive the key with something like
"#{klass.name.gsub("::", "_").underscore}_credential_types
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.
Note I'm fine merging as is, because it keeps the interface identical to how it was previously, but makes it pluggable, which is progress.
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 https://github.com/ManageIQ/manageiq/pull/22995/files#r1567779476 answers this, we need it for now because of how the UI splits external / internal automation controllers up ignoring the actual EMS object and assuming there is only one of the internal types.
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.
NOTE I think once we get away from separate "embedded_workflows" and "embedded_ansible" controllers we can drop these "groups" of credential types, because you would just call OPTIONS and pass in a type like we do with ext_management_systems. So you would as for the credential types for the Workflows AutomationManager or the EmbeddedAnsible AutomationManager.
But for now this keeps compatibility without having to hard code all of the types 👍
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 don't thin OPTIONS supports the collection_class, but it could.
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.
@Fryguy we pass in
type=class_name
toOPTIONS
, that is how we get DDF params for a particular EMS once you've selected it in the dropdownThere 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.
oh interesting - we probably should be passing in collection_class. The type filtering doesn't work with the "middle" classes, whereas collection_class does.
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.
Sorry, clarification - type is fine for the purpose listed which is an EMS is selected and then we filter on that EMS. collection_class would be for other purposes.