Merge pull request #953 from aledsage/Setting-RunScriptOnNode.Factory

Setting RunScriptOnNode.factory
This commit is contained in:
Adrian Cole 2012-11-04 17:12:18 -08:00
commit f1333801dd
4 changed files with 7 additions and 7 deletions

View File

@ -41,8 +41,8 @@
<test.ec2.credential>${test.aws.credential}</test.ec2.credential> <test.ec2.credential>${test.aws.credential}</test.ec2.credential>
<test.ec2.template></test.ec2.template> <test.ec2.template></test.ec2.template>
<test.ec2.ebs-template>hardwareId=m1.small,imageId=us-west-2/ami-38c64a08</test.ec2.ebs-template> <test.ec2.ebs-template>hardwareId=m1.small,imageId=us-west-2/ami-38c64a08</test.ec2.ebs-template>
<test.ec2.windows-template>hardwareId=m1.small,imageNameMatches=Windows_Server-2008-R2_SP1-English-64Bit-Base-WinRM-</test.ec2.windows-template> <!-- Windows_Server-2008-R2 with WinRM enabled (setup instructions at http://www.frontiertown.co.uk/2011/12/overthere-control-windows-from-java/) -->
<test.ec2.windows-owner>449550055360</test.ec2.windows-owner> <test.ec2.windows-template>hardwareId=m1.small,imageId=us-east-1/ami-0cb76d65</test.ec2.windows-template>
<jclouds.osgi.export>org.jclouds.ec2*;version="${project.version}"</jclouds.osgi.export> <jclouds.osgi.export>org.jclouds.ec2*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import> <jclouds.osgi.import>
org.jclouds.compute.internal;version="${project.version}", org.jclouds.compute.internal;version="${project.version}",

View File

@ -27,6 +27,7 @@ import org.jclouds.scriptbuilder.domain.Statement;
import com.google.common.annotations.Beta; import com.google.common.annotations.Beta;
import com.google.common.util.concurrent.ListenableFuture; import com.google.common.util.concurrent.ListenableFuture;
import com.google.inject.ImplementedBy;
/** /**
* Separates out how one implements the ability to run a script on a node. * Separates out how one implements the ability to run a script on a node.
@ -36,6 +37,7 @@ import com.google.common.util.concurrent.ListenableFuture;
@Beta @Beta
public interface RunScriptOnNode extends Callable<ExecResponse> { public interface RunScriptOnNode extends Callable<ExecResponse> {
@ImplementedBy(org.jclouds.compute.config.BaseComputeServiceContextModule.RunScriptOnNodeFactoryImpl.class)
public interface Factory { public interface Factory {
RunScriptOnNode create(NodeMetadata node, Statement script, RunScriptOptions options); RunScriptOnNode create(NodeMetadata node, Statement script, RunScriptOptions options);

View File

@ -104,8 +104,6 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
install(new PersistNodeCredentialsModule()); install(new PersistNodeCredentialsModule());
bind(RunScriptOnNode.Factory.class).to(RunScriptOnNodeFactoryImpl.class);
install(new FactoryModuleBuilder().implement(new TypeLiteral<Callable<Void>>() { install(new FactoryModuleBuilder().implement(new TypeLiteral<Callable<Void>>() {
}, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.class) }, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.class)
.implement(new TypeLiteral<Function<AtomicReference<NodeMetadata>, Void>>() { .implement(new TypeLiteral<Function<AtomicReference<NodeMetadata>, Void>>() {
@ -124,7 +122,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
} }
@Singleton @Singleton
static class RunScriptOnNodeFactoryImpl implements RunScriptOnNode.Factory { public static class RunScriptOnNodeFactoryImpl implements RunScriptOnNode.Factory {
static interface Factory { static interface Factory {

View File

@ -41,8 +41,8 @@
<test.aws-ec2.credential>${test.aws.credential}</test.aws-ec2.credential> <test.aws-ec2.credential>${test.aws.credential}</test.aws-ec2.credential>
<test.aws-ec2.template></test.aws-ec2.template> <test.aws-ec2.template></test.aws-ec2.template>
<test.aws-ec2.ebs-template>hardwareId=m1.small,imageId=us-west-2/ami-38c64a08</test.aws-ec2.ebs-template> <test.aws-ec2.ebs-template>hardwareId=m1.small,imageId=us-west-2/ami-38c64a08</test.aws-ec2.ebs-template>
<test.aws-ec2.windows-template>hardwareId=m1.small,imageNameMatches=Windows_Server-2008-R2_SP1-English-64Bit-Base-WinRM-</test.aws-ec2.windows-template> <!-- Windows_Server-2008-R2 with WinRM enabled (setup instructions at http://www.frontiertown.co.uk/2011/12/overthere-control-windows-from-java/) -->
<test.aws-ec2.windows-owner>449550055360</test.aws-ec2.windows-owner> <test.aws-ec2.windows-template>hardwareId=m1.small,imageId=us-east-1/ami-0cb76d65</test.aws-ec2.windows-template>
<jclouds.osgi.export>org.jclouds.aws.ec2*;version="${project.version}"</jclouds.osgi.export> <jclouds.osgi.export>org.jclouds.aws.ec2*;version="${project.version}"</jclouds.osgi.export>
<jclouds.osgi.import> <jclouds.osgi.import>
org.jclouds.compute.internal;version="${project.version}", org.jclouds.compute.internal;version="${project.version}",