[Swift-commit] r7475 - trunk/bin
davidk at ci.uchicago.edu
davidk at ci.uchicago.edu
Wed Jan 15 23:24:31 CST 2014
Author: davidk
Date: 2014-01-15 23:24:31 -0600 (Wed, 15 Jan 2014)
New Revision: 7475
Modified:
trunk/bin/swiftrun
Log:
Allow more flexibility with providers
Modified: trunk/bin/swiftrun
===================================================================
--- trunk/bin/swiftrun 2014-01-14 18:48:29 UTC (rev 7474)
+++ trunk/bin/swiftrun 2014-01-16 05:24:31 UTC (rev 7475)
@@ -135,10 +135,12 @@
my $ccount = ($value =~ s/:/:/g);
my $jobmanager = "";
my $jobmanagerURL = "";
+ my $provider = "";
# With no separators, assume local
if( $ccount == 0 ) {
$jobmanager = "local:$value";
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\"/>\n";
}
# With one separator, use ssh-cl and assume hostname:type
@@ -146,6 +148,7 @@
(my $first, my $second) = split(':', $value);
$jobmanager = "ssh-cl:$second";
$jobmanagerURL = "$first";
+ return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
}
# Other, in the format of proto:host:jobMgr
@@ -153,13 +156,16 @@
(my $first, my $second, my $third) = split(':', $value);
$jobmanager="$first:$third";
$jobmanagerURL = "$second";
- }
-
- if ( defined($jobmanagerURL) && length($jobmanagerURL) > 0) {
return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
- } else {
- return "<execution provider=\"coaster\" jobmanager=\"" . $jobmanager . "\"/>\n";
}
+
+ elsif ( $ccount == 3) {
+ (my $first, my $second, my $third, my $fourth) = split(':', $value);
+ $provider=$first;
+ $jobmanager="$second:$third";
+ $jobmanagerURL="$fourth";
+ return "<execution provider=\"$provider\" jobmanager=\"" . $jobmanager . "\" url=\"" . $jobmanagerURL . "\"/>\n";
+ }
}
elsif ( $property eq "workdir" ) { return "<workdirectory>$value</workdirectory>\n"; }
More information about the Swift-commit
mailing list