use of com.cloud.agent.resource.kvm.storage.KvmStoragePool in project cosmic by MissionCriticalCloud.
the class LibvirtModifyStoragePoolCommandWrapper method execute.
@Override
public Answer execute(final ModifyStoragePoolCommand command, final LibvirtComputingResource libvirtComputingResource) {
final KvmStoragePoolManager storagePoolMgr = libvirtComputingResource.getStoragePoolMgr();
final KvmStoragePool storagepool = storagePoolMgr.createStoragePool(command.getPool().getUuid(), command.getPool().getHost(), command.getPool().getPort(), command.getPool().getPath(), command.getPool().getUserInfo(), command.getPool().getType());
if (storagepool == null) {
return new Answer(command, false, " Failed to create storage pool");
}
final Map<String, TemplateProp> tInfo = new HashMap<>();
final ModifyStoragePoolAnswer answer = new ModifyStoragePoolAnswer(command, storagepool.getCapacity(), storagepool.getAvailable(), tInfo);
return answer;
}
Aggregations