mirror of https://github.com/apache/jclouds.git
Merge pull request #953 from aledsage/Setting-RunScriptOnNode.Factory
Setting RunScriptOnNode.factory
This commit is contained in:
commit
f1333801dd
|
@ -41,8 +41,8 @@
|
|||
<test.ec2.credential>${test.aws.credential}</test.ec2.credential>
|
||||
<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.windows-template>hardwareId=m1.small,imageNameMatches=Windows_Server-2008-R2_SP1-English-64Bit-Base-WinRM-</test.ec2.windows-template>
|
||||
<test.ec2.windows-owner>449550055360</test.ec2.windows-owner>
|
||||
<!-- 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-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.import>
|
||||
org.jclouds.compute.internal;version="${project.version}",
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.jclouds.scriptbuilder.domain.Statement;
|
|||
|
||||
import com.google.common.annotations.Beta;
|
||||
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.
|
||||
|
@ -36,6 +37,7 @@ import com.google.common.util.concurrent.ListenableFuture;
|
|||
@Beta
|
||||
public interface RunScriptOnNode extends Callable<ExecResponse> {
|
||||
|
||||
@ImplementedBy(org.jclouds.compute.config.BaseComputeServiceContextModule.RunScriptOnNodeFactoryImpl.class)
|
||||
public interface Factory {
|
||||
|
||||
RunScriptOnNode create(NodeMetadata node, Statement script, RunScriptOptions options);
|
||||
|
|
|
@ -104,8 +104,6 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
|
|||
|
||||
install(new PersistNodeCredentialsModule());
|
||||
|
||||
bind(RunScriptOnNode.Factory.class).to(RunScriptOnNodeFactoryImpl.class);
|
||||
|
||||
install(new FactoryModuleBuilder().implement(new TypeLiteral<Callable<Void>>() {
|
||||
}, CustomizeNodeAndAddToGoodMapOrPutExceptionIntoBadMap.class)
|
||||
.implement(new TypeLiteral<Function<AtomicReference<NodeMetadata>, Void>>() {
|
||||
|
@ -124,7 +122,7 @@ public abstract class BaseComputeServiceContextModule extends AbstractModule {
|
|||
}
|
||||
|
||||
@Singleton
|
||||
static class RunScriptOnNodeFactoryImpl implements RunScriptOnNode.Factory {
|
||||
public static class RunScriptOnNodeFactoryImpl implements RunScriptOnNode.Factory {
|
||||
|
||||
static interface Factory {
|
||||
|
||||
|
|
|
@ -41,8 +41,8 @@
|
|||
<test.aws-ec2.credential>${test.aws.credential}</test.aws-ec2.credential>
|
||||
<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.windows-template>hardwareId=m1.small,imageNameMatches=Windows_Server-2008-R2_SP1-English-64Bit-Base-WinRM-</test.aws-ec2.windows-template>
|
||||
<test.aws-ec2.windows-owner>449550055360</test.aws-ec2.windows-owner>
|
||||
<!-- 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-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.import>
|
||||
org.jclouds.compute.internal;version="${project.version}",
|
||||
|
|
Loading…
Reference in New Issue