Package com.vmware.bdd.apitypes

Examples of com.vmware.bdd.apitypes.TopologyType


      } else if (specFilePath == null) {
         // create Hadoop (HDFS + MapReduce) cluster as default
         clusterCreate.setType(ClusterType.HDFS_MAPRED);
      }

      TopologyType policy = null;
      if (topology != null) {
         policy = validateTopologyValue(name, topology);
         if (policy == null) {
            return;
         }
View Full Code Here


      }
      return false;
   }

   private void prettyOutputDynamicResourceInfo(ClusterRead cluster) {
      TopologyType topology = cluster.getTopologyPolicy();
      if (topology == null || topology == TopologyType.NONE) {
         System.out.printf("cluster name: %s, distro: %s, status: %s",
               cluster.getName(), cluster.getDistro(), cluster.getStatus());
      } else {
         System.out.printf(
View Full Code Here

         }
      }
   }

   private void prettyOutputClusterInfo(ClusterRead cluster, boolean detail) {
      TopologyType topology = cluster.getTopologyPolicy();
      String autoElasticityStatus;
      String minComputeNodeNum = cluster.retrieveVhmMinNum();
      String maxComputeNodeNum = cluster.retrieveVhmMaxNum();
      if (cluster.getAutomationEnable() == null) {
         autoElasticityStatus = "N/A";
         minComputeNodeNum = "N/A";
         maxComputeNodeNum = "N/A";
      } else if (cluster.getAutomationEnable()) {
         autoElasticityStatus = "Enable";
      } else {
         autoElasticityStatus = "Disable";
      }

      printSeperator();

      // list cluster level params
      LinkedHashMap<String, String> clusterParams =
            new LinkedHashMap<String, String>();
      clusterParams.put("CLUSTER NAME", cluster.getName());
      clusterParams.put("AGENT VERSION", cluster.getVersion());
      clusterParams.put("APP MANAGER", cluster.getAppManager());
      clusterParams.put("DISTRO", cluster.getDistro());
      if (topology != null && topology != TopologyType.NONE) {
         clusterParams.put("TOPOLOGY", topology.toString());
      }
      clusterParams.put("AUTO ELASTIC", autoElasticityStatus);
      clusterParams.put("MIN COMPUTE NODES NUM", minComputeNodeNum);
      clusterParams.put("MAX COMPUTE NODES NUM", maxComputeNodeNum);
      clusterParams.put("IO SHARES", cluster.getIoShares() == null ? ""
View Full Code Here

      return true;
   }

   private TopologyType validateTopologyValue(String clusterName,
         String topology) {
      TopologyType value = null;
      try {
         value = TopologyType.valueOf(topology);
      } catch (IllegalArgumentException ex) {
         CommandsUtils.printCmdFailure(Constants.OUTPUT_OBJECT_CLUSTER,
               clusterName, Constants.OUTPUT_OP_CREATE,
View Full Code Here

TOP

Related Classes of com.vmware.bdd.apitypes.TopologyType

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.