Examples of VcResourcePoolEntity


Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt" })
   public void testGetVcResourcePoolByNameList() {
      new Expectations() {
         {
            VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
            rpEntity.setName("defaultRP");
            rpEntity.setVcCluster("cluster-ws");
            rpEntity.setVcResourcePool("jarred");
            VcResourcePoolEntity rpEntity2 = new VcResourcePoolEntity();
            rpEntity2.setName("defaultRP2");
            rpEntity2.setVcCluster("cluster-ws2");
            rpEntity2.setVcResourcePool("jarred");
            rpDao.findByName(anyString);
            returns(rpEntity,rpEntity2);
         }
      };
      rpSvc.setRpDao(rpDao);
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt" })
   public void testGetAllRPNames() {
      new Expectations() {
         {
            List<VcResourcePoolEntity> rpEntities = new ArrayList<VcResourcePoolEntity>();
            VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
            rpEntity.setName("defaultRP");
            rpEntity.setVcCluster("cluster-ws");
            rpEntity.setVcResourcePool("jarred");
            rpEntities.add(rpEntity);
            rpDao.findAllOrderByClusterName();
            result = rpEntities;
         }
      };
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt" })
   public void testDeleteResourcePool() {
      new Expectations() {
         {
            VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
            rpEntity.setName("defaultRP");
            rpEntity.setVcCluster("cluster-ws");
            rpEntity.setVcResourcePool("jarred");
            rpDao.findByName(anyString);
            returns(rpEntity);
            clusterDao.findClustersByUsedResourcePool(anyString);
            result = new ArrayList<String>();
         }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt" }, expectedExceptions=VcProviderException.class)
   public void testDeleteResourcePoolWithReference() {
      new Expectations() {
         {
            VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
            rpEntity.setName("defaultRP");
            rpEntity.setVcCluster("cluster-ws");
            rpEntity.setVcResourcePool("jarred");
            rpDao.findByName(anyString);
            returns(rpEntity);
            List<String> clusters = new ArrayList<String>();
            clusters.add("cluster1");
            clusterDao.findClustersByUsedResourcePool(anyString);
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt" })
   public void testGetAllRpNamesAndToRest() {
      new Expectations() {
         {
            List<VcResourcePoolEntity> rpEntities = new ArrayList<VcResourcePoolEntity>();
            VcResourcePoolEntity rpEntity1 = new VcResourcePoolEntity();
            rpEntity1.setName("rp1");
            rpEntity1.setVcCluster("cluster1");
            rpEntity1.setVcResourcePool("vcrp1");
            rpEntities.add(rpEntity1);

            VcResourcePoolEntity rpEntity2 = new VcResourcePoolEntity();
            rpEntity2.setName("rp2");
            rpEntity2.setVcCluster("cluster2");
            rpEntity2.setVcResourcePool("vcrp2");
            rpEntities.add(rpEntity2);

            rpDao.findAllOrderByClusterName();
            result = rpEntities;
         }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Test
   public void testGetTargetRp() {
      NodeEntity node = new NodeEntity();
      VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
      rpEntity.setVcCluster("test-cluster");
      rpEntity.setVcResourcePool("test-rp");
      node.setVcRp(rpEntity);
      VcVmUtil.getTargetRp("test-cluster", "test-group", node);
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Test
   public void testGetTargetRpException() {
      NodeEntity node = new NodeEntity();
      VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
      rpEntity.setVcCluster("test-cluster");
      rpEntity.setVcResourcePool("test-rp");
      node.setVcRp(rpEntity);
      MockVcResourceUtils.setFlag(false);
      try {
         VcVmUtil.getTargetRp("test-cluster", "test-group", node);
         Assert.assertTrue(false,
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Test
   public void testGetTargetRpDisabledDRS() {
      NodeEntity node = new NodeEntity();
      VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
      rpEntity.setVcCluster("test-cluster");
      rpEntity.setVcResourcePool("test-rp");
      node.setVcRp(rpEntity);
      MockVcResourceUtils.setDisableDRS(true);
      VcResourcePool rp =
            VcVmUtil.getTargetRp("test-cluster", "test-group", node);
      Assert.assertTrue(rp.getName() != null, "Should get root rp, but got "
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt", "dependsOnVC" })
   public void testGetResourcePoolByName() {
      initVirtualCenter();
      new Expectations() {
         {
            VcResourcePoolEntity vcRPEntity = new VcResourcePoolEntity();
            vcRPEntity.setVcCluster("cluster-ws");
            vcRPEntity.setVcResourcePool("jarred");
            rpDao.findByName(anyString);
            result = vcRPEntity;
         }
      };
      resSvc.setRpDao(rpDao);
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @Test(groups = { "res-mgmt", "dependsOnVC" })
   public void testGetAvailableRPs() {
      initVirtualCenter();
      new Expectations() {
         {
            VcResourcePoolEntity vcRPEntity = new VcResourcePoolEntity();
            vcRPEntity.setVcCluster("cluster-ws");
            vcRPEntity.setVcResourcePool("jarred");
            List<VcResourcePoolEntity> entities =
                  new ArrayList<VcResourcePoolEntity>();
            entities.add(vcRPEntity);
            rpDao.findAllOrderByClusterName();
            result = entities;
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.