Deal with drivers priority
This is the first attempt of dealing with drivers priority. The counter part commit, on osinfo-db, can be found here: osinfo-db!44 (merged)
This API is horrible as mgmt apps would have to:
- Get the list of prioritized drivers;
- Get the priority of the first driver;
- Loop in the drivers while their priority is the same as the priority of the first drivers;
However, I don't see a better way deal with this right now if we want to deal with fallback drivers.
@berrange, @crobinso, @felipeborges, do you guys have some ideas?
One thing that can be done is just:
- get_prioritized_drivers() returning the ones with the highest priority;
- get_fallback_drivers() returning the second ones;
But, by doing this, we're limiting mgmt apps to have only one fallback mechanism.
Anyways, suggestions are more than welcome.