Search in sources :

Example 6 with CreateObjectCommand

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;
}
Also used : ResizeVolumeAnswer(com.cloud.agent.api.storage.ResizeVolumeAnswer) Answer(com.cloud.agent.api.Answer) CopyCmdAnswer(org.apache.cloudstack.storage.command.CopyCmdAnswer) EndPoint(org.apache.cloudstack.engine.subsystem.api.storage.EndPoint) CreateObjectCommand(org.apache.cloudstack.storage.command.CreateObjectCommand)

Aggregations

Answer (com.cloud.agent.api.Answer)6 CreateObjectCommand (org.apache.cloudstack.storage.command.CreateObjectCommand)6 CopyCmdAnswer (org.apache.cloudstack.storage.command.CopyCmdAnswer)5 ConnectionTest (com.cloud.hypervisor.ovm3.objects.ConnectionTest)3 LinuxTest (com.cloud.hypervisor.ovm3.objects.LinuxTest)3 StoragePluginTest (com.cloud.hypervisor.ovm3.objects.StoragePluginTest)3 XenTest (com.cloud.hypervisor.ovm3.objects.XenTest)3 XmlTestResultTest (com.cloud.hypervisor.ovm3.objects.XmlTestResultTest)3 Ovm3ConfigurationTest (com.cloud.hypervisor.ovm3.resources.helpers.Ovm3ConfigurationTest)3 Ovm3SupportTest (com.cloud.hypervisor.ovm3.support.Ovm3SupportTest)3 EndPoint (org.apache.cloudstack.engine.subsystem.api.storage.EndPoint)3 Test (org.junit.Test)3 ResizeVolumeAnswer (com.cloud.agent.api.storage.ResizeVolumeAnswer)2 CreateCmdResult (org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult)2 SnapshotObjectTO (org.apache.cloudstack.storage.to.SnapshotObjectTO)2 StorageUnavailableException (com.cloud.exception.StorageUnavailableException)1 CreateSnapshotPayload (com.cloud.storage.CreateSnapshotPayload)1 CloudRuntimeException (com.cloud.utils.exception.CloudRuntimeException)1 DataObject (org.apache.cloudstack.engine.subsystem.api.storage.DataObject)1 TemplateObjectTO (org.apache.cloudstack.storage.to.TemplateObjectTO)1