StoragePool.getHostAddress
Code IndexAdd Codota to your IDE (free)

Best code snippets using com.cloud.storage.StoragePool.getHostAddress(Showing top 5 results out of 315)

origin: apache/cloudstack

public StorageFilerTO(StoragePool pool) {
  this.id = pool.getId();
  this.host = pool.getHostAddress();
  this.port = pool.getPort();
  this.path = pool.getPath();
  this.type = pool.getPoolType();
  this.uuid = pool.getUuid();
  this.userInfo = pool.getUserInfo();
}
origin: apache/cloudstack

@Override
public void removeStoragePoolFromCluster(long hostId, String iScsiName, StoragePool storagePool) {
  final Map<String, String> details = new HashMap<>();
  details.put(DeleteStoragePoolCommand.DATASTORE_NAME, iScsiName);
  details.put(DeleteStoragePoolCommand.IQN, iScsiName);
  details.put(DeleteStoragePoolCommand.STORAGE_HOST, storagePool.getHostAddress());
  details.put(DeleteStoragePoolCommand.STORAGE_PORT, String.valueOf(storagePool.getPort()));
  final DeleteStoragePoolCommand cmd = new DeleteStoragePoolCommand();
  cmd.setDetails(details);
  cmd.setRemoveDatastore(true);
  final Answer answer = _agentMgr.easySend(hostId, cmd);
  if (answer == null || !answer.getResult()) {
    String errMsg = "Error interacting with host (related to DeleteStoragePoolCommand)" +
        (StringUtils.isNotBlank(answer.getDetails()) ? ": " + answer.getDetails() : "");
    s_logger.error(errMsg);
    throw new CloudRuntimeException(errMsg);
  }
}
origin: apache/cloudstack

public ModifyStoragePoolCommand(boolean add, StoragePool pool) {
  this(add, pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
}
origin: apache/cloudstack

/**
 * Tell the underlying storage plug-in to create a new volume, put it in the VAG of the destination cluster, and
 * send a command to the destination cluster to create an SR and to attach to the SR from all hosts in the cluster.
 */
private String handleManagedVolumePreMigration(VolumeInfo volumeInfo, StoragePool storagePool, Host destHost) {
  final PrimaryDataStoreDriver pdsd = (PrimaryDataStoreDriver)volumeInfo.getDataStore().getDriver();
  VolumeDetailVO volumeDetailVo = new VolumeDetailVO(volumeInfo.getId(), PrimaryDataStoreDriver.BASIC_CREATE, Boolean.TRUE.toString(), false);
  volumeDetailsDao.persist(volumeDetailVo);
  pdsd.createAsync(volumeInfo.getDataStore(), volumeInfo, null);
  volumeDetailVo = new VolumeDetailVO(volumeInfo.getId(), PrimaryDataStoreDriver.BASIC_GRANT_ACCESS, Boolean.TRUE.toString(), false);
  volumeDetailsDao.persist(volumeDetailVo);
  pdsd.grantAccess(volumeInfo, destHost, volumeInfo.getDataStore());
  final Map<String, String> details = new HashMap<>();
  final String iqn = getBasicIqn(volumeInfo.getId());
  details.put(CreateStoragePoolCommand.DATASTORE_NAME, iqn);
  details.put(CreateStoragePoolCommand.IQN, iqn);
  details.put(CreateStoragePoolCommand.STORAGE_HOST, storagePool.getHostAddress());
  details.put(CreateStoragePoolCommand.STORAGE_PORT, String.valueOf(storagePool.getPort()));
  final CreateStoragePoolCommand cmd = new CreateStoragePoolCommand(true, storagePool);
  cmd.setDetails(details);
  cmd.setCreateDatastore(true);
  final Answer answer = agentMgr.easySend(destHost.getId(), cmd);
  if (answer == null || !answer.getResult()) {
    String errMsg = "Error interacting with host (related to CreateStoragePoolCommand)" +
        (StringUtils.isNotBlank(answer.getDetails()) ? ": " + answer.getDetails() : "");
    s_logger.error(errMsg);
    throw new CloudRuntimeException(errMsg);
  }
  return iqn;
}
origin: apache/cloudstack

public DeleteStoragePoolCommand(StoragePool pool) {
  this(pool, LOCAL_PATH_PREFIX + File.separator + UUID.nameUUIDFromBytes((pool.getHostAddress() + pool.getPath()).getBytes()));
}
com.cloud.storageStoragePoolgetHostAddress

Popular methods of StoragePool

  • getId
  • getPodId
  • getPoolType
  • getDataCenterId
  • getPath
  • getClusterId
  • getName
  • getUuid
  • getPort
  • isManaged
  • getCapacityBytes
  • getHypervisor
  • getCapacityBytes,
  • getHypervisor,
  • getStatus,
  • isInMaintenance,
  • isShared,
  • getCapacityIops,
  • getStorageProviderName,
  • getUserInfo,
  • isLocal

Popular classes and methods

  • onCreateOptionsMenu (Activity)
  • getOriginalFilename (MultipartFile)
  • runOnUiThread (Activity)
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • String (java.lang)
    An immutable sequence of characters/code units ( chars). A String is represented by array of UTF-16
  • Thread (java.lang)
    A Thread is a concurrent unit of execution. It has its own call stack for methods being invoked, the
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • Callable (java.util.concurrent)
    A task that returns a result and may throw an exception. Implementors define a single method with no
  • Manifest (java.util.jar)
    The Manifest class is used to obtain attribute information for a JarFile and its entries.
  • LogFactory (org.apache.commons.logging)
    Factory for creating Log instances, with discovery and configuration features similar to that employ

For IntelliJ IDEA,
Android Studio or Eclipse

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)