Table Of Contents

Previous topic

omero.model.enums package

Next topic

omero.sys package

This Page

omero.plugins package

Submodules

omero.plugins.admin module

author:Josh Moore, josh at glencoesoftware.com

OMERO Grid admin controller

This is a python wrapper around icegridregistry/icegridnode for master and various other tools needed for administration.

Copyright 2008-2016 Glencoe Software, Inc. All Rights Reserved. Use is subject to license terms supplied in LICENSE.txt

class omero.plugins.admin.AdminControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.plugins.prefs.WriteableConfigControl, omero.cli.UserGroupControl

_cmd(*command_arguments)

Used to generate an icegridadmin command line argument list

_complete(text, line, begidx, endidx)

Returns a file after “deploy”, “start”, or “startasync” and otherwise delegates to the BaseControl

_configure(parser)
_descript(args)
_get_data_dir(config)
_get_etc_dir()

Return path to directory containing configuration files

_get_grid_dir()

Return path to directory containing Gridconfiguration files

_get_templates_dir()

Return path to directory containing templates

_node(omero_node=None)

Overrides the regular node() logic to return the value of OMERO_MASTER or “master”

_query_service(svc_name)
_start_service(config, descript, svc_name, pasw, user)
_stop_service(svc_name)
can_access(filepath, mask=6)

Check that the given path belongs to or is accessible by the current user on Linux systems.

check(args)
check_access(mask=6, config=None)

Check that ‘var’ is accessible by the current user.

check_internal_cfg()
check_lock(config)

Issue a warning if any of the top ”.omero” directories contain a lock file. This isn’t a conclusive test this we don’t have access to the DB to get the UUID for this instance. Usually there should only be one though.

check_node(args)

If the args argparse.Namespace argument has no “node” attribute, then assign one.

check_service(name)
checkice(args=None)

Checks for Ice version compatibility.

See ticket:2514, ticket:1260

checkupgrade(*args, **kwargs)

Checks whether a server upgrade is available, exits with return code 0: this is the latest version 1: an upgrade is available 2: an error occurred whilst checking

checkwindows(args)

Checks that the templates file as defined in etcWindows.cfg can be found.

cleanse(*args, **kwargs)
deploy(*args, **kwargs)
diagnostics(*args, **kwargs)
email(args)
events(svc_name)
fixpyramids(*args, **kwargs)
getdirsize(directory)
ice(args)
jvmcfg(*args, **kwargs)

Display JVM settings from the current configuration

loops_and_wait(args)

If present, get the wait time from the args argument and calculate the number of loops and the wait time needed. If not present in args, use a default value.

open_config(unused)

Callers are responsible for closing the returned ConfigXml object.

ports(*args, **kwargs)
reindex(*args, **kwargs)
restart(*args, **kwargs)
restartasync(*args, **kwargs)
rewrite(*args, **kwargs)

Regenerate all the template files under the configuration directory

session_manager(communicator)
sessionlist(args)
start(*args, **kwargs)
start_service(name)
startasync(*args, **kwargs)

First checks for a valid installation, then checks the grid, then registers the action: “node HOST start”

status(*args, **kwargs)
stop(*args, **kwargs)
stop_service(name)
stopasync(*args, **kwargs)

Returns true if the server was already stopped

wait_for_icedb(args, config)

Since the stop and start are separately protected by the lock on config.xml, we need to wait for some time to hopefully let the icegridnode process release the file locks.

waitdown(args)

Returns true if the server went down

waitup(args)

Loops 30 times with 10 second pauses waiting for status() to return 0. If it does not, then ctx.die() is called.

omero.plugins.basics module

load, quit, version, help plugins

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

The load plugin is used to read in files with omero cli commands (omitting the omero). For example,

./omero load some/file.osh

The help, quit, and version plugins are self-explanatory.

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

class omero.plugins.basics.HelpControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

Defined here since the background loading might be too slow to have all help available

_complete(text, line, begidx, endidx)

This is something of a hack. This should either be a part of the context interface, or we should put it somewhere in a utility. FIXME.

_configure(parser)
format_title(command, sep='-')

Create heading for command or topic help

print_all_commands_and_topics(args)

Print the help for all commands and topics

print_command_help(control, args)

