[Swift-commit] r2172 - provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Aug 4 09:09:38 CDT 2008
Author: benc
Date: 2008-08-04 09:09:37 -0500 (Mon, 04 Aug 2008)
New Revision: 2172
Modified:
provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
Log:
strictattr and permitattr=<attr> options for wonky sites
Modified: provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java
===================================================================
--- provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java 2008-08-02 21:06:38 UTC (rev 2171)
+++ provider-wonky/src/org/globus/cog/abstraction/impl/execution/wonky/JobSubmissionTaskHandler.java 2008-08-04 14:09:37 UTC (rev 2172)
@@ -96,13 +96,27 @@
spec = (JobSpecification) this.task.getSpecification();
} catch (Exception e) {
throw new IllegalSpecException(
- "Exception while retreiving Job Specification", e);
+ "Exception while retrieving Job Specification", e);
}
-
if (logger.isDebugEnabled()) {
logger.debug(spec.toString());
}
+ Collection attributeNames = spec.getAttributeNames();
+ Iterator attributeIterator = attributeNames.iterator();
+
+ if(siteOptions.contains("strictattr")) {
+ logger.debug("Strict attribute checking is enabled");
+ while(attributeIterator.hasNext()) {
+ String attrName = (String)attributeIterator.next();
+ if(!siteOptions.contains("permitattr=" + attrName)) {
+ logger.error("Job specification attribute was passed that should not have been: "+attrName);
+ this.task.setStatus(Status.FAILED);
+ return;
+ }
+ }
+ }
+
try {
if (logger.isInfoEnabled()) {
logger.info("Submitting task " + task);
More information about the Swift-commit
mailing list