-
Notifications
You must be signed in to change notification settings - Fork 2
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
configDB - QA #24
Comments
Regarding Mode Types, I wrote a python code for creating, updating, destroying, and listing mode types using the Selenium web-driver. See the code below:
I want to add that I found a problem when you want to change/update the mode type. Let me know if something is unclear. Cheers. |
BTW, I realize I reported these issues from a different GitHub account than the previous ones, sorry for that :) |
Thanks for reporting this, and sorry you had to go through the trouble of writing that selenium stuff just to set these values via the API! I will add this to the list of things to fix when I work on it - the goal is for everything to be accessible from the API. |
I have a PR in review on configdb which should address this: |
I would like to summarize what additional things I found so far in the API system:
GENERIC MODES
The API does not CREATE Generic Modes, and no ID is returned when listing them.
In order to CREATE them you need to use web interface and retrieve their IDs manually.
The API also doesn't support UPDATE, so you need to update them via the web interface as well.
In order to CREATE and UPDATE Generic Modes automatically, I created WEB functions that are doing that using selenium web-driver.
LIST, RETRIEVE, and DESTROY operations work as expected through the API.
However, I also added WEB function for listing GM with their IDs since they are not returned in the table by default.
GENERIC MODE GROUPS
Exactly the same issues as explained above for the GM.
I would add also one addition thing regarding GMG and their creation.
Creating a NEW GMG fails if the INSTRUMENT_TYPE has already been used for the creation of another generic mode group.
This means I can only create a new generic mode group using a "new" or "unused" instrument type.
This was tested also manually trough configDB.
Attached is a screenshot capturing the bug.
MODE TYPES
There is no API function for Mode Types (http://127.0.0.1:7000/admin/hardware/modetype) and I think it would be nice to have this, since for everything else API exists.
Python code
I am sharing my python code including all API and WEB functions that I created and tested locally, and are working well with confingDB on my computer. Maybe someone will find it useful :)
P.S. When I have time to write and test WEB functions for Mode Types I will attached them as well.
I hope this can be helpful.
Best regards,
Nikola
The text was updated successfully, but these errors were encountered: