Tabnine Logo
ManagementService.listStoragePoolsForMigrationOfVolume
Code IndexAdd Tabnine to your IDE (free)

How to use
listStoragePoolsForMigrationOfVolume
method
in
com.cloud.server.ManagementService

Best Java code snippets using com.cloud.server.ManagementService.listStoragePoolsForMigrationOfVolume (Showing top 2 results out of 315)

origin: apache/cloudstack

@Override
public void execute() {
  Pair<List<? extends StoragePool>, List<? extends StoragePool>> pools = _mgr.listStoragePoolsForMigrationOfVolume(getId());
  ListResponse<StoragePoolResponse> response = new ListResponse<StoragePoolResponse>();
  List<StoragePoolResponse> poolResponses = new ArrayList<StoragePoolResponse>();
  List<? extends StoragePool> allPools = pools.first();
  List<? extends StoragePool> suitablePoolList = pools.second();
  for (StoragePool pool : allPools) {
    StoragePoolResponse poolResponse = _responseGenerator.createStoragePoolForMigrationResponse(pool);
    Boolean suitableForMigration = false;
    for (StoragePool suitablePool : suitablePoolList) {
      if (StringUtils.equals(suitablePool.getUuid(), pool.getUuid())) {
        suitableForMigration = true;
        break;
      }
    }
    poolResponse.setSuitableForMigration(suitableForMigration);
    poolResponse.setObjectName("storagepool");
    poolResponses.add(poolResponse);
  }
  sortPoolsBySuitabilityAndName(poolResponses);
  response.setResponses(poolResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}
origin: MissionCriticalCloud/cosmic

@Override
public void execute() {
  final Pair<List<? extends StoragePool>, List<? extends StoragePool>> pools = _mgr.listStoragePoolsForMigrationOfVolume(getId());
  final ListResponse<StoragePoolResponse> response = new ListResponse<>();
  final List<StoragePoolResponse> poolResponses = new ArrayList<>();
  final List<? extends StoragePool> allPools = pools.first();
  final List<? extends StoragePool> suitablePoolList = pools.second();
  for (final StoragePool pool : allPools) {
    final StoragePoolResponse poolResponse = _responseGenerator.createStoragePoolForMigrationResponse(pool);
    Boolean suitableForMigration = false;
    for (final StoragePool suitablePool : suitablePoolList) {
      if (suitablePool.getId() == pool.getId()) {
        suitableForMigration = true;
        break;
      }
    }
    poolResponse.setSuitableForMigration(suitableForMigration);
    poolResponse.setObjectName("storagepool");
    poolResponses.add(poolResponse);
  }
  response.setResponses(poolResponses);
  response.setResponseName(getCommandName());
  this.setResponseObject(response);
}
com.cloud.serverManagementServicelistStoragePoolsForMigrationOfVolume

Javadoc

List storage pools for live migrating of a volume. The API returns list of all pools in the cluster to which the volume can be migrated. Current pool is not included in the list.

Popular methods of ManagementService

  • searchForClusters
    Searches for Clusters by the specified search criteria
  • searchForConfigurations
    returns the a map of the names/values in the configuraton table
  • updateHostPassword
  • generateRandomPassword
    Generates a random password that will be used (initially) by newly created and started virtual machi
  • listDeploymentPlanners
  • searchForVlans
    Searches for vlan by the specified search criteria Can search by: "id", "vlan", "name", "zoneID"
  • addGuestOs
    Adds a new guest OS
  • addGuestOsMapping
    Adds a new guest OS mapping
  • archiveAlerts
    Archive alerts
  • archiveEvents
    Archive events
  • cleanupVMReservations
  • createSSHKeyPair
    Creates a new
  • cleanupVMReservations,
  • createSSHKeyPair,
  • deleteAlerts,
  • deleteEvents,
  • deleteSSHKeyPair,
  • destroySystemVM,
  • findSystemVMTypeById,
  • getAddedGuestOs,
  • getAddedGuestOsMapping,
  • getCloudIdentifierResponse

Popular in Java

  • Updating database using SQL prepared statement
  • scheduleAtFixedRate (ScheduledExecutorService)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • compareTo (BigDecimal)
  • FileNotFoundException (java.io)
    Thrown when a file specified by a program cannot be found.
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SQLException (java.sql)
    An exception that indicates a failed JDBC operation. It provides the following information about pro
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top plugins for Android Studio
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