Package com.vmware.bdd.service.sp

Examples of com.vmware.bdd.service.sp.SetVMPasswordSP


      logger.info("Nodes needed to be set password: " + ipsOfNodes.toString());

      boolean succeed = true;
      List<Callable<Void>> storeProcedures = new ArrayList<Callable<Void>>();
      for (NodeEntity node : nodes) {
         SetVMPasswordSP setVMPasswordSP = new SetVMPasswordSP(node, password);
         storeProcedures.add(setVMPasswordSP);
         clusterEntityMgr.updateNodeAction(node, Constants.NODE_ACTION_SETTING_PASSWORD);
      }
      AuAssert.check(!storeProcedures.isEmpty());

      try {
         Callable<Void>[] storeProceduresArray =
               storeProcedures.toArray(new Callable[0]);
         NoProgressUpdateCallback callback = new NoProgressUpdateCallback();
         ExecutionResult[] result =
               Scheduler
                     .executeStoredProcedures(
                           com.vmware.aurora.composition.concurrent.Priority.BACKGROUND,
                           storeProceduresArray, callback);

         for (int i = 0; i < storeProceduresArray.length; i++) {
            SetVMPasswordSP sp = (SetVMPasswordSP) storeProceduresArray[i];
            NodeEntity node = sp.getNodeEntity();
            String vmNameWithIP = node.getVmNameWithIP();
            if (result[i].finished && result[i].throwable == null) {
               updateNodeData(node, true, null, null);
               logger.info("Set password store procedure succeed for "
                     + vmNameWithIP);
View Full Code Here


   @Override
   public boolean setPasswordForNode(String clusterName, NodeEntity node,
         String password) {
      AuAssert.check(clusterName != null && node != null);

      SetVMPasswordSP setVMPasswordSP = new SetVMPasswordSP(node, password);
      String vmNameWithIP = node.getVmNameWithIP();
      try {
         clusterEntityMgr.updateNodeAction(node, Constants.NODE_ACTION_SETTING_PASSWORD);
         if (setVMPasswordSP.setPasswordForNode()) {
            updateNodeData(node, true, null, null);
            logger.info("Set password for " + vmNameWithIP + " succeed.");
            return true;
         }
         //we fail by throwing exceptions
View Full Code Here

TOP

Related Classes of com.vmware.bdd.service.sp.SetVMPasswordSP

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.