Examples of TakeSnapshotSP


Examples of com.vmware.aurora.composition.TestSP.TakeSnapshotSP

      ImportVmSP vm0SP = util.testImportVM(vmName, rp);

      String templateId = vm0SP.getResult().getId();

      final String snapshotName = "snapshotname";
      TakeSnapshotSP vm0SnapSP =
            util.testTakeSnapshot(vm0SP.getResult().getId(), snapshotName, "template Snapshot");

      VmSchema vmSchema =
            SchemaUtil.getSchema(new File("./src/test/resources/vmSchema.xml"),
                  VmSchema.class);

      logger.info("Template vm schema: " + templateVmSchema);
      logger.info("vm schema: " + vmSchema);

      SchemaUtil.putXml(vmSchema, new File("vmSchema.xml"));
      SchemaUtil.putXml(templateVmSchema, new File("templateVmSchema.xml"));

      // Update the template information in the new VM diskSchema
      // XXX : TODO need to figure out the best way to represent this
      // By name or by TmObjectId. find in tx layer is by objectId
      vmSchema.diskSchema.setParent(templateId.toString());
      vmSchema.diskSchema.setParentSnap(snapshotName);

      CreateVmSP vm1SP =
            new CreateVmSP("testCompLayer", vmSchema, rp, ds, null, new QueryGuestInfo(3 * 60), null, true, vmFolder);
      vm1SP.call();
      logger.info("Created VM: " + vm1SP.getVM().getName());

      TakeSnapshotSP vm1SnapSP =
            util.testTakeSnapshot(vm1SP.getVM().getId(), snapshotName, "snap0");

      VmSchema vmCloneSchema =
            SchemaUtil.getSchema(new File(
                  "./src/test/resources/vmCloneSchema.xml"), VmSchema.class);
View Full Code Here

Examples of com.vmware.aurora.composition.TestSP.TakeSnapshotSP

    * @param description The description of the snapshot
    * @return : the take snapshot store procedure
    */
   public TakeSnapshotSP testTakeSnapshot(String vmId, String name, String description)
         throws Exception {
      TakeSnapshotSP sp = testSP.new TakeSnapshotSP(vmId, name, description);
      sp.call();
      return sp;
   }
View Full Code Here

Examples of com.vmware.aurora.composition.TestSP.TakeSnapshotSP

      //Import vm -- "PlatformTestVM" as the target test vm.
      ImportVmSP sp0 = new TestUtil().testImportVM(vmName, rp);

      //Take a snapshot for test vm -- snap0
      final String snapshotName = "snap";
      TakeSnapshotSP sp1 =
            new TestUtil().testTakeSnapshot(sp0.getResult().getId(), snapshotName, "snapshot of PlatformTestVM");

      //Clone from imported vm's snapshot -- "snap0".
      String newVmName1 = "clonedVM1";
      CloneVmSP sp2 =
            new TestUtil().testCloneVm(newVmName1, sp0.getResult().getId(),
                  snapshotName, rp, ds, removeDisks, addDisks);
      logger.info("Cloned VM: " + sp2.getResult());

      //Clone from "clonedVM1",first take a snapshot,then clone.
      String newVmName2 = "clonedVM2";
      CloneVmSP sp3 =
            new TestUtil().testCloneVm(newVmName2, sp0.getResult().getId(),
                  snapshotName, rp, ds, removeDisks, addDisks1);
      logger.info("Cloned VM: " + sp3.getResult());

      //Take a snapshot for "clonedVM1" -- snap1
      TakeSnapshotSP sp4 =
            new TestUtil().testTakeSnapshot(sp2.getResult(), snapshotName, "snapshot of clonedVM1");

      //Do a lined clone of "clonedVM1" using snapshot snap1.
      String newVmName3 = "clonedVM3";
      CloneVmSP sp5 =
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.