Print help for a single command and optionally its subcommand

print_commands_list(args)

Print a list of all commands

print_single_command_or_topic(args)

Print the help for a command or a topic

print_usage()
class omero.plugins.basics.LoadControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
class omero.plugins.basics.QuitControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
class omero.plugins.basics.ShellControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
class omero.plugins.basics.VersionControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)

omero.plugins.chgrp module

chgrp plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

class omero.plugins.chgrp.ChgrpControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.GraphControl

_pre_objects(parser)
_process_request(req, args, client)
cmd_type()
is_admin(client)
print_chgrp_response(rsp)
print_detailed_report(req, rsp, status)

omero.plugins.chown module

chown plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

class omero.plugins.chown.ChownControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.GraphControl

_pre_objects(parser)
_process_request(req, args, client)
cmd_type()
print_chown_response(rsp)
print_detailed_report(req, rsp, status)

omero.plugins.db module

Plugin for our managing the OMERO database.

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

class omero.plugins.db.DatabaseControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
_copy(input_path, output, func, cfg=None)
_create(sql_directory, db_vers, db_patch, password_hash, args, location=None)
_db_profile()
_get_password_hash(args, root_pass=None, old_prompt=False)
_has_user_id(args)
_lookup(key, defaults, args)

Get a value from a flag arg, positional arg, or default properties

_make_replace(root_pass, db_vers, db_patch)
_sql_directory(db_vers, db_patch)

See #2689

loaddefaults(*args, **kwargs)
password(*args, **kwargs)
script(*args, **kwargs)

omero.plugins.delete module

Startup plugin for command-line deletes

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

class omero.plugins.delete.DeleteControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.GraphControl

cmd_type()
default_exclude()

Don’t delete these three types of Annotation by default

print_delete_response(rsp)
print_detailed_report(req, rsp, status)

omero.plugins.download module

download plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

class omero.plugins.download.DownloadControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
get_file(session, value)
parse_object_id(object_type, value)

omero.plugins.duplicate module

Plugin for duplicating object graphs

class omero.plugins.duplicate.DuplicateControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.GraphControl

cmd_type()
print_detailed_report(req, rsp, status)
print_duplicate_response(rsp)

omero.plugins.export module

Startup plugin for command-line exporter

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

class omero.plugins.export.ExportControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
export(args)
handleDatasets(args, datasets)
handleImages(args, images)

omero.plugins.fs module

fs plugin for querying repositories, filesets, and the like.

class omero.plugins.fs.Entry

Bases: tuple

Entry(level, id, path, mimetype)

_asdict(t)

Return a new dict which maps field names to their values

_fields = ('level', 'id', 'path', 'mimetype')
classmethod _make(iterable, new=<built-in method __new__ of type object at 0x3bb0177b00>, len=<built-in function len>)

Make a new Entry object from a sequence or iterable

_replace(_self, **kwds)

Return a new Entry object replacing specified fields with new values

id

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

level

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

mimetype

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

path

itemgetter(item, ...) –> itemgetter object

Return a callable object that fetches the given item(s) from its operand. After, f=itemgetter(2), the call f(r) returns r[2]. After, g=itemgetter(2,5,3), the call g(r) returns (r[2], r[5], r[3])

class omero.plugins.fs.FsControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.CmdControl

_configure(parser)
_detailed_usage_report(req, rsp, status, args)

Print a breakdown of disk usage in table form, including user, group and component information according to the args.

_extended_info(client, row, values)
_table(args)
_to_units(size, units)

Convert from bytes to KiB, MiB, GiB, TiB or PiB.

_usage_obj(obj)

Take the positional arguments and marshal them into a dictionary and a list for the command argument.

_usage_report(req, rsp, status, args)

Output the total bytes used or the error, optionally provide more details.

get_managed_repo(client)

For the moment this assumes there’s only one.

images(args)

List images, filtering for archives, etc.

This command is useful for showing pre-FS (i.e. OMERO 4.4 and before) images which have original data archived with them. It may be possible to convert these to OMERO 5 filesets.

Examples:

bin/omero fs images –archived # List only OMERO4 images bin/omero fs images –order=newest # Default bin/omero fs images –order=largest # Most used space bin/omero fs images –limit=500 # Longer listings bin/omero fs images –extended # More details
logfile(args)

