Examples of Vm


Examples of net.sf.jabref.bst.VM

      + "  year = {2005},\n" + "  owner = {oezbek},\n" + "  timestamp = {2006.05.29},\n"
      + "  url = {http://james.howison.name/publications.html}}\n";
  }

  public void testHypthenatedName() throws RecognitionException, IOException {
    VM vm = new VM(new File("src/tests/net/sf/jabref/bst/abbrv.bst"));
    Vector<BibtexEntry> v = new Vector<BibtexEntry>();
    v.add(bibtexString2BibtexEntry("@article{canh05, author = \"Jean-Paul Sartre\" }"));
    assertTrue(vm.run(v).indexOf("J.-P. Sartre") != -1);
  }
View Full Code Here

Examples of org.ethereum.vm.VM

        repository.createAccount(contractAddrB);
        repository.saveCode(contractAddrB, codeB);
        repository.addStorageRow(contractAddrB, key1, value1);

        // Play the program
        VM vm = new VM();
        Program program = new Program(codeB, pi);

        try {
            while(!program.isStopped())
                vm.step(program);
        } catch (RuntimeException e) {
            program.setRuntimeFailure(e);
        }

        System.out.println();
View Full Code Here

Examples of org.hyperic.sigar.vmware.VM

    protected boolean validateArgs(String[] args) {
        return args.length == 2;
    }

    public void output(String[] args) throws SigarException {
        VM vm = new VM();
        vm.connect(new ConnectParams(), args[1], true);
        String cmd = args[0];
        if (cmd.equals("createSnapshot")) {
            vm.createSnapshot(null, null, true, true);
        }
        else if (cmd.equals("deleteSnapshot")) {
            vm.removeAllSnapshots();
        }
        else if (cmd.equals("revertToSnapshot")) {
            vm.revertToSnapshot();
        }
        else {
            throw new SigarException("Unknown ctl: " + cmd);
        }
    }
View Full Code Here

Examples of org.jclouds.savvis.vpdc.domain.VM

      if (task.getError() != null)
         throw new RuntimeException("cloud not add vm: " + task.getError().toString());

      if (taskTester.apply(task.getId())) {
         try {
            VM returnVal = this.getNode(task.getResult().getHref().toASCIIString());
            return new NodeAndInitialCredentials<VM>(returnVal, returnVal.getId(), null);
         } finally {
            // TODO: get the credentials relevant to the billingSiteId/Org
            // credentialStore.put(id, new Credentials(orgId, orgUser));
         }
      } else {
View Full Code Here

Examples of org.jclouds.savvis.vpdc.domain.VM

               public boolean apply(Resource arg0) {
                  return VCloudMediaType.VAPP_XML.equals(arg0.getType());
               }

            })) {
               VM response = api.getVMInVDC(org.getId(), vdc.getId(), vApp.getId());
               assertNotNull(response);
               assertNotNull(response.getId());
               assertNotNull(response.getHref());
               assertNotNull(response.getName());
               assertEquals(response.getType(), "application/vnd.vmware.vcloud.vApp+xml");
               assert (response.getNetworkConnectionSections().size() > 0) : response;
               for (NetworkConnectionSection networkConnection : response.getNetworkConnectionSections())
                  assertNotNull(networkConnection.getIpAddress());
               assertNotNull(response.getStatus());
               assertNotNull(response.getOperatingSystemSection().getDescription());
               assertNotNull(response.getOperatingSystemSection().getId());
               assertNotNull(response.getNetworkSection());
               assertNotNull(response.getVirtualHardwareSections());
               // power state is the only thing that should change
               assertEquals(api.getVMInVDC(org.getId(), vdc.getId(), response.getId(), withPowerState()).toString()
                        .replaceFirst("status=[A-Z]+", ""), response.toString().replaceFirst("status=[A-Z]+", ""));

               // check one ip is valid
               String ip = Iterables.get(response.getNetworkConnectionSections(), 0).getIpAddress();
               assert HostSpecifier.isValid(ip) : response;
               if (InetAddresses2.isPrivateIPAddress(ip)) {
                 // get public ip
                  ip = Iterables.get(response.getNetworkConfigSections(), 0).getInternalToExternalNATRules().get(ip);
                  // could be null
                  if(ip != null){
                    assert HostSpecifier.isValid(ip) : response;
                  }
               }
View Full Code Here

Examples of org.jclouds.savvis.vpdc.domain.VM

public class VMHandlerTest {
   public void testVCloud1_0() {
      InputStream is = getClass().getResourceAsStream("/vm.xml");
      Injector injector = Guice.createInjector(new SaxParserModule());
      Factory factory = injector.getInstance(ParseSax.Factory.class);
      VM result = factory.create(injector.getInstance(VMHandler.class)).parse(is);

      VM expected = VM
               .builder()
               .id("1001")
               .status(VM.Status.ON)
               .name("znHost2")
               .type("application/vnd.vmware.vcloud.vApp+xml")
View Full Code Here

Examples of org.jclouds.smartos.compute.domain.VM

      VmSpecification specification = builder.alias(name)
               .dataset(getHost().getDataSet(UUID.fromString(template.getImage().getProviderId())))
               .build();

      VM from = getHost().createVM(specification);

      return new NodeAndInitialCredentials<VM>(from, from.getUuid() + "", LoginCredentials.builder().user("smartos")
               .password("smartos").build());
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.Vm

               .build());
     
      Set<Vm> vms = getAvailableVMsFromVAppTemplate(vAppTemplate);
         
      // get the first vm to be added to vApp
      Vm toAddVm = Iterables.get(vms, 0);

      // TODO clean up network config of the vm
      //cleanUpNetworkConnectionSection(toAddVm);
     
      RecomposeVAppParams params = addRecomposeParams(composedVApp, toAddVm);

      // The method under test
      Task recomposeVApp = vAppApi.recompose(composedVApp.getId(), params);
      assertTaskSucceedsLong(recomposeVApp);

      // remove a vm
      VApp configured = vAppApi.get(composedVApp.getId());
      List<Vm> vmsToBeDeleted = configured.getChildren().getVms();
      Vm toBeDeleted = Iterables.find(vmsToBeDeleted, new Predicate<Vm>() {

         @Override
         public boolean apply(Vm vm) {
            return vm.getName().startsWith("vm-");
         }
     
      });
      Task removeVm = vmApi.remove(toBeDeleted.getId());
      assertTaskSucceedsLong(removeVm);
     
      Task deleteVApp = vAppApi.remove(composedVApp.getHref());
      assertTaskSucceedsLong(deleteVApp);
   }
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.Vm

   /**
    * Power on a {@link Vm}.
    */
   protected Vm powerOnVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_ON) {
         Task powerOn = vmApi.powerOn(vmUrn);
         assertTaskSucceedsLong(powerOn);
      }
      test = vmApi.get(vmUrn);
View Full Code Here

Examples of org.jclouds.vcloud.director.v1_5.domain.Vm

   /**
    * Power off a {@link Vm}.
    */
   protected Vm powerOffVm(String vmUrn) {
      Vm test = vmApi.get(vmUrn);
      Status status = test.getStatus();
      if (status != Status.POWERED_OFF || test.isDeployed()) {
         UndeployVAppParams undeployParams = UndeployVAppParams.builder().build();
         Task shutdownVapp = vmApi.undeploy(vmUrn, undeployParams);
         assertTaskSucceedsLong(shutdownVapp);
      }
      test = vmApi.get(vmUrn);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.