-
Notifications
You must be signed in to change notification settings - Fork 11
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
Allow omero.server.nodedescriptors
to be queried from a client
#37
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested against a server using the default configuration (property unset)
Python 3.6.8 (default, Aug 7 2019, 17:28:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import omero
>>> c=omero.client("localhost")
>>> s=c.createSession("root","omero")
>>> s.getConfigService().getConfigValue("omero.server.nodedescriptors")
''
>>> c.closeSession()
and with the property set
Python 3.6.8 (default, Aug 7 2019, 17:28:10)
[GCC 4.8.5 20150623 (Red Hat 4.8.5-39)] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import omero
>>> c=omero.client("localhost")
>>> s=c.createSession("root","omero")
>>> s.getConfigService().getConfigValue("omero.server.nodedescriptors")
'master:Blitz-0,Tables-0'
>>> c.closeSession()
Everything is working as expected. Exposing this property client-side makes sense to me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
seealso:
- https://omero.readthedocs.io/en/stable/sysadmins/config.html#omero.server.nodedescriptors
- https://omero.readthedocs.io/en/stable/sysadmins/grid.html#deployment-examples
This seems safe and in keeping with the property's purpose.
NB: Having not looked at these in a while this makes me realize a couple of things that I'll list here but are obviously for elsewhere:
- There likely should be a way to query all such accessible properties.
- They should likely be listed as such in the documentation.
- And possibly a way to do this is to read the security status from the .properties file rather than the Spring .xml.
From a quick testing, passing the wildcard to >>> s.getConfigService().getConfigValues(".*").keys()
dict_keys(['omero.client.ui.tree.orphans.name', 'omero.client.browser.thumb_default_size', 'omero.client.viewer.initial_zoom_level', 'omero.client.download_as.max_size', 'omero.sessions.max_user_time_to_idle', 'omero.cluster.read_only.runtime.repo', 'omero.client.ui.menu.dropdown.colleagues.label', 'omero.client.web.host', 'omero.security.password_required', 'omero.pixeldata.max_projection_bytes', 'omero.bioformats.version', 'omero.client.ui.menu.dropdown.leaders.label', 'omero.pixeldata.max_tile_length', 'omero.sessions.timeout', 'omero.upgrades.url', 'omero.client.ui.menu.dropdown.everyone.enabled', 'omero.pixeldata.tile_height', 'omero.version', 'omero.mail.config', 'omero.pixeldata.max_plane_width', 'omero.db.authority', 'omero.client.viewer.interpolate_pixels', 'omero.cluster.read_only.runtime.db', 'omero.client.ui.tree.orphans.enabled', 'omero.pixeldata.max_plane_float_override', 'omero.client.ui.tree.orphans.description', 'omero.client.ui.menu.dropdown.leaders.enabled', 'omero.client.ui.menu.dropdown.everyone.label', 'omero.pixeldata.max_plane_height', 'omero.sessions.maximum', 'omero.client.ui.menu.dropdown.colleagues.enabled', 'omero.sessions.max_user_time_to_live', 'omero.router.insecure', 'omero.bioformats.date', 'omero.bioformats.vcs_revision', 'omero.client.viewer.roi_limit', 'omero.server.nodedescriptors', 'omero.pixeldata.tile_width', 'omero.client.scripts_to_ignore', 'omero.client.ui.tree.type_order', 'omero.db.uuid#1', 'omero.pixeldata.backoff'])
I was hoping the API above could be used integrated in the generation script but the properties glossary is create by the output of |
👍
|
It is useful for clients to know that specific services are disabled. In particular
PixelData-0
for warning users about a lack of pyramid generation orTables-0
for warning users about OMERO.tables services being unavailable./cc @sbesson, @stick, @atTODO