Package com.vmware.bdd.apitypes

Examples of com.vmware.bdd.apitypes.ClusterRead.validateSetParamParameters()


            enableAuto = (mode == ElasticityMode.AUTO) ? true : false;
         }

         //validate the input parameters
         try {
            if (!cluster.validateSetParamParameters(targetComputeNodeNum,
                  minComputeNodeNum, maxComputeNodeNum)) {
               return;
            }
         } catch (Exception e) {
            CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER,
View Full Code Here


      cluster.setNodeGroups(nodeGroupRead);
      cluster.setVhmMinNum(-1);
      cluster.setVhmMaxNum(-1);

      try {
         cluster.validateSetParamParameters(null, -2, null);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: minComputeNodeNum=-2. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum.", e.getMessage());
      }
View Full Code Here

      } catch (BddException e) {
         assertEquals("Invalid value: minComputeNodeNum=-2. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum.", e.getMessage());
      }

      try {
         cluster.validateSetParamParameters(null, null, -2);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: maxComputeNodeNum=-2. Value must be less than or equal to the number of compute-only nodes (6) and greater than or equal to minComputeNodeNum.", e.getMessage());
      }
View Full Code Here

      } catch (BddException e) {
         assertEquals("Invalid value: maxComputeNodeNum=-2. Value must be less than or equal to the number of compute-only nodes (6) and greater than or equal to minComputeNodeNum.", e.getMessage());
      }

      try {
         cluster.validateSetParamParameters(9, null, null);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: targetComputeNodeNum=9. Value must be less than or equal to the number of compute-only nodes (6).", e.getMessage());
      }
View Full Code Here

      } catch (BddException e) {
         assertEquals("Invalid value: targetComputeNodeNum=9. Value must be less than or equal to the number of compute-only nodes (6).", e.getMessage());
      }

      try {
         cluster.validateSetParamParameters(null, 6, 1);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: minComputeNodeNum=6. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum (1).", e.getMessage());
      }
View Full Code Here

         assertEquals("Invalid value: minComputeNodeNum=6. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum (1).", e.getMessage());
      }

      cluster.setVhmMinNum(6);
      try {
         cluster.validateSetParamParameters(null, null, 5);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: maxComputeNodeNum=5. Value must be less than or equal to the number of compute-only nodes (6) and greater than or equal to minComputeNodeNum (6).", e.getMessage());
      }
View Full Code Here

         assertEquals("Invalid value: maxComputeNodeNum=5. Value must be less than or equal to the number of compute-only nodes (6) and greater than or equal to minComputeNodeNum (6).", e.getMessage());
      }

      cluster.setVhmMaxNum(1);
      try {
         cluster.validateSetParamParameters(null, 6, null);
         fail();
      } catch (BddException e) {
         assertEquals("Invalid value: minComputeNodeNum=6. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum (1).", e.getMessage());
      }
View Full Code Here

         assertEquals("Invalid value: minComputeNodeNum=6. Value must be less than or equal to the number of compute-only nodes (6) and less than or equal to maxComputeNodeNum (1).", e.getMessage());
      }

      //test will fail if Exception is thrown out
      cluster.setVhmMinNum(0);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 0));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 1));

      cluster.setVhmMinNum(-1);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
View Full Code Here

      }

      //test will fail if Exception is thrown out
      cluster.setVhmMinNum(0);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 0));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 1));

      cluster.setVhmMinNum(-1);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 0));
View Full Code Here

      //test will fail if Exception is thrown out
      cluster.setVhmMinNum(0);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 0));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 1));

      cluster.setVhmMinNum(-1);
      assertEquals(true, cluster.validateSetParamParameters(null, null, -1));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 0));
      assertEquals(true, cluster.validateSetParamParameters(null, null, 1));
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.