use of org.ovirt.engine.core.common.queries.NameQueryParameters 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();
}
}
Aggregations