Tabnine Logo
SnapshotInfo.getVolumeId
Code IndexAdd Tabnine to your IDE (free)

How to use
getVolumeId
method
in
org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo

Best Java code snippets using org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo.getVolumeId (Showing top 6 results out of 315)

origin: apache/cloudstack

private void verifyFormat(SnapshotInfo snapshotInfo) {
  long volumeId = snapshotInfo.getVolumeId();
  VolumeVO volumeVO = _volumeDao.findByIdIncludingRemoved(volumeId);
  verifyFormat(volumeVO.getFormat());
}
origin: apache/cloudstack

@Override
public SnapshotInfo backupSnapshot(SnapshotInfo snapshotInfo) {
  Preconditions.checkArgument(snapshotInfo != null, "'snapshotInfo' cannot be 'null'.");
  if (snapshotInfo.getLocationType() != Snapshot.LocationType.SECONDARY) {
    markAsBackedUp((SnapshotObject)snapshotInfo);
    return snapshotInfo;
  }
  // At this point, the snapshot is either taken as a native
  // snapshot on the storage or exists as a volume on the storage (clone).
  // If archive flag is passed in, we should copy this snapshot to secondary
  // storage and delete it from primary storage.
  HostVO host = getHost(snapshotInfo.getVolumeId());
  boolean canStorageSystemCreateVolumeFromSnapshot = canStorageSystemCreateVolumeFromSnapshot(snapshotInfo.getBaseVolume().getPoolId());
  if (!canStorageSystemCreateVolumeFromSnapshot) {
    String msg = "Cannot archive snapshot: 'canStorageSystemCreateVolumeFromSnapshot' was false.";
    s_logger.warn(msg);
    throw new CloudRuntimeException(msg);
  }
  boolean computeClusterSupportsResign = clusterDao.getSupportsResigning(host.getClusterId());
  if (!computeClusterSupportsResign) {
    String msg = "Cannot archive snapshot: 'computeClusterSupportsResign' was false.";
    s_logger.warn(msg);
    throw new CloudRuntimeException(msg);
  }
  return snapshotSvr.backupSnapshot(snapshotInfo);
}
origin: apache/cloudstack

private AsyncCallFuture<SnapshotResult> syncToRegionStoreAsync(SnapshotInfo snapshot, DataStore store) {
  AsyncCallFuture<SnapshotResult> future = new AsyncCallFuture<SnapshotResult>();
  // no need to create entry on snapshot_store_ref here, since entries are already created when updateCloudToUseObjectStore is invoked.
  // But we need to set default install path so that sync can be done in the right s3 path
  SnapshotInfo snapshotOnStore = _snapshotFactory.getSnapshot(snapshot, store);
  String installPath = TemplateConstants.DEFAULT_SNAPSHOT_ROOT_DIR + "/"
      + snapshot.getAccountId() + "/" + snapshot.getVolumeId();
  ((SnapshotObject)snapshotOnStore).setPath(installPath);
  CopySnapshotContext<CommandResult> context = new CopySnapshotContext<CommandResult>(null, snapshot,
      snapshotOnStore, future);
  AsyncCallbackDispatcher<SnapshotServiceImpl, CopyCommandResult> caller = AsyncCallbackDispatcher
      .create(this);
  caller.setCallback(caller.getTarget().syncSnapshotCallBack(null, null)).setContext(context);
  motionSrv.copyAsync(snapshot, snapshotOnStore, caller);
  return future;
}
origin: apache/cloudstack

SnapshotDataStoreVO parentSnapshotOnBackupStore = snapshotStoreDao.findLatestSnapshotForVolume(snapshot.getVolumeId(), DataStoreRole.Image);
SnapshotDataStoreVO parentSnapshotOnPrimaryStore = snapshotStoreDao.findLatestSnapshotForVolume(snapshot.getVolumeId(), DataStoreRole.Primary);
HypervisorType hypervisorType = snapshot.getBaseVolume().getHypervisorType();
if (parentSnapshotOnPrimaryStore != null && parentSnapshotOnBackupStore != null && hypervisorType == Hypervisor.HypervisorType.XenServer) { // CS does incremental backup only for XenServer
  SnapshotDataStoreVO oldestSnapshotOnPrimary = snapshotStoreDao.findOldestSnapshotForVolume(snapshot.getVolumeId(), DataStoreRole.Primary);
  VolumeVO volume = volumeDao.findById(snapshot.getVolumeId());
  if (oldestSnapshotOnPrimary != null) {
    if (oldestSnapshotOnPrimary.getDataStoreId() == volume.getPoolId() && oldestSnapshotOnPrimary.getId() != parentSnapshotOnPrimaryStore.getId()) {
origin: apache/cloudstack

long snapVolId = snapInfo.getVolumeId();
origin: apache/cloudstack

ss.setDataStoreId(dataStore.getId());
ss.setRole(dataStore.getRole());
ss.setVolumeId(snapshotInfo.getVolumeId());
SnapshotDataStoreVO snapshotDataStoreVO = snapshotDataStoreDao.findParent(dataStore.getRole(), dataStore.getId(), snapshotInfo.getVolumeId());
if (snapshotDataStoreVO != null) {
  ss.setRole(dataStore.getRole());
  ss.setSize(snapshot.getSize());
  ss.setVolumeId(snapshot.getVolumeId());
  SnapshotDataStoreVO snapshotDataStoreVO = snapshotDataStoreDao.findParent(dataStore.getRole(), dataStore.getId(), snapshot.getVolumeId());
  if (snapshotDataStoreVO != null) {
    ss.setParentSnapshotId(snapshotDataStoreVO.getSnapshotId());
  ss.setInstallPath(TemplateConstants.DEFAULT_SNAPSHOT_ROOT_DIR + "/" + snapshotDao.findById(obj.getId()).getAccountId() + "/" + snapshot.getVolumeId());
  ss.setState(ObjectInDataStoreStateMachine.State.Allocated);
  ss = snapshotDataStoreDao.persist(ss);
org.apache.cloudstack.engine.subsystem.api.storageSnapshotInfogetVolumeId

Popular methods of SnapshotInfo

  • getId
  • getBaseVolume
  • getDataStore
  • getHypervisorType
  • getName
  • getTO
  • getAccountId
  • getDataCenterId
  • getParent
  • getSize
  • getUuid
  • addPayload
  • getUuid,
  • addPayload,
  • getChild,
  • getFullBackup,
  • getLocationType,
  • getPath,
  • getPayload,
  • processEvent,
  • delete

Popular in Java

  • Reactive rest calls using spring rest template
  • setRequestProperty (URLConnection)
  • addToBackStack (FragmentTransaction)
  • getSupportFragmentManager (FragmentActivity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • Collection (java.util)
    Collection is the root of the collection hierarchy. It defines operations on data collections and t
  • ResourceBundle (java.util)
    ResourceBundle is an abstract class which is the superclass of classes which provide Locale-specifi
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now