Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
cahing how fetcher is populated
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzTroll committed Sep 13, 2010
1 parent 67e78a1 commit db8e594
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
Expand Up @@ -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="urlParams" value="remoteexe=$COMMON{virga.fetch.path}" />
<property name="virgaFetchPath" value="$COMMON{virga.fetch.path}" />
</bean>

<bean id="nimbus-rm.service.binding.RepoAdaptor"
Expand Down
Expand Up @@ -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="urlParams" value="remoteexe=$COMMON{virga.fetch.path}" />
<property name="virgaFetchPath" value="$COMMON{virga.fetch.path}" />
</bean>

<bean id="nimbus-rm.service.binding.RepoAdaptor"
Expand Down
Expand Up @@ -10,6 +10,7 @@
import org.globus.workspace.service.binding.authorization.Decision;
import org.globus.workspace.service.binding.vm.VirtualMachine;
import org.globus.workspace.service.binding.vm.VirtualMachinePartition;
import org.nimbustools.api.brain.NimbusHomePathResolver;
import org.nimbustools.api.services.rm.AuthorizationException;
import org.nimbustools.api.services.rm.ResourceRequestDeniedException;
import org.nimbus.authz.AuthzDBAdapter;
Expand Down Expand Up @@ -38,12 +39,14 @@ public class AuthzDecisionLogic extends DecisionLogic
private String repoDir = null;
private boolean schemePassthrough;
private String passthroughSchemes = null;
private Resource urlParams;
private Resource virgaFetchPathResouce;

public AuthzDecisionLogic(
DataSource ds,
String schemePassthroughStr)
{
// String nh = System.getProperty(NimbusHomePathResolver.NIMBUS_HOME_ENV_NAME);
// might want to set default path some time
this.authDB = new AuthzDBAdapter(ds);
this.schemePassthrough =
schemePassthroughStr != null
Expand Down Expand Up @@ -128,7 +131,7 @@ protected String translateCumulus(
{
rc = scheme + "://" + this.getRepoHost() + "/" + dataKey;
String params = "groupid=" + vm.getGroupTransferID() + ";groupcount=" + vm.getGroupCount();
params = params + ";" + this.urlParams.toString();
params = params + ";remoteexe=" + this.virgaFetchPathResouce.getFilename();
rc = rc + "?" + params;
}
}
Expand Down Expand Up @@ -408,14 +411,14 @@ public String getRepoDir()
return this.repoDir;
}

public void setUrlParams(Resource up)
public void setVirgaFetchPath(Resource up)
{
this.urlParams = up;
this.virgaFetchPathResouce = up;
}

public Resource getUrlParams()
public Resource getVirgaFetchPath()
{
return this.urlParams;
return this.virgaFetchPathResouce;
}

public void setPassthroughSchemes(String passthroughSchemes)
Expand Down
3 changes: 1 addition & 2 deletions tests/ec2_submit_many.py
Expand Up @@ -12,7 +12,6 @@
import ConfigParser
from ConfigParser import SafeConfigParser
import time
import pynimbusauthz
import tempfile
import traceback
import filecmp
Expand All @@ -23,7 +22,6 @@
from boto.s3.connection import OrdinaryCallingFormat
from boto.s3.connection import VHostCallingFormat
from boto.s3.connection import SubdomainCallingFormat
from pynimbusauthz.cmd_opts import cbOpts
from boto.s3.connection import S3Connection
from boto.ec2.connection import EC2Connection

Expand Down Expand Up @@ -69,6 +67,7 @@ def main(argv=sys.argv[1:]):

print "getting connection"
ec2conn = EC2Connection(s3id, pw, host='locahost', port=8444, debug=2)
ec2conn.host = 'localhost'
print "getting image"
image = ec2conn.get_image(imagename)
print "running"
Expand Down

0 comments on commit db8e594

Please sign in to comment.