Make channels handling code more generic #1052
Labels
enhancement
New feature or request
priority: medium
Medium Priority issue (must have for current release)
What is the expected feature or enhancement?
Today we have two channels -
ibm_quantum
andibm_cloud
. The URLs are hard coded, and there is channel specific logic in various places.Since there are plans to onboard additional channels, we should make channel account management more generic. That is, to have a configuration file that lists the channels, their default urls, and any channel strategies they support.
It is unlikely the code can be completely channel agnostic, but we can try to isolate such code to separate classes/methods. If there are actions that can be done on the server side, we can also bring that back to them.
Acceptance criteria
Ideally, when adding a new channel, all one has to do it to update the config file.
Suggested fix
Instead of hard coding the channels, we should have a config file that lists what channels are support. For example, in a format of:
Then a new channel can just update this file with a new section.
create_account
can return aGenericAccount
(or use the baseAccount
since it's not actually declared as an abstract class despite the comment).The text was updated successfully, but these errors were encountered: