-
Notifications
You must be signed in to change notification settings - Fork 898
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
API driven, pluggable, provider creation and validation #18818
Comments
Ping @dmetzger57 , @abellotti , @agrare . Guys, this is an API feature request that is past what the UI team members so far did on the API. We need someone from the API team to implement this. Or at least provide some instructions on how this is to be done in the API so that it will get merged. Can we get such help, please? |
As this is an API request, I look to @gtanzillo and @abellotti to assess when (I didn't say "if" 😄 ) we can help |
I kinda started working on the API support but ran into the obstacles I've described above. I would be able to implement this thing in the API with some copy-paste engineering from the UI, but I don't think anyone would merge such 🍝 My idea was to utilize the |
Yeah I never liked that this used |
Related to ManageIQ/manageiq-api#585 ? |
I personally think this is extremely important for a solid API experience and greater pluggability on the UI side. |
|
👍 Yeah agreed |
Oh really? Usually all the |
Amazon introduced the "service" name, and at the time, if I recall, we added an |
Haha okay, well here is what we've got to work with:
So some of them take just an options hash but the vast majority take whatever they need for that provider |
@agrare Ok, let's design a consistent interface at the model level somehow and then we can expose that via the |
bump |
@agrare Assigning to you just for tracking...we still need to design this. |
@Fryguy and I discussed this and we are thinking something like this: At the provider class level each provider would define their "parameters_for_create" in a JSON-schema format so taking Amazon as an example: ManageIQ::Providers::Amazon::CloudManager.params_for_create Then We would add a (names just an example, I'm terrible at naming) This will return a task which can be tracked for success/failure. I'm thinking that the format for |
@agrare this is perfect, cc @Hyperkid123 |
Since we plan to use data driven forms for the component i would be great to use the DDF format for the authentication partials. |
@Hyperkid123 sounds good to me! I was planning on using the parameters from sources-api for amazon as a starting point ref |
Updated the description with a list of TODO items to complete this. |
I'll start working on the |
@agrare @Fryguy there's an issue with network manager providers as they're implicitly tied to a |
Kudos and big thank you to @skateman @himdel @agrare @martinpovolny @Hyperkid123 @Fryguy and anybody else involved in getting this epic across the finish line! |
The API doesn't provide any kind of credential validation when adding provider, while the UI implements this feature. Therefore, it is possible to add a provider with invalid credentials through the API and we have no endpoint even to check if these credentials are correct.
There's a method included in each provider to create a
MiqTask
that checks the credentials, however, the input arguments for this task are different for each provider. On the UI side this difference is compensated via 🚒 🍝 🔥 if-else structures testing which provider is currently used.This goes totally in the opposite direction to our philosophy of having pluggable providers. Ideally we don't want anything in the UI that sends data to the backend based on the provider's type.
We're working with @Hyperkid123 on the API-driven provider forms and this is kinda blocking us.
ping @martinpovolny @Ladas @agrare
TODO:
Expose DDF schema for a provider when asking using OPTIONS + type manageiq-api#645)
.raw_connect
) (@agrare Add a verify_credentials_task method #19346)ChangeWe decided to name the new method verify_credentials_task and deprecate validate_credentials_task, given the methods on the provider are called.verify_credentials_task
to.raw_connect_task
so that we can add the newvalidate_credentials_task
before the UI is updated without breaking anythingverify_credentials
The text was updated successfully, but these errors were encountered: