Michael Pasternak has posted comments on this change.

Change subject: restapi : Creating template by specifing vm name, does not work 
(#915285)
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(4 inline comments)

....................................................
File backend/manager/dbscripts/vms_sp.sql
Line 768:    AS $procedure$
Line 769: BEGIN
Line 770: RETURN QUERY SELECT DISTINCT vms.*
Line 771:    FROM vms
Line 772:    WHERE vm_name = v_vm_name
you should operate on a certain datacenter
Line 773:    AND   (NOT v_is_filtered OR EXISTS (SELECT 1
Line 774:                                        FROM   user_vm_permissions_view
Line 775:                                        WHERE  user_id = v_user_id AND 
entity_id = vms.vm_guid));
Line 776: END; $procedure$


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAODbFacadeImpl.java
Line 50: 
Line 51:     @Override
Line 52:     public VM getByName(String name, Guid userID, boolean isFiltered) {
Line 53:         return getCallsHandler().executeRead("GetVmByVmName", 
VMRowMapper.instance, getCustomMapSqlParameterSource()
Line 54:                 .addValue("vm_name", name).addValue("user_id", 
userID).addValue("is_filtered", isFiltered));
same
Line 55:     }
Line 56: 
Line 57:     @Override
Line 58:     public VM getForHibernationImage(Guid id) {


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VmDAO.java
Line 45:      * @param isFiltered
Line 46:      *            Whether the results should be filtered according to 
the user's permissions
Line 47:      * @return the VM
Line 48:      */
Line 49:     VM getByName(String name, Guid userID, boolean isFiltered);
you should be asking here for a DC id
Line 50: 
Line 51:     /**
Line 52:      * Retrieves the VM for the specified hibernate image.
Line 53:      *


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendTemplatesResource.java
Line 129:                            template.getVm().getId());
Line 130:         } else if (isFiltered()) {
Line 131:             vm = 
getEntity(org.ovirt.engine.core.common.businessentities.VM.class,
Line 132:                            VdcQueryType.GetVmByVmName,
Line 133:                            new 
GetVmByVmNameParameters(template.getVm().getName()),
you should be passing here DC id (you can fetch it by the destination cluster 
for vm)
Line 134:                            template.getVm().getName());
Line 135:         } else  {
Line 136:             vm = 
getEntity(org.ovirt.engine.core.common.businessentities.VM.class,
Line 137:                            SearchType.VM,


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ibe6ff6059c22a853c76a0720e5c9e330f600712b
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to