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

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

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

origin: apache/cloudstack

private HostVO getHost(SnapshotInfo snapshotInfo) {
  HypervisorType hypervisorType = snapshotInfo.getHypervisorType();
  if (HypervisorType.XenServer.equals(hypervisorType)) {
    HostVO hostVO = getHost(snapshotInfo.getDataCenterId(), hypervisorType, true);
    if (hostVO == null) {
      hostVO = getHost(snapshotInfo.getDataCenterId(), hypervisorType, false);
      if (hostVO == null) {
        throw new CloudRuntimeException("Unable to locate an applicable host in data center with ID = " + snapshotInfo.getDataCenterId());
      }
    }
    return hostVO;
  }
  if (HypervisorType.VMware.equals(hypervisorType) || HypervisorType.KVM.equals(hypervisorType)) {
    return getHost(snapshotInfo.getDataCenterId(), hypervisorType, false);
  }
  throw new CloudRuntimeException("Unsupported hypervisor type");
}
origin: apache/cloudstack

private DataStore findSnapshotImageStore(SnapshotInfo snapshot) {
  Boolean fullSnapshot = true;
  Boolean snapshotFullBackup = snapshot.getFullBackup();
  if (snapshotFullBackup != null) {
    fullSnapshot = snapshotFullBackup;
  }
  if (fullSnapshot) {
    return dataStoreMgr.getImageStore(snapshot.getDataCenterId());
  } else {
    SnapshotInfo parentSnapshot = snapshot.getParent();
    // Note that DataStore information in parentSnapshot is for primary
    // data store here, we need to
    // find the image store where the parent snapshot backup is located
    SnapshotDataStoreVO parentSnapshotOnBackupStore = null;
    if (parentSnapshot != null) {
      parentSnapshotOnBackupStore = _snapshotStoreDao.findBySnapshot(parentSnapshot.getId(), DataStoreRole.Image);
    }
    if (parentSnapshotOnBackupStore == null) {
      return dataStoreMgr.getImageStore(snapshot.getDataCenterId());
    }
    return dataStoreMgr.getDataStore(parentSnapshotOnBackupStore.getDataStoreId(), parentSnapshotOnBackupStore.getRole());
  }
}
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

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

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());
origin: apache/cloudstack

HostVO hostVO = getHost(snapshotInfo.getDataCenterId(), HypervisorType.XenServer, true);
origin: apache/cloudstack

hostVO = getHost(snapshotInfo.getDataCenterId(), snapshotInfo.getHypervisorType(), false);
origin: apache/cloudstack

hostVO = getHost(snapshotInfo.getDataCenterId(), snapshotInfo.getHypervisorType(), false);
org.apache.cloudstack.engine.subsystem.api.storageSnapshotInfogetDataCenterId

Popular methods of SnapshotInfo

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

Popular in Java

  • Updating database using SQL prepared statement
  • addToBackStack (FragmentTransaction)
  • findViewById (Activity)
  • getContentResolver (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • Best IntelliJ 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