Examples of VcResourcePoolEntity


Examples of com.vmware.bdd.entity.VcResourcePoolEntity

      NodeEntity hdfsNode1 = new NodeEntity();
      NodeEntity hdfsNode2 = new NodeEntity();
      hdfsNode1.setVmName("hdfsNode1");
      hdfsNode2.setVmName("hdfsNode2");

      VcResourcePoolEntity vcRp1 = new VcResourcePoolEntity();
      vcRp1.setName("RP1");
      vcRp1.setVcCluster("Cluster1");
      vcRp1.setVcResourcePool("VcRp1");
      resourcePoolDao.insert(vcRp1);
      hdfsNode1.setVcRp(vcRp1);

      hdfsNodes.add(hdfsNode1);
      hdfsNodes.add(hdfsNode2);
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   @BeforeClass
   public void setup() {
      ctx = new ClassPathXmlApplicationContext("/META-INF/spring/*-context.xml");
      rpDAO = ctx.getBean(IResourcePoolDAO.class);

      rp1 = new VcResourcePoolEntity();
      rp1.setName(RP1_NAME);
      rp1.setVcCluster(CLUSTER_NAME);
      rp1.setVcResourcePool(VC_RP1);

      rp2 = new VcResourcePoolEntity();
      rp2.setName(RP2_NAME);
      rp2.setVcCluster(CLUSTER_NAME);
      rp2.setVcResourcePool(VC_RP2);

      rpDAO.insert(rp1);
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

      rpDAO.insert(rp2);
   }

   @Test
   public void testFindByName() {
      VcResourcePoolEntity rp = rpDAO.findByName(RP1_NAME);
      Assert.assertTrue(rp != null && rp.getName().equals(RP1_NAME));
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Test
   public void testAddResourcePoolEntity() {
      rpDAO.addResourcePoolEntity("new_rp", "new_cluster", "new_vc_rp");
      VcResourcePoolEntity rp = rpDAO.findByName("new_rp");
      Assert.assertTrue(rp != null && rp.getVcCluster().equals("new_cluster"));
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Override
   @Transactional(readOnly = true)
   public boolean isRPAdded(String vcCluster, String vcRP) {
      VcResourcePoolEntity entity = findByClusterAndRp(vcCluster, vcRP);
      return (entity != null);
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   }

   @Override
   @Transactional(readOnly = true)
   public String getNameByClusterAndRp(String vcCluster, String vcRp) {
      VcResourcePoolEntity entity = findByClusterAndRp(vcCluster, vcRp);
      if (entity != null) {
         return entity.getName();
      }
      return null;
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

      logger.debug("findByClusterAndRp. cluster:" + vcCluster);
      Map<String, String> propertyNameValues = new HashMap<String, String>();
      propertyNameValues.put("vcCluster", vcCluster);
      propertyNameValues.put("vcResourcePool", vcRp);

      VcResourcePoolEntity entity =
            findUniqueByCriteria(Restrictions.allEq(propertyNameValues));
      return entity;
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

      if (findByName(rpName) != null) {
         logger.info("resource pool name " + rpName + " is already existed.");
         throw BddException.ALREADY_EXISTS("Resource pool", rpName);
      }
      VcResourcePoolEntity entity = new VcResourcePoolEntity();
      entity.setName(rpName);
      entity.setVcCluster(vcClusterName);
      entity.setVcResourcePool(vcResourcePool);
      this.insert(entity);
      logger.info("add resource pool " + rpName);
   }
View Full Code Here

Examples of com.vmware.bdd.entity.VcResourcePoolEntity

   public void testGetAllResourcePool() {
      logger.debug("test getAllResorucePool");
      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 testGetVcResourcePoolByName() {
      new Expectations() {
         {
            VcResourcePoolEntity rpEntity = new VcResourcePoolEntity();
            rpEntity.setName("defaultRP");
            rpEntity.setVcCluster("cluster-ws");
            rpEntity.setVcResourcePool("jarred");
            rpDao.findByName(anyString);
            returns(rpEntity);
         }
      };
      rpSvc.setRpDao(rpDao);
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.