Examples of ResourcePool


Examples of com.vmware.vim.binding.vim.ResourcePool

    * @see com.vmware.aurora.vc.VcResourcePool#importVApp(com.vmware.vim.binding.vim.ImportSpec)
    */
   @Override
   public HttpNfcLease importVApp(ImportSpec spec) throws Exception {
      AuAssert.check(VcContext.isInTaskSession());
      ResourcePool rp = getManagedObject();
      VcDatacenter dc = getVcCluster().getDatacenter();
      return MoUtil.getManagedObject(rp.importVApp(spec, dc.getVmFolderMoRef(), null));
   }
View Full Code Here

Examples of com.vmware.vim.binding.vim.ResourcePool

    * @see com.vmware.aurora.vc.VcResourcePool#destroyChildren()
    */
   @Override
   public void destroyChildren() throws Exception {
      AuAssert.check(VcContext.isInTaskSession());
      ResourcePool rp = getManagedObject();
      rp.destroyChildren();
      for (ManagedObjectReference rpRef : getChildRps()) {
         VcCache.purge(rpRef);
      }
      update();
   }
View Full Code Here

Examples of com.vmware.vim.binding.vim.ResourcePool

    * @throws Exception
    */
   private VcTask destroy(final IVcTaskCallback callback) throws Exception {
      VcTask task = VcContext.getTaskMgr().execute(new IVcTaskBody() {
         public VcTask body() throws Exception {
            final ResourcePool rp = getManagedObject();
            return new VcTask(TaskType.DestroyRp, rp.destroy(), callback);
         }
      });

      logger.debug("destroy_rp task RP " + this + " created");
      return task;
View Full Code Here

Examples of com.vmware.vim.binding.vim.ResourcePool

      VcContext.getTaskMgr().execPseudoTask("ResourcePool.updateConfig",
            VcEventType.ResourcePoolReconfigured, getMoRef(),
            new IVcPseudoTaskBody() {
         @Override
         public ManagedObjectReference body() throws Exception {
            final ResourcePool rp = getManagedObject();
            ResourceConfigSpec spec = null;
            if (cpuAllocation != null || memAllocation != null) {
               spec = new ResourceConfigSpecImpl(
                     null, null, null, cpuAllocation, memAllocation);
               }
            rp.updateConfig(MoUtil.toURLString(name), spec);
            update();
            VcCache.refresh(parent)// to refresh its parent's cpu/mem usage
            return getMoRef();
         }
      });
View Full Code Here

Examples of com.vmware.vim25.mo.ResourcePool

        /* create ovf descriptor */
        ovfDescriptor = escapeSpecialChars(ovfDescriptor);
        //logger_.info("ovfDesc: " + ovfDescriptor);

        ResourcePool rp = ((ComputeResource) host.getParent()).getResourcePool();

        logger_.fine(String.format("vmname: %s\n" +
                                   "resourcepool: %s\n" +
                                   "host:%s\n" +
                                   "datastore:%s\n",
                                   newVmName,
                                   rp.getName(),
                                   host.getName(),
                                   datastore.getName()));
       
        OvfCreateImportSpecResult ovfImportResult = null;
        HttpNfcLease httpNfcLease = null;       

        /* create import spec */
        ovfImportResult =
            conn_.getServiceInstance().getOvfManager().createImportSpec
            (ovfDescriptor, rp, datastore, importSpecParams);

        /* import execution */
        try {
            httpNfcLease =
                rp.importVApp(ovfImportResult.getImportSpec(), vmFolder, host);
        } catch (Exception e) {
            logger_.warning("importVapp failed.");
            throw e;
        }

View Full Code Here

Examples of com.vmware.vim25.mo.ResourcePool

      return;
    }
   
    System.out.println("ovfDesc:" + ovfDescriptor);
     
    ResourcePool rp = ((ComputeResource)host.getParent()).getResourcePool();

    OvfCreateImportSpecResult ovfImportResult = si.getOvfManager().createImportSpec(
        ovfDescriptor, rp, host.getDatastores()[0], importSpecParams);

    if(ovfImportResult==null)
    {
      si.getServerConnection().logout();
      return;
    }
   
    long totalBytes = addTotalBytes(ovfImportResult);
    System.out.println("Total bytes: " + totalBytes);

    HttpNfcLease httpNfcLease = null;

    httpNfcLease = rp.importVApp(ovfImportResult.getImportSpec(), vmFolder, host);
     
    // Wait until the HttpNfcLeaseState is ready
    HttpNfcLeaseState hls;
    for(;;)
    {
View Full Code Here

Examples of com.vmware.vim25.mo.ResourcePool

    Folder rootFolder = si.getRootFolder();
   
    Datacenter dc = (Datacenter) new InventoryNavigator(
        rootFolder).searchManagedEntity("Datacenter", dcName);
    ResourcePool rp = (ResourcePool) new InventoryNavigator(
        dc).searchManagedEntities("ResourcePool")[0];
   
    Folder vmFolder = dc.getVmFolder();

    // create vm config spec
View Full Code Here

Examples of org.geoserver.catalog.ResourcePool

        if (null == info.getType()) {
            throw new IllegalArgumentException("Coverage type has not been set");
        }

        final Catalog catalog = getCatalog();
        final ResourcePool resourcePool = catalog.getResourcePool();
        resourcePool.clear(info);

        // Map<String, Serializable> connectionParameters = info.getConnectionParameters();

        if (info.isEnabled()) {
            // store's enabled, make sure it works
            LOGGER.finer("Store " + info.getName() + " is enabled, verifying factory availability "
                    + "before saving it...");
            AbstractGridFormat gridFormat = resourcePool.getGridCoverageFormat(info);

            if (gridFormat == null) {
                throw new IllegalArgumentException(
                        "No grid format found capable of connecting to the provided URL."
                                + " To save the store disable it, and check the required libraries are in place");
            }
            try {
                // get the reader through ResourcePool so it resolves relative URL's for us
                GridCoverageReader reader = resourcePool.getGridCoverageReader(info, null);
                LOGGER.info("Connection to store " + info.getName() + " validated. Got a "
                        + reader.getClass().getName() + ". Saving store");
                doSaveStore(info);
                setResponsePage(StorePage.class);
            } catch (IOException e) {
View Full Code Here

Examples of org.geoserver.catalog.ResourcePool

            for (CoverageInfo coverage : alreadyConfigured) {
                coverage.setNamespace(namespace);
            }

            ResourcePool resourcePool = catalog.getResourcePool();
            resourcePool.clear(info);
            catalog.save(info);

            for (CoverageInfo coverage : alreadyConfigured) {
                catalog.save(coverage);
            }
View Full Code Here

Examples of org.geoserver.catalog.ResourcePool

    // really needed??
    private GeoServerResourceLoader resourceLoader;

    private HibCatalogImpl() {
        super();
        resourcePool = new ResourcePool(this);

        listeners.add(new HibCatalogUpdater());       
    }
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.