Return the logfile associated with a fileset

ls(args)

List all the original files contained in a fileset

mkdir(*args, **kwargs)

Make a new directory (admin-only)

Creates a new empty directory in the managed repository. A new storage volume may then be mounted at that location and the import template (omero.fs.repo.path) adjusted to target it. Once created, the directory may be deleted from the underlying filesystem and replaced with a symbolic link. Directories that violate the root-owned prefix components of omero.fs.repo.path are all set to be owned by the root user.

rename(*args, **kwargs)

Moves an existing fileset to a new location (admin-only)

After the import template (omero.fs.repo.path) has been changed, it may be useful to rename an existing fileset to match the new template. By default the original files and import log are also moved.

repos(args)

List all repositories.

These repositories are where OMERO stores all binary data for your system. Most useful is likely the “ManagedRepository” where OMERO 5 imports to.

Examples:

bin/omero fs repos # Show all bin/omero fs repos –managed # Show only the managed repo

# Or to print only the directory # under Unix:

bin/omero fs repos –managed –style=plain | cut -d, -f5

set_repo(*args, **kwargs)

Change configuration properties for single repositories

sets(args)

List filesets by various criteria

Filesets are bundles of original data imported into OMERO 5 and above which represent 1 or more images.

Examples:

bin/omero fs sets –order=newest # Default bin/omero fs sets –order=oldest bin/omero fs sets –order=largest bin/omero fs sets –without-images # Corrupt filesets bin/omero fs sets –with-transfer=ln_s # Symlinked filesets bin/omero fs sets –check # Proof the checksums
usage(args)

Shows the disk usage for various objects.

This command shows the total disk usage of various objects including: ExperimenterGroup, Experimenter, Project, Dataset, Folder, Screen, Plate, Well, WellSample, Image, Pixels, Annotation, Job, Fileset, OriginalFile. The total size returned will comprise the disk usage by all related files. Thus an image’s size would typically include the files uploaded to a fileset, import log (Job), thumbnails, and, possibly, associated pixels or original files. These details can be displayed using the –report option.

Examples:

bin/omero fs usage # total usage for current user bin/omero fs usage –report # more detailed usage for current user bin/omero fs usage –groups # total usage for current user’s groups # total usage for five images with minimal output bin/omero fs usage Image:1,2,3,4,5 –size_only # total usage for all images with in a human readable format bin/omero fs usage Image:* –human-readable # total usage for all users broken down by user and group bin/omero fs usage Experimenter:* –report –sum-by user group # total usage for two projects and one dataset Megabytes bin/omero fs usage Project:1,2 Dataset:5 –units M # in this last case if the dataset was within project 1 or 2 # then the size returned would be identical to: bin/omero fs usage Project:1,2 –units M
omero.plugins.fs.contents(mrepo, path, ctx=None)

Yield Entry namedtuples for each return value from treeList for the given path.

omero.plugins.fs.get_logfile(query, fid)
omero.plugins.fs.prep_directory(client, mrepo)

Create an empty FS directory by performing an import and then deleting the created fileset.

omero.plugins.fs.rename_fileset(client, mrepo, fileset, new_dir, ctx=None)

Loads each OriginalFile found under orig_dir and updates its path field to point at new_dir. Files are not yet moved.

omero.plugins.group module

Group administration plugin

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

class omero.plugins.group.GroupControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.UserGroupControl

_configure(parser)
add(*args, **kwargs)
add_permissions_arguments(parser)
adduser(args)
copyusers(args)
filter_users(uids, group, owner=False, join=True)
info(args)
list(args)
listusers(args)
parse_groupid(a, args)
parse_perms(args)
perms(args)
removeuser(args)

omero.plugins.hql module

HQL plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

class omero.plugins.hql.HqlControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
display(rv, cols=None, style=None, idsonly=False)
filter(values)
hql(args, loop=False)
project(querySvc, queryStr, params, ice_map)
unwrap(object, cache=None)

omero.plugins.import module

Startup plugin for command-line importer.

class omero.plugins.import.CommandArguments(ctx, args)

Bases: object

