Gilad Chaplik has uploaded a new change for review.

Change subject: core: handle ovf empty UUID for quota
......................................................................

core: handle ovf empty UUID for quota

Due to latest changes, quota field cannot accept empty UUID.
prior to that change, a VM could have been exported with an empty
UUID to OVF file.
Altering the ovf reader to ignore empty UUID for quota.

Change-Id: Ibcd0b29861a43bcb77acd7c3e0bae58d7b27b8f4
Bug-Url: https://bugzilla.redhat.com/1025773
Signed-off-by: Gilad Chaplik <[email protected]>
---
M 
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
1 file changed, 4 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/79/20979/1

diff --git 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
index e626500..ee5a7db 100644
--- 
a/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
+++ 
b/backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmReader.java
@@ -166,7 +166,10 @@
         }
         node = content.SelectSingleNode("quota_id");
         if (node != null) {
-            _vm.getStaticData().setQuotaId(new Guid(node.InnerText));
+            Guid quotaId = new Guid(node.InnerText);
+            if (!Guid.Empty.equals(quotaId)) {
+                _vm.getStaticData().setQuotaId(quotaId);
+            }
         }
         OvfLogEventHandler<VmStatic> handler = new 
VMStaticOvfLogHandler(_vm.getStaticData());
 


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibcd0b29861a43bcb77acd7c3e0bae58d7b27b8f4
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: ovirt-engine-3.3
Gerrit-Owner: Gilad Chaplik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to