Example #1
0
def get_all_installed_repositories(actually_installed=False):
    if actually_installed:
        return install_session.query(galaxy.model.tool_shed_install.ToolShedRepository) \
                              .filter(and_(galaxy.model.tool_shed_install.ToolShedRepository.table.c.deleted == false(),
                                           galaxy.model.tool_shed_install.ToolShedRepository.table.c.uninstalled == false(),
                                           galaxy.model.tool_shed_install.ToolShedRepository.table.c.status == galaxy.model.tool_shed_install.ToolShedRepository.installation_status.INSTALLED)) \
                              .all()
    else:
        return install_session.query(
            galaxy.model.tool_shed_install.ToolShedRepository).all()
Example #2
0
def get_galaxy_repository_by_name_owner_changeset_revision(
        repository_name, owner, changeset_revision):
    return install_session.query(galaxy.model.tool_shed_install.ToolShedRepository) \
                          .filter(and_(galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                       galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner,
                                       galaxy.model.tool_shed_install.ToolShedRepository.table.c.changeset_revision == changeset_revision)) \
                          .first()
Example #3
0
def get_installed_repository_by_name_owner(repository_name,
                                           owner,
                                           return_multiple=False):
    query = install_session.query(galaxy.model.tool_shed_install.ToolShedRepository) \
                           .filter(and_(galaxy.model.tool_shed_install.ToolShedRepository.table.c.name == repository_name,
                                        galaxy.model.tool_shed_install.ToolShedRepository.table.c.owner == owner))
    if return_multiple:
        return query.all()
    return query.first()
Example #4
0
def get_installed_repository_by_id(repository_id):
    return install_session.query(galaxy.model.tool_shed_install.ToolShedRepository) \
                          .filter(galaxy.model.tool_shed_install.ToolShedRepository.table.c.id == repository_id) \
                          .first()