got the clone to get networking

This commit is contained in:
David Ribeiro Alves 2012-03-06 03:12:16 +00:00
parent 2421847527
commit 4850ffe759
3 changed files with 6 additions and 6 deletions

View File

@ -123,7 +123,7 @@ public class CreateAndInstallVm implements Function<MasterSpec, IMachine> {
NodeMetadata vmMetadata = imachineToNodeMetadata.apply(vm); NodeMetadata vmMetadata = imachineToNodeMetadata.apply(vm);
ListenableFuture<ExecResponse> execFuture = machineUtils.runScriptOnNode(vmMetadata, call("cleanupUdevIfNeeded"), ListenableFuture<ExecResponse> execFuture = machineUtils.runScriptOnNode(vmMetadata, call("cleanupUdevIfNeeded"),
RunScriptOptions.NONE); RunScriptOptions.Builder.runAsRoot(true));
ExecResponse execResponse = Futures.getUnchecked(execFuture); ExecResponse execResponse = Futures.getUnchecked(execFuture);
checkState(execResponse.getExitCode() == 0); checkState(execResponse.getExitCode() == 0);

View File

@ -89,7 +89,7 @@ public class NodeCreator implements Function<NodeSpec, NodeAndInitialCredentials
NetworkSpec networkSpec = NetworkSpec.builder().addNIC(0L, networkInterfaceCard).build(); NetworkSpec networkSpec = NetworkSpec.builder().addNIC(0L, networkInterfaceCard).build();
CloneSpec cloneSpec = CloneSpec.builder().linked(true).master(master.getMachine()).network(networkSpec) CloneSpec cloneSpec = CloneSpec.builder().linked(false).master(master.getMachine()).network(networkSpec)
.vm(cloneVmSpec).build(); .vm(cloneVmSpec).build();
IMachine cloned = cloner.apply(cloneSpec); IMachine cloned = cloner.apply(cloneSpec);

View File

@ -35,7 +35,7 @@ import org.virtualbox_4_1.IMachine;
import com.google.common.collect.Iterables; import com.google.common.collect.Iterables;
@Test(groups = "plive", singleThreaded = true, testName = "VirtualBoxComputeServiceAdapterLiveTest", enabled = false) @Test(groups = "plive", singleThreaded = true, testName = "VirtualBoxComputeServiceAdapterLiveTest")
public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClientLiveTest { public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClientLiveTest {
private VirtualBoxComputeServiceAdapter adapter; private VirtualBoxComputeServiceAdapter adapter;
@ -47,7 +47,7 @@ public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClien
adapter = context.utils().injector().getInstance(VirtualBoxComputeServiceAdapter.class); adapter = context.utils().injector().getInstance(VirtualBoxComputeServiceAdapter.class);
} }
@Test(enabled = false) @Test
public void testCreateNodeWithGroupEncodedIntoNameThenStoreCredentials() { public void testCreateNodeWithGroupEncodedIntoNameThenStoreCredentials() {
String group = "foo"; String group = "foo";
String name = "foo-ef4"; String name = "foo-ef4";
@ -83,13 +83,13 @@ public class VirtualBoxComputeServiceAdapterLiveTest extends BaseVirtualBoxClien
} }
} }
@Test(enabled = false) @Test
public void testListHardwareProfiles() { public void testListHardwareProfiles() {
Iterable<IMachine> profiles = adapter.listHardwareProfiles(); Iterable<IMachine> profiles = adapter.listHardwareProfiles();
assertEquals(1, Iterables.size(profiles)); assertEquals(1, Iterables.size(profiles));
} }
@Test(enabled = false) @Test
public void testListImages() { public void testListImages() {
Iterable<Image> iMageIterable = adapter.listImages(); Iterable<Image> iMageIterable = adapter.listImages();
for (Image image : iMageIterable) { for (Image image : iMageIterable) {