Omer Frenkel has submitted this change and it was merged.
Change subject: core: create 3.0 compatible ovf when export from 3.0 compatible cluster
......................................................................
core: create 3.0 compatible ovf when export from 3.0 compatible cluster
This patch fix a problem that exporting VM/template from a 3.0
compatibility cluster resulted in a ovf file that wasn't 3.0 compatible,
therefore couldn't be imported in 3.0 environment.
There were 2 changed in the ovf files since 3.0:
1. The disk aliases are no longer in the pattern "Drive 1", "Drive
2"...
2. The usb-policy values changed from ["Enabled", "Disabled"] to
["ENABLED_NATIVE", "ENABLED_LEGACY", "DISABLED"]
So now, the export process checks the compatibility version of the
cluster to which the resource belongs, and create the ovf file with the
values that match that version.
Note that this is a quick-and-dirty fix. it is planned to be
re-implemented with a better design so that the code will be more
maintainable.
Change-Id: I5e7ecfd7c71a5c22ed7751de9f46b690d5236643
Signed-off-by: Arik Hadas <ahadas(a)redhat.com>
---
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/ExportVmCommand.java
M backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/RemoveImageCommand.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/snapshots/SnapshotsManager.java
M
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/utils/ClusterUtils.java
M
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/RemoveImageCommandTest.java
M
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/businessentities/UsbPolicy.java
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfManager.java
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfTemplateWriter.java
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfVmWriter.java
M
backend/manager/modules/utils/src/main/java/org/ovirt/engine/core/utils/ovf/OvfWriter.java
M
backend/manager/modules/utils/src/test/java/org/ovirt/engine/core/utils/ovf/OvfManagerTest.java
12 files changed, 179 insertions(+), 30 deletions(-)
Approvals:
Omer Frenkel: Verified; Looks good to me, approved
--
To view, visit
http://gerrit.ovirt.org/13320
To unsubscribe, visit
http://gerrit.ovirt.org/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I5e7ecfd7c71a5c22ed7751de9f46b690d5236643
Gerrit-PatchSet: 5
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Arik Hadas <ahadas(a)redhat.com>
Gerrit-Reviewer: Juan Hernandez <juan.hernandez(a)redhat.com>
Gerrit-Reviewer: Omer Frenkel <ofrenkel(a)redhat.com>