Package com.vmware.bdd.apitypes

Examples of com.vmware.bdd.apitypes.NodeGroupCreate


   private ClusterCreate getClusterSpec() {
      ClusterCreate spec = new ClusterCreate();
      spec.setName("test");
      NodeGroupCreate[] nodeGroups = new NodeGroupCreate[1];
      NodeGroupCreate group = new NodeGroupCreate();
      group.setVmFolderPath("root/test/master");
      group.setName("master");
      group.setCpuNum(2);
      nodeGroups[0] = group;
      spec.setNodeGroups(nodeGroups);
      List<NetworkAdd> networkAdds = new ArrayList<NetworkAdd>();
      NetworkAdd network = new NetworkAdd();
      network.setDhcp(true);
View Full Code Here


       */
      boolean mixed = vGroup.getNodeGroups().size() > 1;
      Integer vNodeNum = 0;
      // ensure all node groups have the same host number
      if (mixed) {
         NodeGroupCreate primary = vGroup.getPrimaryGroup();
         vNodeNum = primary.getInstanceNum() / primary.instancePerHost();
         AuAssert.check(vNodeNum != null && vNodeNum > 0);

         // slave groups cannot have required host numbers large than the primary group
         for (NodeGroupCreate nodeGroup : vGroup.getNodeGroups()) {
            AuAssert.check(nodeGroup.calculateHostNum() <= vNodeNum);
View Full Code Here

         boolean single = true;
         if (nodeGroup.getReferredGroup() != null
               && nodeGroup.isStrictReferred()
               && nodeGroup.instancePerHost() != null) {
            NodeGroupCreate referredGroup =
                  cluster.getNodeGroup(nodeGroup.getReferredGroup());
            AuAssert.check(referredGroup != null);
            if (referredGroup.instancePerHost() != null) {
               /*
                *  only put strict associated groups which both has instance_per_host
                *  constraints into one virtual group
                */
               single = false;
               if (groups.containsKey(referredGroup.getName())) {
                  groups.get(referredGroup.getName()).addNodeGroup(nodeGroup);
               } else {
                  VirtualGroup vGroup = new VirtualGroup(this.cluster);
                  vGroup.addNodeGroup(nodeGroup);
                  vGroup.addNodeGroup(referredGroup);
                  groups.put(referredGroup.getName(), vGroup);
               }
            }
         }
         if (single) {
            VirtualGroup vGroup = new VirtualGroup(this.cluster);
View Full Code Here

         @Mock
         public Map<String, Object> getClusterConfigManifest(
               String clusterName, List<String> targets, boolean needAllocIp) {
            Map<String, Object> attrs = new HashMap<String, Object>();
            ClusterCreate cluster = new ClusterCreate();
            NodeGroupCreate master = new NodeGroupCreate();
            master.setName("마스터 노드");
            NodeGroupCreate worker = new NodeGroupCreate();
            worker.setName("协作节点");
            NodeGroupCreate client = new NodeGroupCreate();
            client.setName("クライアント");
            cluster.setNodeGroups(new NodeGroupCreate[] { master, worker,
                  client });
            attrs.put("cluster_definition", cluster);
            return attrs;
         }
View Full Code Here

TOP

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

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.