public int getWaitInMillSeconds() { return getWait() * 1000; }
final DataTO srcDataTo = cmd.getSrcTO(); final DataTO destDataTo = cmd.getDestTO(); final int wait = cmd.getWait(); final DataStoreTO srcDataStoreTo = srcDataTo.getDataStore(); final Connection conn = hypervisorResource.getConnection();
@Override public Answer copyVolumeFromImageCacheToPrimary(final CopyCommand cmd) { final Connection conn = hypervisorResource.getConnection(); final DataTO srcData = cmd.getSrcTO(); final DataTO destData = cmd.getDestTO(); final int wait = cmd.getWait(); final VolumeObjectTO srcVolume = (VolumeObjectTO) srcData; final VolumeObjectTO destVolume = (VolumeObjectTO) destData; final DataStoreTO srcStore = srcVolume.getDataStore(); if (srcStore instanceof NfsTO) { final NfsTO nfsStore = (NfsTO) srcStore; try { final SR primaryStoragePool = hypervisorResource.getStorageRepository(conn, destVolume.getDataStore().getUuid()); final String srUuid = primaryStoragePool.getUuid(conn); final URI uri = new URI(nfsStore.getUrl()); final String volumePath = uri.getHost() + ":" + uri.getPath() + nfsStore.getPathSeparator() + srcVolume.getPath(); final String uuid = copy_vhd_from_secondarystorage(conn, volumePath, srUuid, wait); final VolumeObjectTO newVol = new VolumeObjectTO(); newVol.setPath(uuid); newVol.setSize(srcVolume.getSize()); return new CopyCmdAnswer(newVol); } catch (final Exception e) { final String msg = "Catch Exception " + e.getClass().getName() + " due to " + e.toString(); s_logger.warn(msg, e); return new CopyCmdAnswer(e.toString()); } } s_logger.debug("unsupported protocol"); return new CopyCmdAnswer("unsupported protocol"); }
final DataTO srcData = cmd.getSrcTO(); final DataTO destData = cmd.getDestTO(); final int wait = cmd.getWait(); final DataStoreTO srcStore = srcData.getDataStore(); final Connection conn = hypervisorResource.getConnection();
final DataTO srcData = cmd.getSrcTO(); final DataTO destData = cmd.getDestTO(); final int wait = cmd.getWait(); final VolumeObjectTO srcVolume = (VolumeObjectTO)srcData; final VolumeObjectTO destVolume = (VolumeObjectTO)destData;
final VolumeObjectTO srcVolume = (VolumeObjectTO)cmd.getSrcTO(); final VolumeObjectTO destVolume = (VolumeObjectTO)cmd.getDestTO(); final int wait = cmd.getWait(); final DataStoreTO destStore = destVolume.getDataStore();
Script command = new Script(createTemplateFromSnapshotXenScript, cmd.getWait() * 1000, s_logger); command.add("-p", snapshotPath); command.add("-s", snapshotName);
final int wait = cmd.getWait();
final VolumeObjectTO srcVolume = (VolumeObjectTO) cmd.getSrcTO(); final VolumeObjectTO destVolume = (VolumeObjectTO) cmd.getDestTO(); final int wait = cmd.getWait(); final DataStoreTO destStore = destVolume.getDataStore();
String secondaryStorageUrl = nfsImageStore.getUrl(); int wait = cmd.getWait(); boolean result = false;
final String primaryStorageNameLabel = pool.getUuid(); final String secondaryStorageUrl = nfsImageStore.getUrl(); final int wait = cmd.getWait(); boolean result = false;
TemplateObjectTO newTemplate = (TemplateObjectTO)answer.getNewData(); newTemplate.setDataStore(srcDataStore); CopyCommand newCpyCmd = new CopyCommand(newTemplate, destData, cmd.getWait(), cmd.executeInSequence()); Answer result = copyFromNfsToSwift(newCpyCmd); CopyCommand newCpyCmd = new CopyCommand(newTemplate, destData, cmd.getWait(), cmd.executeInSequence()); Answer result = copyFromNfsToS3(newCpyCmd);
final DataTO cacheData = cmd.getCacheTO(); final DataTO destData = cmd.getDestTO(); final int wait = cmd.getWait(); final PrimaryDataStoreTO primaryStore = (PrimaryDataStoreTO)srcData.getDataStore(); final String primaryStorageNameLabel = primaryStore.getUuid();
final TemplateObjectTO template = (TemplateObjectTO)cmd.getDestTO(); final NfsTO destStore = (NfsTO)cmd.getDestTO().getDataStore(); final int wait = cmd.getWait();
final DataTO cacheData = cmd.getCacheTO(); final DataTO destData = cmd.getDestTO(); final int wait = cmd.getWait(); final String primaryStorageNameLabel = srcData.getDataStore().getUuid(); String secondaryStorageUrl = null;
final TemplateObjectTO template = (TemplateObjectTO) cmd.getDestTO(); final NfsTO destStore = (NfsTO) cmd.getDestTO().getDataStore(); final int wait = cmd.getWait();