Maor Lipchuk has uploaded a new change for review.

Change subject: core: Set storage type as set in the paramteres.
......................................................................

core: Set storage type as set in the paramteres.

1) Set the storage type of the storage after it was fetched from VDSM in
GetExistingStorageDomainListQuery
2) use getStorageDomainsList to be fetched without Storage Domains type.

Change-Id: I9a6f2f22b09de9daffde5e003528324237d6835f
Bug-Url: https://bugzilla.redhat.com/1157240
Signed-off-by: Maor Lipchuk <mlipc...@redhat.com>
---
M 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
1 file changed, 8 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/10/35110/1

diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
index a2edfde..e96006d 100644
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
+++ 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/GetExistingStorageDomainListQuery.java
@@ -35,8 +35,7 @@
                 .RunVdsCommand(
                         VDSCommandType.HSMGetStorageDomainsList,
                         new 
HSMGetStorageDomainsListVDSCommandParameters(getParameters()
-                                .getVdsId(), Guid.Empty, getParameters()
-                                .getStorageType(), getParameters()
+                                .getVdsId(), Guid.Empty, null, getParameters()
                                 .getStorageDomainType(), 
getParameters().getPath()));
         if (vdsReturnValue.getSucceeded()) {
             ArrayList<Guid> guidsFromIrs = (ArrayList<Guid>) 
vdsReturnValue.getReturnValue();
@@ -61,6 +60,13 @@
                         domain.setStorageStaticData(domainFromIrs.getFirst());
                         if (getParameters().getStorageFormatType() == null
                                 || getParameters().getStorageFormatType() == 
domain.getStorageFormat()) {
+                            if (domain.getStorageType().getValue() != 
getParameters().getStorageType().getValue()) {
+                                log.warn("The storage type of domain {} has 
been changed from {} to {}",
+                                        domain.getStorageName(),
+                                        domain.getStorageType().toString(),
+                                        
getParameters().getStorageType().toString());
+                                
domain.setStorageType(getParameters().getStorageType());
+                            }
                             returnValue.add(domain);
                         }
                     }


-- 
To view, visit http://gerrit.ovirt.org/35110
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I9a6f2f22b09de9daffde5e003528324237d6835f
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.5
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to