Package com.vmware.bdd.entity

Examples of com.vmware.bdd.entity.VcDatastoreEntity


            dsPattern = CommonUtil.getDatastoreJavaPattern(ds);
         }
         if (!resService.isDatastoreExistInVC(dsPattern)) {
            throw VcProviderException.DATASTORE_NOT_FOUND(ds);
         }
         VcDatastoreEntity entity = new VcDatastoreEntity();
         entity.setType(type);

         entity.setName(name);
         entity.setVcDatastore(ds);
         entity.setRegex(regex);
         dsDao.insert(entity);
         logger.info("add " + type + " datastore " + ds);
      }
   }
View Full Code Here


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

      VcDatastoreEntity dsEntity1 = new VcDatastoreEntity();
      dsEntity1.setName("ds1");
      dsEntity1.setVcDatastore("test-ds1");
      dsEntity1.setType(Datastore.DatastoreType.LOCAL);

      VcDatastoreEntity dsEntity2 = new VcDatastoreEntity();
      dsEntity2.setName("ds2");
      dsEntity2.setVcDatastore("test-ds2");
      dsEntity2.setType(Datastore.DatastoreType.SHARED);

      VcDatastoreEntity dsEntity3 = new VcDatastoreEntity();
      dsEntity3.setName("ds3");
      dsEntity3.setVcDatastore("test-ds3");
      dsEntity3.setType(Datastore.DatastoreType.LOCAL);

      datastoreDAO.findAll();
      datastoreDAO.insert(dsEntity1);
      datastoreDAO.insert(dsEntity2);
      datastoreDAO.insert(dsEntity3);
View Full Code Here

      dsSpec.add("datastore");
      datastoreSvc.addDatastores("testDS", DatastoreType.SHARED, dsSpec, false);

      new Verifications() {
         {
            VcDatastoreEntity entity = new VcDatastoreEntity();
            dsDao.insert(withAny(entity));
         }
      };
   }
View Full Code Here

      initVirtualCenter();
      dsDao = new MockUp<IDatastoreDAO>() {
         @Mock
         List<VcDatastoreEntity> findByName(String name) {
            List<VcDatastoreEntity> dss = new ArrayList<VcDatastoreEntity>();
            VcDatastoreEntity dsEntity = new VcDatastoreEntity();
            dsEntity.setName("testSharedStore");
            dsEntity.setType(DatastoreType.SHARED);
            dsEntity.setVcDatastore("datastore1");
            dss.add(dsEntity);
            return dss;
         }
      }.getMockInstance();
      resSvc.setDsDao(dsDao);
View Full Code Here

      initVirtualCenter();
      dsDao = new MockUp<IDatastoreDAO>() {
         @Mock
         List<VcDatastoreEntity> findAllSortByName() {
            List<VcDatastoreEntity> dss = new ArrayList<VcDatastoreEntity>();
            VcDatastoreEntity dsEntity = new VcDatastoreEntity();
            dsEntity.setName("testSharedStore");
            dsEntity.setType(DatastoreType.SHARED);
            dsEntity.setVcDatastore("datastore1");
            dss.add(dsEntity);
            return dss;
         }
      }.getMockInstance();
      resSvc.setDsDao(dsDao);
View Full Code Here

      initVirtualCenter();
      dsDao = new MockUp<IDatastoreDAO>() {
         @Mock
         List<VcDatastoreEntity> findByName(String name) {
            List<VcDatastoreEntity> dss = new ArrayList<VcDatastoreEntity>();
            VcDatastoreEntity dsEntity = new VcDatastoreEntity();
            dsEntity.setName("testSharedStore");
            dsEntity.setType(DatastoreType.SHARED);
            dsEntity.setVcDatastore("datastore1");
            dss.add(dsEntity);
            return dss;
         }
      }.getMockInstance();
      resSvc.setDsDao(dsDao);
View Full Code Here

TOP

Related Classes of com.vmware.bdd.entity.VcDatastoreEntity

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.