Maor Lipchuk has posted comments on this change.

Change subject: core: Support detach Storage Domain containing entities.
......................................................................


Patch Set 28:

(5 comments)

http://gerrit.ovirt.org/#/c/24286/28/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/storage/StorageHandlingCommandBase.java:

Line 169:         }
Line 170:         return true;
Line 171:     }
Line 172: 
Line 173:     protected boolean 
canDetachStorageDomainWithVmsAndDisks(StorageDomain storageDomain) {
> if you can when you rebase, let's avoid checking if the domain isn't data d
done
Line 174:         if (!validate(new 
StorageDomainValidator(storageDomain).hasVmsWithDisksOnOtherStorageDomains()) ||
Line 175:                 !validate(new 
StorageDomainValidator(storageDomain).hasTempaltesWithDisksOnOtherStorageDomains()))
 {
Line 176:             return false;
Line 177:         }


Line 171:     }
Line 172: 
Line 173:     protected boolean 
canDetachStorageDomainWithVmsAndDisks(StorageDomain storageDomain) {
Line 174:         if (!validate(new 
StorageDomainValidator(storageDomain).hasVmsWithDisksOnOtherStorageDomains()) ||
Line 175:                 !validate(new 
StorageDomainValidator(storageDomain).hasTempaltesWithDisksOnOtherStorageDomains()))
 {
> please use same StorageDomain validator for both
done
Line 176:             return false;
Line 177:         }
Line 178: 
Line 179:         List<VM> vmRelatedToDomain = 
getVMsForStorageDomain(storageDomain.getId());


http://gerrit.ovirt.org/#/c/24286/28/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmTemplateDAO.java:

Line 186:      */
Line 187:     VmTemplate getTemplateWithLatestVersionInChain(Guid id);
Line 188: 
Line 189:     /**
Line 190:      * Retrieves all Template names which contains disks on other 
Storage Domain other then the storageDomain GUID.
> /s/Template names/Templates
done
Line 191:      *
Line 192:      * @param storageDomainGuid
Line 193:      *            the storage domain GUID
Line 194:      * @return List of Templates


http://gerrit.ovirt.org/#/c/24286/28/packaging/dbscripts/vms_sp.sql
File packaging/dbscripts/vms_sp.sql:

Line 1079:    AS $procedure$
Line 1080: BEGIN
Line 1081:       RETURN QUERY SELECT DISTINCT vms.*
Line 1082:       FROM vms
Line 1083:       INNER JOIN (SELECT vm_static.vm_guid
> add entity type to the inner query
done
Line 1084:                   FROM vm_static
Line 1085:                   INNER JOIN vm_device vd ON vd.vm_id = 
vm_static.vm_guid
Line 1086:                   INNER JOIN images i ON i.image_group_id = 
vd.device_id
Line 1087:                   INNER JOIN (SELECT image_id


Line 1374: END; $procedure$
Line 1375: LANGUAGE plpgsql;
Line 1376: 
Line 1377: 
Line 1378: Create or replace FUNCTION 
GetAllVmTemplatesWithDisksOnOtherStorageDomain(v_storage_domain_id UUID) 
RETURNS SETOF vms STABLE
> move to templates_sp
done
Line 1379: AS $procedure$
Line 1380: BEGIN
Line 1381: RETURN QUERY SELECT DISTINCT templates.*
Line 1382:       FROM vm_templates_view templates


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I971fe6acd4a2667a09487c5e1108cf7c759587f1
Gerrit-PatchSet: 28
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: Eli Mesika <emes...@redhat.com>
Gerrit-Reviewer: Liran Zelkha <lzel...@redhat.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: Tal Nisan <tni...@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