mirror of https://github.com/apache/jclouds.git
added missing location spec
This commit is contained in:
parent
176f528572
commit
ae3a9e4f64
|
@ -31,6 +31,7 @@ import org.jclouds.compute.strategy.DestroyNodeStrategy;
|
|||
import org.jclouds.compute.strategy.GetNodeMetadataStrategy;
|
||||
import org.jclouds.compute.strategy.ListNodesStrategy;
|
||||
import org.jclouds.compute.strategy.RebootNodeStrategy;
|
||||
import org.jclouds.domain.Location;
|
||||
|
||||
import com.google.common.base.Supplier;
|
||||
import com.google.common.collect.Sets;
|
||||
|
@ -64,6 +65,7 @@ public abstract class StandaloneComputeServiceContextModule extends BaseComputeS
|
|||
private Class<? extends RebootNodeStrategy> rebootNodeStrategy;
|
||||
private Class<? extends Supplier<Set<? extends Hardware>>> hardwareSupplier;
|
||||
private Class<? extends Supplier<Set<? extends Image>>> imageSupplier;
|
||||
private Class<? extends Supplier<Set<? extends Location>>> locationSupplier = LocationSupplier.class;
|
||||
|
||||
public Builder install(Module module) {
|
||||
this.modules.add(module);
|
||||
|
@ -105,6 +107,11 @@ public abstract class StandaloneComputeServiceContextModule extends BaseComputeS
|
|||
return this;
|
||||
}
|
||||
|
||||
public Builder defineLocationSupplier(Class<? extends Supplier<Set<? extends Location>>> locationSupplier) {
|
||||
this.locationSupplier = locationSupplier;
|
||||
return this;
|
||||
}
|
||||
|
||||
public StandaloneComputeServiceContextModule build() {
|
||||
return new StandaloneComputeServiceContextModule() {
|
||||
|
||||
|
@ -143,6 +150,10 @@ public abstract class StandaloneComputeServiceContextModule extends BaseComputeS
|
|||
return rebootNodeStrategy;
|
||||
}
|
||||
|
||||
protected Class<? extends Supplier<Set<? extends Location>>> defineLocationSupplier() {
|
||||
return locationSupplier;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void configure() {
|
||||
for (Module module : modules)
|
||||
|
|
Loading…
Reference in New Issue