use of org.apache.cloudstack.storage.command.CreateObjectCommand in project cloudstack by apache.
the class CloudStackPrimaryDataStoreDriverImpl method createVolume.
public Answer createVolume(VolumeInfo volume) throws StorageUnavailableException {
if (s_logger.isDebugEnabled()) {
s_logger.debug("Creating volume: " + volume);
}
CreateObjectCommand cmd = new CreateObjectCommand(volume.getTO());
EndPoint ep = epSelector.select(volume);
Answer answer = null;
if (ep == null) {
String errMsg = "No remote endpoint to send DeleteCommand, check if host or ssvm is down?";
s_logger.error(errMsg);
answer = new Answer(cmd, false, errMsg);
} else {
answer = ep.sendMessage(cmd);
}
return answer;
}
Aggregations