Search in sources :

Example 91 with StorageDomainStatic

use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.

the class VdsEventListener method vdsNonOperational.

@Override
public void vdsNonOperational(Guid vdsId, NonOperationalReason reason, boolean logCommand, Guid domainId) {
    StorageDomainStatic storageDomain = storageDomainStaticDao.get(domainId);
    Map<String, String> customLogValues = null;
    if (storageDomain != null) {
        customLogValues = Collections.singletonMap("StorageDomainNames", storageDomain.getName());
    }
    vdsNonOperational(vdsId, reason, logCommand, domainId, customLogValues);
}
Also used : StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic)

Example 92 with StorageDomainStatic

use of org.ovirt.engine.core.common.businessentities.StorageDomainStatic in project ovirt-engine by oVirt.

the class BackendExternalVmImportsResource method getStorageDomainId.

private Guid getStorageDomainId(ExternalVmImport vmImport) {
    if (vmImport.getStorageDomain().isSetId()) {
        return asGuid(vmImport.getStorageDomain().getId());
    } else /* if (vmImport.getStorageDomain().isSetName()) */
    {
        String storageDomainName = vmImport.getStorageDomain().getName();
        StorageDomainStatic storageDomain = getEntity(StorageDomainStatic.class, QueryType.GetStorageDomainByName, new NameQueryParameters(storageDomainName), storageDomainName, true);
        return storageDomain.getId();
    }
}
Also used : StorageDomainStatic(org.ovirt.engine.core.common.businessentities.StorageDomainStatic) NameQueryParameters(org.ovirt.engine.core.common.queries.NameQueryParameters)

Aggregations

StorageDomainStatic (org.ovirt.engine.core.common.businessentities.StorageDomainStatic)92 Guid (org.ovirt.engine.core.compat.Guid)39 StorageDomain (org.ovirt.engine.core.common.businessentities.StorageDomain)35 ArrayList (java.util.ArrayList)33 StoragePool (org.ovirt.engine.core.common.businessentities.StoragePool)31 Test (org.junit.Test)23 Pair (org.ovirt.engine.core.common.utils.Pair)19 StorageServerConnections (org.ovirt.engine.core.common.businessentities.StorageServerConnections)18 StorageDomainType (org.ovirt.engine.core.common.businessentities.StorageDomainType)15 QueryReturnValue (org.ovirt.engine.core.common.queries.QueryReturnValue)15 VDSReturnValue (org.ovirt.engine.core.common.vdscommands.VDSReturnValue)14 List (java.util.List)13 ActionReturnValue (org.ovirt.engine.core.common.action.ActionReturnValue)13 StorageDomainManagementParameter (org.ovirt.engine.core.common.action.StorageDomainManagementParameter)13 StorageType (org.ovirt.engine.core.common.businessentities.storage.StorageType)13 VDS (org.ovirt.engine.core.common.businessentities.VDS)12 HashSet (java.util.HashSet)11 ActionParametersBase (org.ovirt.engine.core.common.action.ActionParametersBase)11 ActionType (org.ovirt.engine.core.common.action.ActionType)11 AttachStorageDomainToPoolParameters (org.ovirt.engine.core.common.action.AttachStorageDomainToPoolParameters)10