From 41d7155fb6defa3ec83fdaaa93182b9935b6f53d Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Tue, 20 Aug 2019 16:20:48 -0400 Subject: [PATCH] Add requires_domain to entry_point. Default is False. Currently only True works. --- lib/galaxy/tool_util/parser/xml.py | 3 ++- lib/galaxy/tools/__init__.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/galaxy/tool_util/parser/xml.py b/lib/galaxy/tool_util/parser/xml.py index 3e06ebe430b..c3c05d38be2 100644 --- a/lib/galaxy/tool_util/parser/xml.py +++ b/lib/galaxy/tool_util/parser/xml.py @@ -216,7 +216,8 @@ class XmlToolSource(ToolSource): name = ep_el.get('name', None) if name: name = name.strip() - rtt.append(dict(port=port, url=url, name=name)) + requires_domain = string_as_bool(ep_el.attrib.get("requires_domain", False)) + rtt.append(dict(port=port, url=url, name=name, requires_domain=requires_domain)) return rtt def parse_hidden(self): diff --git a/lib/galaxy/tools/__init__.py b/lib/galaxy/tools/__init__.py index 715c0ccf8e2..60325c5b003 100755 --- a/lib/galaxy/tools/__init__.py +++ b/lib/galaxy/tools/__init__.py @@ -2452,6 +2452,8 @@ class RealTimeTool(Tool): def __init__(self, config_file, tool_source, app, **kwd): assert app.config.interactivetools_enable, ValueError('Trying to load an InteractiveTool, but InteractiveTools are not enabled.') super(RealTimeTool, self).__init__(config_file, tool_source, app, **kwd) + for port in self.ports: + assert port.get('requires_domain', None), ValueError('InteractiveTools currently only work when requires_domain is True for each entry_point.') def __remove_realtime_by_job(self, job): if job: