Package com.vmware.bdd.service.impl

Examples of com.vmware.bdd.service.impl.ClusteringService


                  "../serengeti/WebContent/WEB-INF/spring/serengeti-jobs-context.xml",
                  "../serengeti/WebContent/WEB-INF/spring/manager-context.xml");
      context.getBean(SoftwareManagerCollector.class).loadSoftwareManagers();
      clusterConfigMgr = context.getBean(ClusterConfigManager.class);
      DistroManager distroMgr = Mockito.mock(DistroManager.class);
      ClusteringService clusteringService =
            Mockito.mock(ClusteringService.class);
      mockChefServerRoles();
      clusterConfigMgr.setClusteringService(clusteringService);
      clusterEntityMgr =
            context
                  .getBean("clusterEntityManager", IClusterEntityManager.class);
      DistroRead distro = new DistroRead();
      List<String> roles = new ArrayList<String>();
      roles.add("hadoop_namenode");
      roles.add("hadoop_jobtracker");
      roles.add("hadoop_datanode");
      roles.add("hadoop_tasktracker");
      roles.add("hadoop_client");
      roles.add("hive");
      roles.add("hive_server");
      roles.add("pig");
      distro.setRoles(roles);
      Mockito.when(clusteringService.getTemplateVmId()).thenReturn("vm-1234");
      Mockito.when(clusteringService.getTemplateVmName()).thenReturn(
            "hadoop-template");
      Mockito.when(distroMgr.getDistroByName("apache")).thenReturn(distro);
      Mockito.when(distroMgr.checkPackagesExistStatus("apache")).thenReturn(
            PackagesExistStatus.TARBALL);
      Mockito.when(
View Full Code Here


      Mockit.setUpMock(MockVcCache.class);
   }

   @BeforeClass(groups = { "TestClusteringService" })
   public static void setUp() throws Exception {
      service = new ClusteringService();
      service.setResMgr(new MockResourceManager());

      // mock a VcVm
      VcVirtualMachine vm = Mockito.mock(VcVirtualMachine.class);
      Mockito.when(vm.getName()).thenReturn("template-vm");
View Full Code Here

TOP

Related Classes of com.vmware.bdd.service.impl.ClusteringService

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.