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

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

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

origin: apache/cloudstack

UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_ON_PRIMARY, snap.getAccountId(), snap.getDataCenterId(), snap.getId(),
    snap.getName(), null, null, snapshotOnPrimary.getSize(), snapshotOnPrimary.getSize(), snap.getClass().getName(), snap.getUuid());
return result;
origin: apache/cloudstack

UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_CREATE, snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, snapshot.getName(),
  null, null, volume.getSize(), snapshot.getClass().getName(), snapshot.getUuid());
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

UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_CREATE, snapshot.getAccountId(), snapshot.getDataCenterId(), snapshotId, snapshot.getName(),
  null, null, snapshotStoreRef.getPhysicalSize(), volume.getSize(), snapshot.getClass().getName(), snapshot.getUuid());
origin: apache/cloudstack

private void createTempVolume(SnapshotInfo snapshotInfo, long storagePoolId) {
  long csSnapshotId = snapshotInfo.getId();
  SnapshotDetailsVO snapshotDetails = snapshotDetailsDao.findDetail(csSnapshotId, SolidFireUtil.SNAPSHOT_ID);
  if (snapshotDetails == null || snapshotDetails.getValue() == null) {
    throw new CloudRuntimeException("'createTempVolume(SnapshotInfo, long)' should not be invoked unless " + SolidFireUtil.SNAPSHOT_ID + " exists.");
  }
  SolidFireUtil.SolidFireConnection sfConnection = SolidFireUtil.getSolidFireConnection(storagePoolId, storagePoolDetailsDao);
  snapshotDetails = snapshotDetailsDao.findDetail(csSnapshotId, "tempVolume");
  if (snapshotDetails != null && snapshotDetails.getValue() != null && snapshotDetails.getValue().equalsIgnoreCase("create")) {
    long sfAccountId = getCreateSolidFireAccountId(sfConnection, snapshotInfo.getAccountId(), storagePoolId);
    SolidFireUtil.SolidFireVolume sfVolume = createCloneFromSnapshot(sfConnection, csSnapshotId, sfAccountId);
    addTempVolumeId(csSnapshotId, String.valueOf(sfVolume.getId()));
    handleSnapshotDetails(csSnapshotId, DiskTO.IQN, sfVolume.getIqn());
    handleSnapshotDetails(csSnapshotId, DiskTO.SCSI_NAA_DEVICE_ID, sfVolume.getScsiNaaDeviceId());
  }
  else if (snapshotDetails != null && snapshotDetails.getValue() != null && snapshotDetails.getValue().equalsIgnoreCase("delete")) {
    snapshotDetails = snapshotDetailsDao.findDetail(csSnapshotId, SolidFireUtil.VOLUME_ID);
    SolidFireUtil.deleteVolume(sfConnection, Long.parseLong(snapshotDetails.getValue()));
    removeTempVolumeId(csSnapshotId);
    snapshotDetails = snapshotDetailsDao.findDetail(csSnapshotId, DiskTO.IQN);
    snapshotDetailsDao.remove(snapshotDetails.getId());
    snapshotDetails = snapshotDetailsDao.findDetail(csSnapshotId, DiskTO.SCSI_NAA_DEVICE_ID);
    snapshotDetailsDao.remove(snapshotDetails.getId());
  }
  else {
    throw new CloudRuntimeException("Invalid state in 'createTempVolume(SnapshotInfo, long)'");
  }
}
origin: apache/cloudstack

if (snapshotDataStoreVO != null) {
  parentSnapshotId = snapshotDataStoreVO.getParentSnapshotId();
  UsageEventUtils.publishUsageEvent(EventTypes.EVENT_SNAPSHOT_OFF_PRIMARY, parent.getAccountId(), parent.getDataCenterId(), parent.getId(),
      parent.getName(), null, null, 0L, 0L, parent.getClass().getName(), parent.getUuid());
  snapshotStoreDao.remove(snapshotDataStoreVO.getId());
org.apache.cloudstack.engine.subsystem.api.storageSnapshotInfogetAccountId

Popular methods of SnapshotInfo

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

Popular in Java

  • Reactive rest calls using spring rest template
  • addToBackStack (FragmentTransaction)
  • getContentResolver (Context)
  • getApplicationContext (Context)
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Option (scala)
  • Top 12 Jupyter Notebook extensions
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