accepts(key)
add(key, val=<object object at 0x15c43650>)
added_args()
append_arg(cmd_list, key, val=<object object at 0x15c43650>)
build_arg_list(key, val=<object object at 0x15c43650>)
initial_args()
java_args()
open_files()
open_log(file, prefix=None)
reset_arg(cmd_list, idx, key, val=<object object at 0x15c43650>)
set_login_arguments(ctx, args)

Set the connection arguments

set_path(path)
set_skip_arguments(args)

Set the arguments to skip steps during import

class omero.plugins.import.ImportControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

COMMAND = ['ome.formats.importer.cli.CommandLineImporter']
_configure(parser)
bulk_import(command_args, xargs)
do_import(command_args, xargs)
importer(args)
parse_bulk(bulk, command_args)
parse_csv(path, delimiter=', ')
parse_shlex(path)
parse_text(path, parse=False)
parse_tsv(path, delimiter='\t')
class omero.plugins.import.TestEngine(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.plugins.import.ImportControl

COMMAND = ['ome.formats.test.util.TestEngine']

omero.plugins.ldap module

User administration plugin (LDAP extension)

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

class omero.plugins.ldap.LdapControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.UserGroupControl

_configure(parser)
active(*args, **kwargs)
create(*args, **kwargs)
discover(*args, **kwargs)
getdn(*args, **kwargs)
list(*args, **kwargs)
setdn(*args, **kwargs)

omero.plugins.metadata module

Metadata plugin

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

class omero.plugins.metadata.Metadata(obj_wrapper)

Bases: object

A general helper object which providers higher-level accessors and mutators for a particular object.

get_allanns(ns=None, anntype=None)
get_bulkanns()
get_id()
get_measures()
get_name()
get_original()
get_parent()
get_parents()
get_roi_count()
get_type()
wrap(obj)
class omero.plugins.metadata.MetadataControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

POPULATE_CONTEXTS = (('csv', <class 'omero.util.populate_metadata.ParsingContext'>), ('bulkmap', <class 'omero.util.populate_metadata.BulkToMapAnnotationContext'>), ('deletemap', <class 'omero.util.populate_metadata.DeleteMapAnnotationContext'>))
_clientconn(args)
_configure(parser)
_format_ann(md, obj, indent=None)

Format an annotation as a string, optionally pretty-printed

_load(args, die_on_failure=True)
_output_ann(mdobj, func, parents, indent)
allanns(args)

Provide a list of all annotations linked to the given object

bulkanns(args)

Provide a list of the NSBULKANNOTATION tables linked to the given object

mapanns(args)

Provide a list of all MapAnnotations linked to the given object

measures(args)

Provide a list of the NSMEASUREMENT tables linked to the given object

original(args)

Print the original metadata in ini format

populate(args)

Add metadata (bulk-annotations) to an object

populateroi(args)

Add ROIs to an object

rois(args)

Manage ROIs

summary(args)

Provide a general summary of available metadata

exception omero.plugins.metadata.ObjectLoadException(klass, oid)

Bases: exceptions.Exception

Raised when a requested object could not be loaded

omero.plugins.metadata.guess_mimetype(filename)

omero.plugins.node module

author:Josh Moore, josh at glencoesoftware.com

OMERO Grid node controller

This is a python wrapper around icegridnode.

Copyright 2008, 2016 Glencoe Software, Inc. All Rights Reserved. Use is subject to license terms supplied in LICENSE.txt

class omero.plugins.node.NodeControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
_handleNZRC(nzrc)

Set the return value from nzrc on the context, and print out the last two lines of any error messages if present.

kill(*args, **kwargs)
start(*args, **kwargs)
status(args)
stop(*args, **kwargs)

omero.plugins.obj module

Plugin for performing OMERO transactional changes (DML) from a simple script. This macro like language is intended to be used simply from the command-line as well as in scripts and tests.

class omero.plugins.obj.ListGetTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.NonFieldTxAction

on_go(ctx, args)
class omero.plugins.obj.MapGetTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.NonFieldTxAction

on_go(ctx, args)
class omero.plugins.obj.MapSetTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.NonFieldTxAction

on_go(ctx, args)
class omero.plugins.obj.NewObjectTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.TxAction

check_requirements(ctx, obj, completed)
go(ctx, args)
class omero.plugins.obj.NonFieldTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.TxAction

Base class for use with command actions which don’t take the standard a=b c=d fields.

go(ctx, args)
save_and_return(ctx)
class omero.plugins.obj.NullTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.NonFieldTxAction

on_go(ctx, args)
class omero.plugins.obj.ObjControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

Create, Update and Query OMERO objects

The obj command allows inserting any objects into the OMERO database as well as updating and querying existing ones. This is likely useful for preparing datasets for import and similar.

Examples:

$ bin/omero obj new Dataset name=foo Dataset:123 $ bin/omero obj update Dataset:123 description=bar Dataset:123 $ bin/omero obj get Dataset:123 name foo $ bin/omero obj get Dataset:123 description=bar id=123 name=foo version= $ bin/omero obj null Dataset:123 description Dataset:123 $ bin/omero obj get Dataset:123 description

$ bin/omero obj new MapAnnotation ns=example.com MapAnnotation:456 $ bin/omero obj map-set MapAnnotation:456 mapValue foo bar MapAnnotation:456 $ bin/omero obj map-set MapAnnotation:456 mapValue fu baa MapAnnotation:456 $ bin/omero obj map-get MapAnnotation:456 mapValue foo bar $ bin/omero obj get MapAnnotation:456 mapValue (foo,bar),(fu,baa) $ bin/omero obj list-get MapAnnotation:456 mapValue 0 (foo,bar)

Bash examples:

$ project=$(bin/omero obj new Project name=’my Project’) $ dataset=$(bin/omero obj new Dataset name=’my Dataset’) $ bin/omero obj new ProjectDatasetLink parent=$project child=$dataset ProjectDatasetLink:456 $ bin/omero import -d $dataset ...
_configure(parser)
parse(tx_state, arg_list=None, line=None)

Takes a single command list and turns it into a TxAction object

process(args)
class omero.plugins.obj.ObjGetTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.NonFieldTxAction

get_field(field)
on_go(ctx, args)
class omero.plugins.obj.TxAction(tx_state, tx_cmd)

Bases: object

Parsed operation provided by the user chosen based on the first non-variable field of the command. Implementations can choose how they will handle the fields parsed by TxCmd.

class_name(ctx)
go(ctx, args)
instance(ctx)
obj_id()
class omero.plugins.obj.TxCmd(tx_state, arg_list=None, line=None)

Bases: object

VAR_NAME = '(?P<DEST>[a-zA-Z][a-zA-Z0-9]*)'
VAR_RE = <_sre.SRE_Pattern object at 0x1a691e50>
_parse_early()
_parse_late()
setters()
class omero.plugins.obj.TxField(tx_state, arg)

Bases: object

ARG_RE = <_sre.SRE_Pattern object at 0x17fd5ee0>
class omero.plugins.obj.TxState(ctx)

Bases: object

add(command)
get_row(i)
get_var(key)
set_value(proxy, dest=None)
class omero.plugins.obj.UpdateObjectTxAction(tx_state, tx_cmd)

Bases: omero.plugins.obj.TxAction

go(ctx, args)

omero.plugins.perf module

Plugin for measuring the performance of an OMERO installation.

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

class omero.plugins.perf.PerfControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)

