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]
 
change_ports(glacier2, registry, revert=False)
Parses the etc configuration files to change the current port values.
source code
Variables [hide private]
  dir = path(".")
  etc = dir/ "etc"
  grid = etc/ "grid"

Imports: sys, exceptions, fileinput, path


Function Details [hide private]

change_ports(glacier2, registry, revert=False)

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:

   ./grid/default.xml:    <variable name="ROUTERPORT"   value="4063"/>
   ./grid/windefault.xml:    <variable name="ROUTERPORT"   value="4063"/>
   ./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