omero-py
omero-py copied to clipboard
CLI should support proxy settings
See Omero-py and proxy settings. The CLI would just have to pass ICE variables through to the Blitzgateway. Something similar was done for Insight: https://github.com/ome/omero-insight/pull/197 .
This issue has been mentioned on Image.sc Forum. There might be relevant details there:
https://forum.image.sc/t/omero-py-and-proxy-settings/55456/2
I assumed that omero/client.java would make use of system properties that were set with JAVA_OPTS=-DIce... but that looks to be server-side only. I imagine that would be a fairly easy workaround.
Does that mean, something like this (setting a wrong proxy) shouldn't work:
> export JAVA_OPTS=-DIce.HTTPProxyHost=1.2.3.4
> omero login
It does work, so the proxy setting is not taken into account, right?
Right. https://github.com/ome/omero-blitz/blob/master/src/main/java/omero/client.java#L361 or so would need to be updated to either place all the System properties inside the Ice properties or perhaps rather just the ones matching Ice.* and omero.*.
Is it somehow possible to build omero-py with a custom omero-blitz, in order to test changes in omero-blitz? The setup.py seems to download omero-blitz from artifacts.openmicroscopy.org.
Definitely. That's what merge-ci does:
def get_blitz_location():
config_blitz_version = "5.5.5"
# simplified strings
defaultsect = configparser.DEFAULTSECT
version_key = "versions.omero-blitz"
url_key = "versions.omero-blitz-url"
# detect if in Jenkins or not
if "JENKINS_URL" in os.environ:
config_blitz_url = os.environ.get("JENKINS_URL")
config_blitz_url += "job/OMERO-build-build/lastSuccessfulBuild/"
config_blitz_url += "artifact/omero-blitz/build/distributions/"
config_blitz_url += "omero-blitz-VERSION-python.zip"
else:
config_blitz_url = (
"https://artifacts.openmicroscopy.org/artifactory/ome.releases/"
"org/openmicroscopy/omero-blitz/VERSION/"
"omero-blitz-VERSION-python.zip")