omero.install package

Submodules

omero.install.bzip2_tool module

Function for enabling/disabling the bzip2.dll which comes with PyTables.

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

omero.install.bzip2_tool._swap(f, t)
omero.install.bzip2_tool.bzip2_tool(disable=False)

Renames the bzip2.dll library which comes with PyTables.

omero.install.config_parser module

Parser for the omero.properties file to generate RST mark up.

class omero.install.config_parser.Header(name, reference=None, description='')

Bases: object

get_reference()
class omero.install.config_parser.Property(key=None, val=None, txt='')

Bases: object

append(line)

Append line to property description

cont(line)
detect(line)
class omero.install.config_parser.PropertyParser

Bases: object

append(line)
black_list(line)
cleanup()
cont(line)
data()
detect(line)
headers()
ignore()
init()
parse_file(argv=None)

Parse the properties from the input configuration file

parse_module(module='omeroweb.settings')

Parse the properties from the setting module

print_defaults()

Print all keys and their default values

print_headers()

Print headers and number of keys

print_keys()

Print all keys

print_rst()

Print configuration in reStructuredText format

omero.install.config_parser.dbg(msg)
omero.install.config_parser.fail(msg='', debug=0)
omero.install.config_parser.underline(size)

Create underline for reStructuredText headings

omero.install.jvmcfg module

Automatic configuration of memory settings for Java servers.

class omero.install.jvmcfg.ManualStrategy(name, settings=None)

Bases: omero.install.jvmcfg.Strategy

Simplest strategy which assumes all values have been set and simply uses them or their defaults.

class omero.install.jvmcfg.PercentStrategy(name, settings=None)

Bases: omero.install.jvmcfg.Strategy

Strategy based on a percent of available memory.

PERCENT_DEFAULTS = (('blitz', 15), ('pixeldata', 15), ('indexer', 10), ('repository', 10), ('other', 1))
calculate_heap_size(method=None)

Re-calculates the appropriate heap size based on the value of get_percent(). The “active” memory returned by method() will be used by default, but can be modified to use “total” via the “use_active” flag.

get_heap_size()

Uses the results of the default settings of calculate_heap_size() as an argument to get_heap_size(), in other words some percent of the active memory.

get_percent()
get_perm_gen()
usage_table(min=10, max=20)
class omero.install.jvmcfg.Settings(server_values=None, global_values=None)

Bases: object

Container for the config options found in etc/grid/config.xml

get_strategy()
lookup(key, default=None)
overwrite(key, value, always=False)
was_set(key)
class omero.install.jvmcfg.Strategy(name, settings=None)

Bases: object

Strategy for calculating memory settings. Primary class of the memory module.

_system_memory_mb_java()
_system_memory_mb_psutil()
get_append()
get_heap_dump()
get_heap_size(sz=None)
get_memory_settings()
get_perm_gen()
system_memory_mb()

Returns a tuple, in MB, of available, active, and total memory.

“total” memory is found by calling to first a Python library (if installed) and otherwise a Java class. If “system_memory” is set, it will short-circuit both methods.

“active” memory is set to “total” but limited by “min_system_memory” and “max_system_memory”.

“available” may not be accurate, and in some cases will be set to total.

class omero.install.jvmcfg.StrategyRegistry(*args, **kwargs)

Bases: dict

omero.install.jvmcfg.adjust_settings(config, template_xml, blitz=None, indexer=None, pixeldata=None, repository=None)

Takes an omero.config.ConfigXml object and adjusts the memory settings. Primary entry point to the memory module.

omero.install.jvmcfg.read_settings(template_xml)

Read the memory settings from the template file

omero.install.jvmcfg.strip_dict(map, prefix=('omero', 'jvmcfg'), suffix=(), limit=1)

For the given dictionary, return a copy of the dictionary where all entries not matching the prefix, suffix, and limit have been removed and where all remaining keys have had the prefix and suffix stripped. The limit describes the number of elements that are allowed in the new key after stripping prefix and suffix.

omero.install.jvmcfg.usage_charts(path, min=0, max=20, Strategy=<class 'omero.install.jvmcfg.PercentStrategy'>, name='blitz')

omero.install.logs_library module

omero.install.perf_test module

exception omero.install.perf_test.BadCommand

Bases: omero.install.perf_test.ItemException

exception omero.install.perf_test.BadImport

Bases: omero.install.perf_test.ItemException

exception omero.install.perf_test.BadLine

Bases: omero.install.perf_test.ItemException

exception omero.install.perf_test.BadPath

Bases: omero.install.perf_test.ItemException

class omero.install.perf_test.Context(id, reporter=None, client=None)

Bases: object

Login context which can be used by any handler for connecting to a single session.

_stateless(name, prx)
add_reporter(reporter)
config_service()
host()
incr()
key()
query_service()
report(command, start, stop, loops, rv)
setup_dir()
update_service()
class omero.install.perf_test.CsvReporter(dir=None)

Bases: omero.install.perf_test.Reporter

report(command, start, stop, loops, values)
class omero.install.perf_test.HdfReporter(dir)

Bases: omero.install.perf_test.Reporter

report(command, start, stop, loops, values)
class omero.install.perf_test.Item(line)

Bases: object

Single line-item in the configuration file

_op_Import(ctx)
_op_LoadFormats(ctx)
_op_ServerTime(ctx)
comment()
create_obj(ctx, name)
execute(ctx)
repeat()
exception omero.install.perf_test.ItemException

Bases: exceptions.Exception

class omero.install.perf_test.PerfHandler(ctx=None)

Bases: object

class omero.install.perf_test.PlotReporter

Bases: omero.install.perf_test.Reporter

report(command, start, stop, loops, values)
class omero.install.perf_test.Reporter

Bases: object

Abstract base class of all reporters

report(command, start, stop, loops, rv)
omero.install.perf_test.handle(handler, files)

Primary method used by the command-line execution of this module.

omero.install.python_warning module

python helper plugin

Copyright 2016 University of Dundee. All rights reserved. Use is subject to license terms supplied in LICENSE.txt

omero.install.python_warning.py27_only()

omero.install.versions module

omero.install.versions.needs_upgrade(client_version, server_version, verbose=False)

Tests whether the client version is behind the server version. For example:

import omero
from omero_version import omero_version as client_version

client = omero.client()
session = client.createSession()
config = session.getConfigService()
server_version = config.getVersion()

upgrade = needs_upgrade(client_version, server_version)
if upgrade:
   # Inform client

Alternatively, from the command-line:

./versions.py --quiet 4.1.0 4.2.0-DEV || echo upgrade

omero.install.win_set_path module

Function for setting the working directory for an Omero installation on Windows, since relative paths are not supported.

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

author:Josh Moore <josh@glencoesoftware.com>
omero.install.win_set_path.win_set_path(new_name=<object object>, old_name='c:\\omero_dist', dir=path(u'.'))

Parses the Windows cfg and xml files and replaces the default “c:omero_dist” with the given value.

omero.install.windows_warning module

windows helper plugin

Copyright 2009-2016 University of Dundee. All rights reserved. Use is subject to license terms supplied in LICENSE.txt

omero.install.windows_warning.windows_warning(func)

Support for Windows will be removed

Module contents