omero.plugins.prefs module

prefs plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

The pref plugin makes use of prefs.class from the common component.

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

class omero.plugins.prefs.PrefsControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.plugins.prefs.WriteableConfigControl

_configure(parser)
all(*args, **kwargs)
append(*args, **kwargs)
default(*args, **kwargs)
drop(*args, **kwargs)
edit(*args, **kwargs)
get(*args, **kwargs)
get_list_value(args, config)
get_omeroweb_default(key)
handle_line(line, config, keys)
keys(*args, **kwargs)
list(*args, **kwargs)
load(*args, **kwargs)
lock(*args, **kwargs)
old(args)
open_config(args)
parse(args)
path(*args, **kwargs)
remove(*args, **kwargs)
set(*args, **kwargs)
upgrade(*args, **kwargs)
version(*args, **kwargs)
class omero.plugins.prefs.WriteableConfigControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

Base class for controls which need write access to the OMERO configuration using the @with_rw_config decorator

Note BaseControl should be used for read-only access using @with_config

die_on_ro(config)
run_upgrade_check(config, agent)
omero.plugins.prefs._make_open_and_close_config(func, allow_readonly)
omero.plugins.prefs.getprefs(args, dir)

Kept around temporarily for upgrading users from pre-4.2 configurations.

