mirror of https://github.com/apache/jclouds.git
Renamed IsoToIMachine to CreateAndInstallVm.
This commit is contained in:
parent
9965d76e91
commit
5a2d2303a7
|
@ -47,7 +47,7 @@ import static org.jclouds.virtualbox.util.MachineUtils.*;
|
|||
import static org.virtualbox_4_1.LockType.Shared;
|
||||
import static org.virtualbox_4_1.LockType.Write;
|
||||
|
||||
public class IsoToIMachine implements Function<VmSpec, IMachine> {
|
||||
public class CreateAndInstallVm implements Function<VmSpec, IMachine> {
|
||||
|
||||
@Resource
|
||||
@Named(ComputeServiceConstants.COMPUTE_LOGGER)
|
||||
|
@ -63,9 +63,9 @@ public class IsoToIMachine implements Function<VmSpec, IMachine> {
|
|||
private final ExecutionType executionType;
|
||||
|
||||
@Inject
|
||||
public IsoToIMachine(VirtualBoxManager manager, String guestId, ComputeServiceContext context,
|
||||
String hostId, Predicate<IPSocket> socketTester,
|
||||
String webServerHost, int webServerPort, ExecutionType executionType) {
|
||||
public CreateAndInstallVm(VirtualBoxManager manager, String guestId, ComputeServiceContext context,
|
||||
String hostId, Predicate<IPSocket> socketTester,
|
||||
String webServerHost, int webServerPort, ExecutionType executionType) {
|
||||
this.manager = manager;
|
||||
this.guestId = guestId;
|
||||
this.context = context;
|
|
@ -91,7 +91,7 @@ public class CloneAndRegisterMachineFromIsoIfNotAlreadyExistsLiveTest extends Ba
|
|||
VmSpec vmSpecification = VmSpec.builder().id(vmId).name(vmName).osTypeId(osTypeId)
|
||||
.controller(ideController)
|
||||
.forceOverwrite(true).build();
|
||||
return new IsoToIMachine(manager, guestId, localHostContext, hostId, socketTester,
|
||||
return new CreateAndInstallVm(manager, guestId, localHostContext, hostId, socketTester,
|
||||
"127.0.0.1", 8080, HEADLESS).apply(vmSpecification);
|
||||
} catch (IllegalStateException e) {
|
||||
// already created
|
||||
|
|
|
@ -56,8 +56,8 @@ import static org.testng.Assert.assertTrue;
|
|||
/**
|
||||
* @author Andrea Turli, Mattias Holmqvist
|
||||
*/
|
||||
@Test(groups = "live", singleThreaded = true, testName = "IsoToIMachineLiveTest")
|
||||
public class IsoToIMachineLiveTest extends BaseVirtualBoxClientLiveTest {
|
||||
@Test(groups = "live", singleThreaded = true, testName = "CreateAndInstallVmLiveTest")
|
||||
public class CreateAndInstallVmLiveTest extends BaseVirtualBoxClientLiveTest {
|
||||
|
||||
Map<OsFamily, Map<String, String>> map = new BaseComputeServiceContextModule() {
|
||||
}.provideOsVersionMap(new ComputeServiceConstants.ReferenceData(), Guice.createInjector(new GsonModule())
|
||||
|
@ -94,7 +94,7 @@ public class IsoToIMachineLiveTest extends BaseVirtualBoxClientLiveTest {
|
|||
.controller(ideController)
|
||||
.forceOverwrite(true)
|
||||
.natNetworkAdapter(0, NatAdapter.builder().tcpRedirectRule("127.0.0.1", 2222, "", 22).build()).build();
|
||||
IMachine imageMachine = new IsoToIMachine(manager, guestId, localHostContext, hostId,
|
||||
IMachine imageMachine = new CreateAndInstallVm(manager, guestId, localHostContext, hostId,
|
||||
socketTester, "127.0.0.1", 8080, HEADLESS)
|
||||
.apply(vmSpecification);
|
||||
|
|
@ -11,7 +11,7 @@ import org.jclouds.virtualbox.BaseVirtualBoxClientLiveTest;
|
|||
import org.jclouds.virtualbox.domain.ExecutionType;
|
||||
import org.jclouds.virtualbox.domain.StorageController;
|
||||
import org.jclouds.virtualbox.domain.VmSpec;
|
||||
import org.jclouds.virtualbox.functions.IsoToIMachine;
|
||||
import org.jclouds.virtualbox.functions.CreateAndInstallVm;
|
||||
import org.jclouds.virtualbox.functions.LaunchMachineIfNotAlreadyRunning;
|
||||
import org.jclouds.virtualbox.util.PropertyUtils;
|
||||
import org.testng.annotations.Test;
|
||||
|
@ -74,7 +74,7 @@ public class SshAvailableLiveTest extends BaseVirtualBoxClientLiveTest {
|
|||
.controller(ideController)
|
||||
.forceOverwrite(true).build();
|
||||
|
||||
return new IsoToIMachine(manager, guestId, localHostContext,
|
||||
return new CreateAndInstallVm(manager, guestId, localHostContext,
|
||||
hostId, socketTester, "127.0.0.1", 8080, HEADLESS).apply(vmSpecification);
|
||||
} catch (IllegalStateException e) {
|
||||
// already created
|
||||
|
|
Loading…
Reference in New Issue