Browse files

changes to the service to reflect the virga->lantorrent name change

  • Loading branch information...
1 parent df83398 commit 9fdfa06bbeda87a4a2c52e479a1cda42a0171b95 BuzzTroll committed Sep 2, 2010
View
2 control/etc/workspace-control/propagation.conf
@@ -41,5 +41,5 @@ http: false
#hdfs: /usr/bin/hadoop
-virga: true
+lantorrent: true
ssh: /usr/bin/ssh
View
12 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_common.py
@@ -17,7 +17,7 @@
PROP_ADAPTER_GUC = "gsiftp"
PROP_ADAPTER_HDFS = "hdfs"
PROP_ADAPTER_HTTP = "http"
-PROP_ADAPTER_VIRGA = "virga"
+PROP_ADAPTER_LANTORRENT = "lantorrent"
class DefaultImageProcurement:
"""ImageProcurement is the wcmodule responsible for making files accessible
@@ -95,13 +95,13 @@ def validate(self):
return
- virga_path = self.p.get_conf_or_none("propagation", "virga")
- if virga_path:
+ lt_path = self.p.get_conf_or_none("propagation", "lantorrent")
+ if lt_path:
try:
- import propagate_virga
- self.adapters[PROP_ADAPTER_VIRGA] = propagate_virga.VirgaPropadapter(self.p, self.c)
+ import propagate_lantorrent
+ self.adapters[PROP_ADAPTER_LANTORRENT] = propagate_lantorrent.LantorrentPropadapter(self.p, self.c)
except Exception, ex:
- msg = "VIRGA configuration present (propagation->virga) but cannot load a suitable virga implementation in the code: " + str(ex)
+ msg = "lantorrent configuration present (propagation->lantorrent) but cannot load a suitable lantorrent implementation in the code: " + str(ex)
self.c.log.exception(msg + ": ")
raise InvalidConfig(msg)
View
36 control/src/python/workspacecontrol/defaults/imageprocurement/propagate_virga.py
@@ -7,17 +7,17 @@
import urlparse
import workspacecontrol.main.wc_args as wc_args
-class VirgaPropadapter(propagate_scp.propadapter):
+class LantorrentPropadapter(propagate_scp.propadapter):
def __init__(self, params, common):
propagate_scp.propadapter.__init__(self, params, common)
self.ssh = None
- self.scheme = "virga://"
+ self.scheme = "lantorrent://"
def validate(self):
# validate scp adaptor
propagate_scp.propadapter.validate(self)
- self.c.log.debug("validating virga propagation adapter")
+ self.c.log.debug("validating lantorrent propagation adapter")
self.ssh = self.p.get_conf_or_none("propagation", "ssh")
if not self.ssh:
@@ -40,7 +40,7 @@ def validate(self):
def translate_to_scp(self, imagestr):
if imagestr[:len(self.scheme)] != self.scheme:
- raise InvalidInput("scp trans invalid virga url, not %s %s" % (self.scheme, imagestr))
+ raise InvalidInput("scp trans invalid lantorrent url, not %s %s" % (self.scheme, imagestr))
url = "scp://" + imagestr[len(self.scheme):]
url_a = url.split("?")
return url_a[0]
@@ -56,14 +56,14 @@ def unpropagate(self, local_absolute_source, remote_target):
def validate_propagate_source(self, imagestr):
# will throw errors if invalid
- self._virga_command("fake", imagestr)
+ self._lt_command("fake", imagestr)
def propagate(self, remote_source, local_absolute_target):
- self.c.log.info("VIRGA propagation - remote source: %s" % remote_source)
- self.c.log.info("VIRGA propagation - local target: %s" % local_absolute_target)
+ self.c.log.info("lantorrent propagation - remote source: %s" % remote_source)
+ self.c.log.info("lantorrent propagation - local target: %s" % local_absolute_target)
- cmd = self._virga_command(local_absolute_target, remote_source)
- self.c.log.info("Running VIRGA command: %s" % cmd)
+ cmd = self._lt_command(local_absolute_target, remote_source)
+ self.c.log.info("Running lantorrent command: %s" % cmd)
ret,output = getstatusoutput(cmd)
if ret:
@@ -73,20 +73,20 @@ def propagate(self, remote_source, local_absolute_target):
raise UnexpectedError(errmsg)
self.c.log.info("Transfer complete.")
- def _virga_command(self, local, remote):
+ def _lt_command(self, local, remote):
"""
- Remote url: virga://hostname:port/path.
+ Remote url: lantorrent://hostname:port/path.
"""
if remote[:len(self.scheme)] != self.scheme:
- raise InvalidInput("get command invalid virga url, not %s %s" % (self.scheme, remote))
+ raise InvalidInput("get command invalid lantorrent url, not %s %s" % (self.scheme, remote))
ra = remote.split("?", 1)
if len(ra) != 2:
- raise InvalidInput("invalid virga url, %s. It must contain parameters for groupid groupcount and remoteexe" % (remote))
+ raise InvalidInput("invalid lantorrent url, %s. It must contain parameters for groupid groupcount and remoteexe" % (remote))
url = ra[0]
- virga_exe = ra[1]
+ lt_exe = ra[1]
up = urlparse.urlparse(url)
xfer_host = up.hostname
@@ -113,16 +113,16 @@ def _virga_command(self, local, remote):
group_count = self.p.get_arg_or_none(wc_args.GROUP_COUNT)
group_count = int(group_count)
except Exception, ex:
- self.c.log.debug("error parsing query string for virga %s" % (str(ex)))
- raise InvalidInput("invalid virga url %s. You must have parametes for remoteexe,groupid, and groupcount." % (remote))
+ self.c.log.debug("error parsing query string for lantorrent %s" % (str(ex)))
+ raise InvalidInput("invalid lantorrent url %s. You must have parametes for remoteexe,groupid, and groupcount." % (remote))
if xfer_user:
xfer_user = xfer_user + "@"
else:
xfer_user = ""
- cmd = self.ssh + " -p %d %s%s %s %s %s %s %d" % (xfer_port, xfer_user, xfer_host, virga_exe, xfer_path, local, group_id, group_count)
+ cmd = self.ssh + " -p %d %s%s %s %s %s %s %d" % (xfer_port, xfer_user, xfer_host, lt_exe, xfer_path, local, group_id, group_count)
- self.c.log.debug("virga command %s " % (cmd))
+ self.c.log.debug("lantorrent command %s " % (cmd))
return cmd
View
2 service/service/java/source/etc/workspace-service/other/authz-callout-ACTIVE.xml
@@ -39,7 +39,7 @@
<property name="repoHost" value="$SSH{service.sshd.contact.string}" />
<property name="repoScheme" value="scp" />
<property name="passthroughSchemes" value="file,hdfs" />
- <property name="virgaFetchPath" value="$COMMON{virga.fetch.path}" />
+ <property name="lantorrentFetchPath" value="$COMMON{lantorrent.fetch.path}" />
</bean>
<bean id="nimbus-rm.service.binding.RepoAdaptor"
View
2 service/service/java/source/etc/workspace-service/other/authz-callout-sql.xml
@@ -39,7 +39,7 @@
<property name="repoHost" value="$SSH{service.sshd.contact.string}" />
<property name="repoScheme" value="scp" />
<property name="passthroughSchemes" value="file,hdfs" />
- <property name="virgaFetchPath" value="$COMMON{virga.fetch.path}" />
+ <property name="lantorrentFetchPath" value="$COMMON{lantorrent.fetch.path}" />
</bean>
<bean id="nimbus-rm.service.binding.RepoAdaptor"
View
2 service/service/java/source/etc/workspace-service/other/common.conf
@@ -65,6 +65,6 @@ caches.dir=$NIMBUS_HOME/services/var/nimbus/caches
msgsinks.dir=$NIMBUS_HOME/services/var/nimbus/msg-sinks
-virga.fetch.path=$NIMBUS_HOME/virga/bin/virga-request
+lantorrent.fetch.path=$NIMBUS_HOME/lantorrent/bin/lt-request
View
14 service/service/java/source/src/org/globus/workspace/sqlauthz/AuthzDecisionLogic.java
@@ -39,7 +39,7 @@
private String repoDir = null;
private boolean schemePassthrough;
private String passthroughSchemes = null;
- private Resource virgaFetchPathResouce;
+ private Resource lantorrentFetchPathResouce;
public AuthzDecisionLogic(
DataSource ds,
@@ -121,7 +121,7 @@ protected String translateCumulus(
String rc = null;
String dataKey = this.authDB.getDataKey(fileIds[1]);
- if(scheme.equals("virga"))
+ if(scheme.equals("lantorrent"))
{
if(vm.getGroupTransferID() == null || vm.getGroupCount() < 2)
{
@@ -132,7 +132,7 @@ protected String translateCumulus(
rc = scheme + "://" + this.getRepoHost() + "/" + dataKey;
try
{
- String params = this.virgaFetchPathResouce.getFile().getAbsolutePath();
+ String params = this.lantorrentFetchPathResouce.getFile().getAbsolutePath();
rc = rc + "?" + params;
}
catch(Exception ex)
@@ -417,14 +417,14 @@ public String getRepoDir()
return this.repoDir;
}
- public void setVirgaFetchPath(Resource up)
+ public void setLantorrentFetchPath(Resource up)
{
- this.virgaFetchPathResouce = up;
+ this.lantorrentFetchPathResouce = up;
}
- public Resource getVirgaFetchPath()
+ public Resource getLantorrentFetchPath()
{
- return this.virgaFetchPathResouce;
+ return this.lantorrentFetchPathResouce;
}
public void setPassthroughSchemes(String passthroughSchemes)

0 comments on commit 9fdfa06

Please sign in to comment.