I'm using a distributed selenoid cloud infrastructure to distribute my automated tests. In order to keep track of the selenoid instances I have a selenoid table in MySQL which tracks which selenoid instances are enabled and disabled.
I have this table modeled using the python alembic library.
I'm now in the situation where I need to make some custom api calls to the selenoid instances. I was thinking about adding the api interface directly to the model. This way I can query for my selenoid instances and then immediately make api calls with the results.
Example of what I'm thinking:
selenoid_instances = session.query(Selenoids).all()
for selenoid in selenoid_instances:
videos = selenoid.get_videos()
Is this a good design practice or a bad idea?