package org.ovirt.engine.core.vdsbroker.irsbroker;

import org.ovirt.engine.core.common.vdscommands.*;

public class AttachStorageDomainVDSCommand<P extends AttachStorageDomainVDSCommandParameters>
        extends IrsBrokerCommand<P> {
    public AttachStorageDomainVDSCommand(P parameters) {
        super(parameters);
    }

    @Override
    protected void ExecuteIrsBrokerCommand() {
        status = getIrsProxy().attachStorageDomain(getParameters().getStorageDomainId().toString(),
                getParameters().getStoragePoolId().toString());
        ProceedProxyReturnValue();
    }
}

@@ -85,21 +85,282 @@
 mon.
-vdscommands.*
+businessentities.StorageDomainType;%0Aimport org.ovirt.engine.core.common.businessentities.storage_domains;%0Aimport org.ovirt.engine.core.common.vdscommands.*;%0Aimport org.ovirt.engine.core.dal.dbbroker.DbFacade;%0Aimport org.ovirt.engine.core.vdsbroker.vdsbroker.VDSExceptionBase
 ;%0A%0Ap
@@ -806,16 +806,16 @@
 ing());%0A
-
         
@@ -846,11 +846,508 @@
 );%0A    %7D
+%0A%0A    @Override%0A    protected VDSExceptionBase createDefaultConcreteException(String errorMessage) %7B%0A        storage_domains domainFromDb = DbFacade.getInstance().getStorageDomainDao().get(getParameters().getStorageDomainId());%0A        if (domainFromDb == null %7C%7C domainFromDb.getstorage_domain_type() == StorageDomainType.ImportExport) %7B%0A            return new IrsOperationFailedNoFailoverException(errorMessage);%0A        %7D%0A        return super.createDefaultConcreteException(errorMessage);%0A    %7D
 %0A%7D%0A

attach sd - avoid failover in case of export domain