Maor Lipchuk has posted comments on this change.

Change subject: core: Add snapshot to the OVF generation
......................................................................


Patch Set 20:

(3 comments)

http://gerrit.ovirt.org/#/c/25947/20/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/OvfDataUpdater.java:

Line 397:         return vmsAndTemplateMetadata;
Line 398:     }
Line 399: 
Line 400:     protected ArrayList<DiskImage> getVmImagesFromDb(VM vm) {
Line 401:         ArrayList<DiskImage> vmDisks = new ArrayList<>();
> /s/vmDisks/allVmImages
done
Line 402:         List<DiskImage> filteredDisks = 
ImagesHandler.filterImageDisks(vm.getDiskList(), false, true, true);
Line 403: 
Line 404:         for (DiskImage diskImage : filteredDisks) {
Line 405:             vmDisks.addAll(getAllImageSnapshots(diskImage));


Line 417:      * Returns true if all snapshots have a valid status to use in 
the OVF.
Line 418:      */
Line 419:     protected boolean verifySnapshotsStatus(List<Snapshot> snapshots) 
{
Line 420:         for (Snapshot snapshot : snapshots) {
Line 421:             if (snapshot.getStatus() != SnapshotStatus.OK) {
> we need to have here BROKEN as well, otherwise OVFs won't be updated for vm
broken is about to be removed
Line 422:                 return false;
Line 423:             }
Line 424:         }
Line 425:         return true;


http://gerrit.ovirt.org/#/c/25947/20/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/OvfDataUpdaterTest.java
File 
backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/OvfDataUpdaterTest.java:

Line 68: import org.ovirt.engine.core.utils.lock.EngineLock;
Line 69: 
Line 70: /** A test class for the {@link OvfDataUpdater} class */
Line 71: @RunWith(MockitoJUnitRunner.class)
Line 72: public class OvfDataUpdaterTest {
> please add tests
will be added in later patch
Line 73:     private final int ITEMS_COUNT_PER_UPDATE = 100;
Line 74:     OvfDataUpdater updater;
Line 75: 
Line 76:     @Mock


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I8ba05c2e362fb9b22d6b4fb5a14698ad99d7bd1e
Gerrit-PatchSet: 20
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Daniel Erez <de...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: automat...@ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to