tmpTemplateDataStore.setPhysicalSize(answer.getPhysicalSize()); tmpTemplateDataStore.setSize(answer.getVirtualSize()); tmpTemplateDataStore.setDownloadPercent(100); tmpTemplateDataStore.setExtractUrl(null); tmpTemplateDataStore.setDownloadState(VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS); stateMachine.transitTo(tmpTemplate, VirtualMachineTemplate.Event.UploadRequested, null, _templateDao); tmpTemplateDataStore.setDownloadPercent(answer.getDownloadPercent()); } else if (tmpTemplate.getState() == VirtualMachineTemplate.State.UploadInProgress) { // check for timeout if (System.currentTimeMillis() - tmpTemplateDataStore.getCreated().getTime() > _uploadOperationTimeout) { sendAlert = true; } else { tmpTemplateDataStore.setDownloadPercent(answer.getDownloadPercent());
tmpltStore.setDownloadPercent(100); tmpltStore.setDownloadState(Status.DOWNLOADED); tmpltStore.setState(ObjectInDataStoreStateMachine.State.Ready);
ts.setDataStoreRole(DataStoreRole.Image); ts.setState(tmpl.getState()); ts.setDownloadPercent(tmpl.getDownloadPercent()); ts.setDownloadState(tmpl.getDownloadState()); ts.setSize(tmpl.getSize());
updateBuilder.setDownloadPercent(answer.getDownloadPct()); updateBuilder.setDownloadState(answer.getDownloadStatus()); updateBuilder.setLastUpdated(new Date());
TemplateDataStoreVO templateStoreRef = templateStoreDao.findByStoreTemplate(getDataStore().getId(), getId()); templateStoreRef.setInstallPath(newTemplate.getPath()); templateStoreRef.setDownloadPercent(100); templateStoreRef.setDownloadState(Status.DOWNLOADED); templateStoreRef.setSize(newTemplate.getSize()); TemplateDataStoreVO templateStoreRef = templateStoreDao.findByStoreTemplate(getDataStore().getId(), dataDiskTemplate.getId()); templateStoreRef.setInstallPath(dataDiskTemplate.getPath()); templateStoreRef.setDownloadPercent(100); templateStoreRef.setDownloadState(Status.DOWNLOADED); templateStoreRef.setSize(dataDiskTemplate.getSize());