Examples of VirtualGroup


Examples of com.vmware.bdd.placement.entity.VirtualGroup

   }

   @Override
   public List<AbstractHost> getValidHosts(VirtualNode vNode, String rack) {
      logger.info("get valid vc hosts on rack " + rack);
      VirtualGroup vGroup = vNode.getParent();
      List<AbstractCluster> sharedClusters = vGroup.getJointAbstractClusters();

      if (sharedClusters == null || sharedClusters.size() == 0)
         throw PlacementException.DO_NOT_HAVE_SHARED_VC_CLUSTER(vNode
               .getBaseNodeNames());
      AuAssert.check(sharedClusters != null);
View Full Code Here

Examples of com.vmware.bdd.placement.entity.VirtualGroup

                */
               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);
            vGroup.addNodeGroup(nodeGroup);
            groups.put(nodeGroup.getName(), vGroup);
         }
      }

      /*
       * mark the groups that are referenced by others. they should be placed first
       * Note that the group association policy has the assumption that:
       * 1. only one level of reference, i.e., if A is referred by B,
       *    B cannot be referred by others
       * 2. not allow the reference to multiple groups, i.e., if A refers to B,
       *    A cannot refer to any others
       */
      for (NodeGroupCreate nodeGroup : cluster.getNodeGroups()) {
         if (nodeGroup.getReferredGroup() != null) {
            AuAssert.check(groups.containsKey(nodeGroup.getReferredGroup()));
            groups.get(nodeGroup.getReferredGroup()).setReferred(true);
            if (groups.containsKey(nodeGroup.getName())) {
               groups.get(nodeGroup.getName()).setReferToGroup(
                     nodeGroup.getReferredGroup());
               if (nodeGroup.isStrictReferred()) {
                  groups.get(nodeGroup.getName()).setStrictAssociated(true);
               }
            }
         }
      }

      List<VirtualGroup> vGroups = new ArrayList<VirtualGroup>(groups.values());

      // process the instance_per_host policy
      for (VirtualGroup vGroup : vGroups) {
         vGroup.setvNodes(getVirtualNodes(vGroup, existedNodes));
      }

      return vGroups;
   }
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.