Package omero :: Package install :: Module change_ports
[hide private]
[frames] | no frames]

Module change_ports

source code

Function for changing the ports used by Glacier2 and the IceGrid registry. To run more than one OMERO instance on a machine, it's necessary to modify these.

Copyright 2009 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt

:author: Josh Moore <josh@glencoesoftware.com>

Functions [hide private]
 
line_has_port(line, port) source code
 
change_ports(glacier2, glacier2insecure, registry, revert=False, dir=".")
Parses the etc configuration files to change the current port values.
source code

Imports: re, sys, exceptions, fileinput, path


Function Details [hide private]

change_ports(glacier2, glacier2insecure, registry, revert=False, dir=".")

source code 

Parses the etc configuration files to change the current port values. If the files have been noticeably changed, this method may fail.

Example:

   ./etc/ice.config: ## omero.port=4064 (default)
   or
   ./etc/ice.config: omero.port=4064
   ./grid/default.xml:    <variable name="ROUTERPORT"   value="4064"/>
   ./grid/windefault.xml:    <variable name="ROUTERPORT"   value="4064"/>
   ./internal.cfg:Ice.Default.Locator=IceGrid/Locator:tcp -h 127.0.0.1 -p 4061
   ./master.cfg:IceGrid.Registry.Client.Endpoints=tcp -h 127.0.0.1 -p 4061