Page 1 of 1

Server Address from Blitz Gateway object

PostPosted: Mon Feb 13, 2012 8:03 pm
by bhcho
Hi all,

quick question.
Could anyone tell me about how to get the server address (or unique server name or anything) using the Blitz Gateway object (in python)?

BK

Re: Server Address from Blitz Gateway object

PostPosted: Mon Feb 13, 2012 10:43 pm
by jmoore
Hi BK,

the most complete definition of what you are connected to is stored under the "Ice.Default.Router" property:

Code: Select all
In [1]: from omero.gateway import BlitzGateway
...
In [5]: bg = BlitzGateway(host="localhost")
...
In [8]: bg.c.getProperty("Ice.Default.Router")
Out[8]: 'OMERO.Glacier2/router:ssl -p 4064 -h localhost'


but if you just want the host, "omero.host" might work:
Code: Select all
In [9]: bg.c.getProperty("omero.host")
Out[9]: 'localhost'


Cheers,
~Josh