Package com.vmware.aurora.vc

Examples of com.vmware.aurora.vc.VcResourcePool


      VcHost host1 = Mockito.mock(VcHost.class);
      hosts.add(host1);
      try {
         Mockito.when(cluster1.getHosts()).thenReturn(hosts);

         VcResourcePool rp1 = Mockito.mock(VcResourcePool.class);
         Mockito.when(cluster1.searchRP("[cluster1]/rp1")).thenReturn(rp1);
         VcResourcePool clusterRP = Mockito.mock(VcResourcePool.class);
         Mockito.when(cluster1.searchRP("[cluster1]")).thenReturn(clusterRP);
        
         List<VcVirtualMachine> vms = new ArrayList<VcVirtualMachine>();
         VcVirtualMachine vm = Mockito.mock(VcVirtualMachine.class);
         vms.add(vm);
View Full Code Here


      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 "
            + rp.getName());
      Assert.assertTrue(rp.getName().equals("root"),
            "Should get root rp, but got " + rp.getName());
   }
View Full Code Here

            rpDao.findByName(anyString);
            result = vcRPEntity;
         }
      };
      resSvc.setRpDao(rpDao);
      VcResourcePool vcRP = resSvc.getResourcePoolByName("defaultRP");
      Assert.assertNotNull(vcRP);
   }
View Full Code Here

      return null;
   }

   private VcResourcePool createResourcePool(VcResourcePool rp,
         String childRpName) throws Exception {
      VcResourcePool childVcResourcePool =
            getChildVcResourcePool(rp, childRpName);
      if (childVcResourcePool == null) {
         Long reservation = Long.valueOf(0);
         Boolean expandable = Boolean.valueOf(true);
         Long limit = Long.valueOf(-1);
View Full Code Here

         VcCluster newCluster = VcCache.get(id);
         System.out.println(cluster + ", id=" + newCluster.getId());
         AuAssert.check(cluster.getId().equals(newCluster.getId()));

         for (VcResourcePool rp : cluster.getQualifiedRPs()) {
            VcResourcePool newRp = VcCache.get(rp.getId());
            System.out.println(newRp + ", id=" + newRp.getId());
            AuAssert.check(newRp.getId().equals(rp.getId()));
            AuAssert.check(newRp.getPath().equals(rp.getPath()));
            AuAssert.check(newRp.getName().equals(rp.getName()));
         }

         for (VcNetwork net : cluster.getSharedNetworks()) {
            VcNetwork newNet = VcCache.get(net.getId());
            System.out.println(newNet + ", id=" + newNet.getId());
View Full Code Here

      }
   }

   @Test
   public void testCreateDeleteRP() throws Exception {
      VcResourcePool parentRP = VcTestConfig.getTestRP();
      VcResourcePool childRP = null;
      VcResourcePool grandChildRP = null;

      Long reservation = Long.valueOf(0);
      Boolean expandable = Boolean.valueOf(false);
      Long limit = Long.valueOf(-1);
      SharesInfo shares = new SharesInfoImpl(100, SharesInfo.Level.custom);
View Full Code Here

         } else {
            vcRPName =
                  rpEntity.getVcResourcePool() + "/" + clusterRpName + "/"
                        + groupName;
         }
         VcResourcePool rp =
               VcResourceUtils.findRPInVCCluster(rpEntity.getVcCluster(),
                     vcRPName);
         if (rp == null) {
            throw ClusteringServiceException.TARGET_VC_RP_NOT_FOUND(
                  rpEntity.getVcCluster(), vcRPName);
View Full Code Here

         }
      }
   }

   public void watchSingleRP(String refId, int repeatCount, int delayMs) throws Exception {
      VcResourcePool rp = VcCache.get(refId);

      int resolution = vcp.getAllSamplingIntervals(rp.getId())[0];

      System.out.println(String.format("Watching %s every %d seconds for %d repetitions", refId, delayMs / 1000, repeatCount));
      for (int i = 0; i < repeatCount; i++) {
         Calendar start = vcp.queryVcCurrentTime();
         start.add(Calendar.MINUTE, -60); // XXX: queries for < 30 minutes return nothing for RPs
View Full Code Here

         e.printStackTrace();
      }
   }

   public static Pair<VcDatacenter, VcResourcePool> getTestRPAndDC() throws Exception {
      VcResourcePool testRP = null;
      VcDatacenter testDC = null;

      for(VcDatacenter dc : VcInventory.getDatacenters()) {
         testDC = dc;
         for(VcCluster cluster : dc.getVcClusters()) {
View Full Code Here

TOP

Related Classes of com.vmware.aurora.vc.VcResourcePool

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.