Moti Asayag has posted comments on this change.

Change subject: <core | restapi | tools | history | engine | userportal | 
webadmin>: short summary under 50 chars
......................................................................


Patch Set 1:

(7 comments)

the only relevant part from this patch is 

packaging/dbscripts/create_functions.sql
and the test. 

Please squash them into the previous patch.

I added an explanation within the comments for that.

Thanks.

http://gerrit.ovirt.org/#/c/29847/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllMacPoolsQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllMacPoolsQuery.java:

Line 8:         super(parameters);
Line 9:     }
Line 10: 
Line 11:     @Override
Line 12:     protected void executeQueryCommand() {
please abandon this change.
Line 13:         
getQueryReturnValue().setReturnValue(getDbFacade().getMacPoolDao().getAll(getUserID(),
Line 14:                 getParameters().isFiltered()));
Line 15:     }


http://gerrit.ovirt.org/#/c/29847/1/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetMacPoolByIdQuery.java
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetMacPoolByIdQuery.java:

Line 11:     }
Line 12: 
Line 13:     @Override
Line 14:     protected void executeQueryCommand() {
Line 15:         final Guid id = getParameters().getId();
please abandon this change.
Line 16:         final MacPool macPool = getDbFacade().getMacPoolDao().get(id, 
getUserID(), getParameters().isFiltered());
Line 17: 
Line 18:         getQueryReturnValue().setReturnValue(macPool);
Line 19:     }


http://gerrit.ovirt.org/#/c/29847/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MacPoolDao.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MacPoolDao.java:

Line 13: 
Line 14:     List<String> getAllMacsForMacPool(Guid macPoolId);
Line 15: 
Line 16:     MacPool getByDataCenterId(Guid id);
Line 17: 
please abandon this change.
Line 18:     MacPool get(Guid id, Guid userId, boolean filtered);
Line 19: 
Line 20:     List<MacPool> getAll(Guid userId, boolean filtered);


http://gerrit.ovirt.org/#/c/29847/1/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MacPoolDaoDbFacadeImpl.java
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/MacPoolDaoDbFacadeImpl.java:

Line 13: public class MacPoolDaoDbFacadeImpl extends 
DefaultGenericDaoDbFacade<MacPool, Guid> implements MacPoolDao {
Line 14:     public MacPoolDaoDbFacadeImpl() {
Line 15:         super("mac_pool");
Line 16:     }
Line 17: 
please abandon those changes.
Line 18:     @Override
Line 19:     public MacPool get(Guid id) {
Line 20:         return get(id, null, false);
Line 21:     }


http://gerrit.ovirt.org/#/c/29847/1/packaging/dbscripts/create_views.sql
File packaging/dbscripts/create_views.sql:

Line 1762: FROM numa_node as vm_numa_node
Line 1763: LEFT OUTER JOIN vm_static on vm_numa_node.vm_id = vm_static.vm_guid;
Line 1764: 
Line 1765: -- The user has permissions on a mac pool
Line 1766: CREATE OR REPLACE VIEW user_mac_pool_permissions_view_base 
(entity_id, granted_id)
those views aren't required. the mac pool admin is only administrator entity, 
so no need to hide them from admins.

This is my fault not figuring it out at the time writing those views and 
modifying the queries.

so, i'll just note on top of each file if it should be reverted.

please abandon this change.
Line 1767: AS
Line 1768: SELECT     object_id, ad_element_id
Line 1769: FROM       internal_permissions_view
Line 1770: WHERE      object_type_id = 28 AND role_type = 2


http://gerrit.ovirt.org/#/c/29847/1/packaging/dbscripts/mac_pools_sp.sql
File packaging/dbscripts/mac_pools_sp.sql:

Line 46:     DELETE FROM mac_pools WHERE id=v_id;
Line 47: END; $procedure$
Line 48: LANGUAGE plpgsql;
Line 49: 
Line 50: 
please abandon this change.
Line 51: Create or replace FUNCTION Getmac_poolBymac_poolId(v_id UUID, 
v_user_id uuid, v_is_filtered boolean) RETURNS SETOF mac_pools STABLE
Line 52:    AS $procedure$
Line 53: BEGIN
Line 54:    RETURN QUERY SELECT *


Line 86: CREATE OR REPLACE FUNCTION GetAllFrommac_pools()
Line 87:   RETURNS SETOF mac_pools STABLE
Line 88: AS $procedure$
Line 89: BEGIN
Line 90:    RETURN QUERY SELECT *
please abandon this change.
Line 91:    FROM mac_pools
Line 92:    WHERE NOT v_is_filtered OR EXISTS (SELECT 1
Line 93:                                       FROM   
user_mac_pool_permissions_view
Line 94:                                       WHERE  user_id = v_user_id AND 
entity_id = mac_pools.id);


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If2b2855fa3828b22d029e400fc2ddc472821cc41
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Martin Mucha <mmu...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@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