Package com.cloud.storage

Examples of com.cloud.storage.StoragePoolVO


    return unusedTemplatesInPool;
  }
   
    @Override
    public void evictTemplateFromStoragePool(VMTemplateStoragePoolVO templatePoolVO) {
    StoragePoolVO pool = _poolDao.findById(templatePoolVO.getPoolId());
    VMTemplateVO template = _tmpltDao.findByIdIncludingRemoved(templatePoolVO.getTemplateId());
   
   
    if (s_logger.isDebugEnabled()) {
        s_logger.debug("Evicting " + templatePoolVO);
    }
    DestroyCommand cmd = new DestroyCommand(pool, templatePoolVO);
   
        try {
            Answer answer = _storageMgr.sendToPool(pool, cmd);
   
            if (answer != null && answer.getResult()) {
                // Remove the templatePoolVO
                if (_tmpltPoolDao.remove(templatePoolVO.getId())) {
                    s_logger.debug("Successfully evicted template: " + template.getName() + " from storage pool: " + pool.getName());
                }
            } else {
                s_logger.info("Will retry evicte template: " + template.getName() + " from storage pool: " + pool.getName());
            }
        } catch (StorageUnavailableException e) {
            s_logger.info("Storage is unavailable currently.  Will retry evicte template: " + template.getName() + " from storage pool: " + pool.getName());
        }

  }
View Full Code Here


    // For pool ids you got, delete local storage host entries in pool table
    // where
        for (StoragePoolHostVO pool : pools) {
            Long poolId = pool.getPoolId();
            StoragePoolVO storagePool = _storagePoolDao.findById(poolId);
            if (storagePool.isLocal() && isForceDeleteStorage) {
                storagePool.setUuid(null);
                storagePool.setClusterId(null);
                _storagePoolDao.update(poolId, storagePool);
                _storagePoolDao.remove(poolId);
        s_logger.debug("Local storage id=" + poolId
            + " is removed as a part of host removal id=" + hostId);
            }
View Full Code Here

TOP

Related Classes of com.cloud.storage.StoragePoolVO

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.