omero.plugins.prefs.with_config(func)

opens a config and passes it as the second argument.

omero.plugins.prefs.with_rw_config(func)

opens a config and passes it as the second argument. Requires that the returned config be writeable

omero.plugins.script module

script plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

The script plugin is used to run arbitrary blitz scripts which take as their sole input Ice configuration arguments, including –Ice.Config=file1,file2.

The first parameter, the script itself, should be natively executable on a given platform. I.e. invokable by subprocess.call([file,...])

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

class omero.plugins.script.ScriptControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_complete(text, line, begidx, endidx)

Returns a file after “upload” and otherwise delegates to the BaseControl

_configure(parser)
_file(args, client)
_parse_inputs(args, params)
_parse_scripts(scripts, msg)

Parses a list of scripts to self.ctx.out

_parse_who(who)

Parses who items of the form: “user”, “group”, “user=1”, “group=6”

cat(args)
delete(args)
demo(args)
disable(args)
edit(args)
enable(args)
foreground_nix(impl, timeout)

Use signal.SIGALRM to wait for the timeout to signal

foreground_win(impl, timeout)

Note: currently simply fails. An implementation might be possible using msvcrt. See: http://stackoverflow.com/questions/3471461/raw-input-and-timeout/3911560

help(args)
jobs(args)
launch(args)
list(args)
log(args)
params(args)
replace(args)
run(args)
serve(args)
setmimetype(args)
upload(args)

omero.plugins.search module

Simple command-line searching. Similar to the hql plugin.

class omero.plugins.search.SearchControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.plugins.hql.HqlControl

_configure(parser)
date(user_string)
search(args)

omero.plugins.server module

Startup plugin for our various server components, called typically by icegridnode after parsing etc/grid/templates.xml.

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

class omero.plugins.server.ServerControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_checkIceConfig(*args, **kwargs)
_configure(parser)
_prop(data, key)
_xargsAndDebug(component, xargs_default)
blitz(args)
help(*args, **kwargs)
indexer(args)

omero.plugins.sessions module

Plugin for viewing and controlling active sessions for a local user.

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

class omero.plugins.sessions.SessionsControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

FACTORY

alias of SessionsStore

_configure(parser)
_configure_dir(parser)
_configure_login(login)
_get_server(store, name, port)
_get_username(defuser)
static _parse_conn(server, default_name)

Parse a connection string of form (user@)server(:port)

_parse_timeout(timeout, msg='')
attach(store, server, name, uuid, props, exists, set_current=True)
check_and_attach(store, server, name, uuid, props, check_group=False)

Checks for conflicts in the settings for this session, and if there are none, then attempts an “attach()”. If that fails, the session is removed.

clear(args)
conn(properties=None, profile=None, args=None)

Either creates or returns the exiting omero.client instance. Uses the comm() method with the same signature.

file(args)

Return the file associated with the current active session

group(args)
handle(rv, action)

Handles a new connection

help(args)
keepalive(args)
key(args)

Return the key associated with the current active session

list(args)
login(args)

Login to a given server, and store session key locally.

USER, HOST, and PORT are set as args or in a ssh-style connection string. PASSWORD can be entered interactively, or passed via -w (insecure!). Alternatively, a session KEY can be passed with ‘-k’. Admin users can use –sudo=ADMINUSER to login for others.

Examples:
bin/omero login example.com bin/omero login user@example.com bin/omero login user@example.com:24064 bin/omero login -k SESSIONKEY example.com bin/omero login –sudo=root user@example
logout(args)
store(args)
timeout(args)
who(args)

omero.plugins.submit module

submit plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

exception omero.plugins.submit.Cancel

Bases: exceptions.Exception

exception omero.plugins.submit.Save

Bases: exceptions.Exception

class omero.plugins.submit.SubmitCLI

Bases: omero.cli.CLI

do_cancel(arg)
do_save(arg)
post_process()
postcmd(stop, line)
class omero.plugins.submit.SubmitControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)

