Package org.jclouds.virtualbox.domain

Examples of org.jclouds.virtualbox.domain.MasterSpec


      assertEquals(clone.getName(), cloneSpec.getVmSpec().getVmName());

   }

   private IMachine getVmWithGuestAdditionsInstalled() {
      MasterSpec masterSpecForTest = super.getMasterSpecForTest();
      try {
         Injector injector = view.utils().injector();
         return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest);
      } catch (IllegalStateException e) {
         // already created
         return manager.get().getVBox().findMachine(masterSpecForTest.getVmSpec().getVmId());
      }
   }
View Full Code Here


      IVirtualBox vBox = createMock(IVirtualBox.class);
      String vmName = "jclouds-image-my-ubuntu-image";
      StorageController ideController = StorageController.builder().name("IDE Controller").bus(StorageBus.IDE).build();
      VmSpec vmSpec = VmSpec.builder().id(vmName).name(vmName).osTypeId("").memoryMB(1024).controller(ideController)
            .cleanUpMode(CleanupMode.Full).build();
      MasterSpec machineSpec = MasterSpec.builder()
            .iso(IsoSpec.builder().sourcePath("some.iso").installationScript("").build()).vm(vmSpec)
            .network(NetworkSpec.builder().build()).build();
      IMachine createdMachine = createMock(IMachine.class);
      ISession session = createMock(ISession.class);
View Full Code Here

      replay(manager, vBox, machineUtils);

      VmSpec launchSpecification = VmSpec.builder().id(vmName).name(vmName).osTypeId("").memoryMB(1024)
            .cleanUpMode(CleanupMode.Full).build();

      MasterSpec machineSpec = MasterSpec.builder()
            .iso(IsoSpec.builder().sourcePath("some.iso").installationScript("dostuff").build())
            .vm(launchSpecification).network(NetworkSpec.builder().build()).build();
      new CreateAndRegisterMachineFromIsoIfNotAlreadyExists(Suppliers.ofInstance(manager), machineUtils,
            "/tmp/workingDir").apply(machineSpec);
   }
View Full Code Here

      replay(manager, vBox, machineUtils);

      VmSpec launchSpecification = VmSpec.builder().id(vmName).name(vmName).osTypeId("").cleanUpMode(CleanupMode.Full)
            .memoryMB(1024).build();
      MasterSpec machineSpec = MasterSpec.builder()
            .iso(IsoSpec.builder().sourcePath("some.iso").installationScript("dostuff").build())
            .vm(launchSpecification).network(NetworkSpec.builder().build()).build();

      new CreateAndRegisterMachineFromIsoIfNotAlreadyExists(Suppliers.ofInstance(manager), machineUtils,
            "/tmp/workingDir").apply(machineSpec);
View Full Code Here

      NetworkInterfaceCard networkInterfaceCard = NetworkInterfaceCard.builder().addNetworkAdapter(networkAdapter)
               .build();

      NetworkSpec networkSpec = NetworkSpec.builder().addNIC(networkInterfaceCard).build();

      MasterSpec machineSpec = MasterSpec.builder()
               .iso(IsoSpec.builder().sourcePath(operatingSystemIso).installationScript("").build()).vm(vmSpec)
               .network(networkSpec).build();
      IMachine debianNode = view.utils().injector()
               .getInstance(CreateAndRegisterMachineFromIsoIfNotAlreadyExists.class).apply(machineSpec);
      IMachine machine = manager.get().getVBox().findMachine(vmName);
View Full Code Here

      VmSpec vmSpec = VmSpec.builder().id(vmId).name(vmName).memoryMB(512).controller(ideController).cleanUpMode(mode)
               .osTypeId("SomeWeirdUnknownOs").forceOverwrite(true).build();
      IsoSpec isoSpec = IsoSpec.builder().sourcePath(operatingSystemIso).installationScript("").build();
      NetworkSpec networkSpec = NetworkSpec.builder().build();
      MasterSpec machineSpec = MasterSpec.builder().iso(isoSpec).vm(vmSpec).network(networkSpec).build();
      try {
         Injector injector = view.utils().injector();
         injector.getInstance(CreateAndRegisterMachineFromIsoIfNotAlreadyExists.class).apply(machineSpec);
         fail();
      } catch (VBoxException e) {
View Full Code Here

            } catch (URISyntaxException e1) {
               logger.error("Cannot start the preseed server", e);
               throw e;
            }

            MasterSpec masterSpec = buildMasterSpecFromYaml(currentImage, vmName);
            masterMachine = masterCreatorAndInstaller.apply(masterSpec);
            master = Master.builder().machine(masterMachine).spec(masterSpec).build();
         } else {
            logger.error("Problem during master creation", e);
            throw e;
View Full Code Here

               .apply(cloneSpec);
      assertTrue(isLinkedClone().apply(clone));
   }

   private IMachine getVmWithGuestAdditionsInstalled() {
      MasterSpec masterSpecForTest = super.getMasterSpecForTest();
      try {
         Injector injector = view.utils().injector();
         return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest);
      } catch (IllegalStateException e) {
         // already created
         return manager.get().getVBox().findMachine(masterSpecForTest.getVmSpec().getVmId());
      }
   }
View Full Code Here

      return new CloneAndRegisterMachineFromIMachineIfNotAlreadyExists(manager, workingDir, machineUtils)
               .apply(cloneSpec);
   }

   private IMachine getVmWithGuestAdditionsInstalled() {
      MasterSpec masterSpecForTest = getMasterSpecForTest();
      try {
         Injector injector = view.utils().injector();
         return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest);
      } catch (IllegalStateException e) {
         // already created
         return manager.get().getVBox().findMachine(masterSpecForTest.getVmSpec().getVmId());
      }
   }
View Full Code Here

      return new CloneAndRegisterMachineFromIMachineIfNotAlreadyExists(manager, workingDir, machineUtils)
               .apply(cloneSpec);
   }
  
   private IMachine getVmWithGuestAdditionsInstalled() {
      MasterSpec masterSpecForTest = super.getMasterSpecForTest();
      try {
         Injector injector = view.utils().injector();
         return injector.getInstance(CreateAndInstallVm.class).apply(masterSpecForTest);
      } catch (IllegalStateException e) {
         return manager.get().getVBox().findMachine(masterSpecForTest.getVmSpec().getVmId());
      }
   }
View Full Code Here

TOP

Related Classes of org.jclouds.virtualbox.domain.MasterSpec

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.