Package com.vmware.aurora.composition

Examples of com.vmware.aurora.composition.CreateVMFolderSP


      Folder rootFolder =
            VcResourceUtils.findFolderByNameList(templateVm.getDatacenter(),
                  folderList);

      if (rootFolder == null) {
         CreateVMFolderSP sp =
               new CreateVMFolderSP(templateVm.getDatacenter(), null,
                     folderList);
         Callable<Void>[] storeProcedures = new Callable[1];
         storeProcedures[0] = sp;
         Map<String, Folder> folders =
               executeFolderCreationProcedures(null, storeProcedures);
View Full Code Here


         String[] folderNames = path.split("/");
         List<String> folderList = new ArrayList<String>();
         for (int i = 0; i < folderNames.length - 1; i++) {
            folderList.add(folderNames[i]);
         }
         CreateVMFolderSP sp =
               new CreateVMFolderSP(templateVm.getDatacenter(), null,
                     folderList);
         storeProcedures[0] = sp;
         Map<String, Folder> folders =
               executeFolderCreationProcedures(cluster, storeProcedures);
         for (String name : folders.keySet()) {
            clusterFolder = folders.get(name);
            break;
         }
      }
      logger.info("createVcFolders, start to create group Folders.");
      storeProcedures = new Callable[cluster.getNodeGroups().length];
      int i = 0;
      for (NodeGroupCreate group : cluster.getNodeGroups()) {
         List<String> folderList = new ArrayList<String>();
         folderList.add(group.getName());
         CreateVMFolderSP sp =
               new CreateVMFolderSP(templateVm.getDatacenter(), clusterFolder,
                     folderList);
         storeProcedures[i] = sp;
         i++;
      }
      return executeFolderCreationProcedures(cluster, storeProcedures);
View Full Code Here

         }

         int total = 0;
         boolean success = true;
         for (int i = 0; i < storeProcedures.length; i++) {
            CreateVMFolderSP sp = (CreateVMFolderSP) storeProcedures[i];
            if (result[i].finished && result[i].throwable == null) {
               ++total;
               Folder childFolder =
                     sp.getResult().get(sp.getResult().size() - 1);
               folders.put(childFolder.getName(), childFolder);
            } else if (result[i].throwable != null) {
               logger.error("Failed to create vm folder", result[i].throwable);
               success = false;
            }
View Full Code Here

         boolean flag = getFlag(operation);
         ExecutionResult r = null;
         if (flag) {
            r = new ExecutionResult(true, null);
            if (operation == VmOperation.CREATE_FOLDER) {
               CreateVMFolderSP sp = (CreateVMFolderSP)storedProcedures[i];
               setReturnFolder(sp);
            } else if (operation == VmOperation.CREATE_VM) {
               CreateVmSP sp = (CreateVmSP)storedProcedures[i];
               setReturnVM(sp);
            }
View Full Code Here

TOP

Related Classes of com.vmware.aurora.composition.CreateVMFolderSP

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.