omero.plugins.tag module

Tag plugin for command-line tag manipulation

author:Sam Hart <sam@glencoesoftware.com>

Copyright (C) 2013-2015 Glencoe Software, Inc. All rights reserved. Use is subject to license terms supplied in LICENSE.txt

class omero.plugins.tag.Tag(tag_id=None, name=None, description=None, owner=None, children=None)

Bases: object

class omero.plugins.tag.TagCollection

Bases: object

class omero.plugins.tag.TagControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_configure(parser)
add_newtag_params(parser)
add_standard_params(parser)
add_tag_common_params(parser)
create(args)

create a tag command.

create_tag(name, description, text='tag')

Creates a new tag object. Returns the new tag object.

If name parameter is None, the user will be prompted to input it.

The “text” parameter should be the text description to use upon user input. For example, if we were creating a tag, this would be “tag” (the default). If we were creating a tagset, this could be “tag set”.

createset(args)

Create a tag set command.

determine_console_size()

Will attempt to determine console size based upon the current platform.

Returns tuple of width and length.

generate_empties(empties, args)

Given a list of empty tagsets, return a list of lines representing the empty tagset output.

generate_orphans(orphans, args)

Given a list of orphaned tags, return a list of lines representing the orphan output.

generate_tagset(tags, mapping, args)

Given a dict of tags and mappings for parent/child relationships return a list of lines representing the tagset output.

Links an object to a tag annotation.

list(args)

List tags command.

list_tags(args, tagset=None)

Returns a TagCollection object

list_tags_recursive(args, tagset=None)

Returns a TagCollection object

list_tagsets(args, tag)

Returns a TagCollection of just the tagsets.

If tag is provided, will return the tagsets with those tags.

listsets(args)

List tag sets command.

load(args)

Import new tag(s) from json.

pagetext(lines)
pagetext_format(format, elements)
print_line(line, index)
omero.plugins.tag.clip(s, width)

Given a string, s, and a width, will clip the string to that width or fill it with spaces up to that width.

Returns modified string

omero.plugins.tag.exec_command(cmd)

given a command, will execute it in the parent environment Returns a list containing the output

omero.plugins.upload module

upload plugin

Plugin read by omero.cli.Cli during initialization. The method(s) defined here will be added to the Cli class for later use.

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

class omero.plugins.upload.UploadControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_complete(text, line, begidx, endidx)

Returns a file after “upload” and otherwise delegates to the BaseControl

_configure(parser)
upload(args)

omero.plugins.user module

User administration plugin

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

class omero.plugins.user.UserControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.UserGroupControl

_configure(parser)
add(*args, **kwargs)
email(args)
filter_groups(groups, uid, owner=False, join=True)
format_name(exp)
info(args)
joingroup(args)
leavegroup(args)
list(args)
listgroups(args)
parse_userid(a, args)
password(args)

omero.plugins.web module

Plugin for our configuring the OMERO.web installation

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

class omero.plugins.web.WebControl(ctx=None, dir=path(u'/opt/hudson/workspace/OMERO-DEV-release/src/dist'))

Bases: omero.cli.BaseControl

_build_run_cmd(settings)
_check_pid(pid, pid_path)
_configure(parser)
_deprecated_args(args, settings)
_get_django_pid(pid_path)

Get Django Process ID

_get_django_pid_path()
_get_fallback_dir()
_get_python_dir()
_get_web_templates_dir()
_set_apache_wsgi(d, settings)
call(args)
clearsessions(*args, **kwargs)

Clean out expired sessions.

collectstatic(*args, **kwargs)

Ensure that static media is copied to the correct location

config(*args, **kwargs)

Generate a configuration file from a template

config_choices = ('nginx', 'nginx-development', 'apache22', 'apache24', 'apache')
enableapp(*args, **kwargs)
gateway(args)
help(*args, **kwargs)

Return extended help

restart(args)
set_environ(ice_config=None)
start(*args, **kwargs)
status(*args, **kwargs)
stop(*args, **kwargs)
syncmedia(args)
omero.plugins.web.assert_config_argtype(func)

Decorator validating OMERO.web deployment dependencies

omero.plugins.web.config_required(func)

Decorator validating Django dependencies and omeroweb/settings.py

Module contents