Moti Asayag has posted comments on this change.

Change subject: core: Add Vnic Profile support to RemoveNetworkQoS
......................................................................


Patch Set 2:

(5 comments)

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetAllProfilesByNetworkQoSIdQuery.java
Line 3: 
Line 4: import org.ovirt.engine.core.common.queries.IdQueryParameters;
Line 5: 
Line 6: 
Line 7: public class GetAllProfilesByNetworkQoSIdQuery<P extends 
IdQueryParameters> extends QueriesCommandBase<P> {
s/GetAllProfilesByNetworkQoSIdQuery/GetAllProfilesByNetworkQosIdQuery
Line 8:     public GetAllProfilesByNetworkQoSIdQuery(P parameters) {
Line 9:         super(parameters);
Line 10:     }
Line 11: 


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
Line 270:     GetAllNetworksForProvider,
Line 271: 
Line 272:     //Network QoS
Line 273:     GetAllNetworkQosByStoragePoolId,
Line 274:     GetAllProfilesByNetworkQoSId,
s/GetAllProfilesByNetworkQoSId/GetAllProfilesByNetworkQosId
Line 275: 
Line 276:     GetWatchdog(VdcQueryAuthType.User),
Line 277:     GetConsoleDevices(VdcQueryAuthType.User),
Line 278: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/VnicProfileViewDaoDbFacadeImpl.java
Line 100:         }
Line 101:     }
Line 102: 
Line 103:     @Override
Line 104:     public List<VnicProfileView> getAllForNetworkQoS(Guid qosId) {
s/getAllForNetworkQoS/getAllForNetworkQos
Line 105:         return 
getCallsHandler().executeReadList("GetAllVnicProfileByNetworkQoSId",
Line 106:                 VnicProfileViewRowMapper.INSTANCE,
Line 107:                 
getCustomMapSqlParameterSource().addValue("network_qos_id", qosId));
Line 108:     }


....................................................
File packaging/dbscripts/network_sp.sql
Line 1181:                                       WHERE  user_id = v_user_id AND 
entity_id = vnic_profiles_view.id));
Line 1182: END; $procedure$
Line 1183: LANGUAGE plpgsql;
Line 1184: 
Line 1185: Create or replace FUNCTION 
GetAllVnicProfileByNetworkQoSId(v_network_qos_id UUID) RETURNS SETOF 
vnic_profiles_view
s/GetAllVnicProfileByNetworkQoSId/GetVnicProfileViewsByNetworkQosId
Line 1186:    AS $procedure$
Line 1187: BEGIN
Line 1188: RETURN QUERY SELECT *
Line 1189:    FROM vnic_profiles_view


Line 1190:    WHERE network_qos_id = v_network_qos_id;
Line 1191: END; $procedure$
Line 1192: LANGUAGE plpgsql;
Line 1193: 
Line 1194: Create or replace FUNCTION 
UpdateNullQoSIdByNetworkQoSId(v_network_qos_id UUID) RETURNS VOID
what is the motivation of this sp? if we permit to delete a network qos element 
which is referenced by a vnic profile (or by any other entity) we should modify 
the foreign key of the reference object (e.g. fk_vnic_profile_network_qos_id) 
to 'on cascade set null' so upon a deletion from network-qos, the column on 
network_qos_id.vnic_profile will be set to null.
Line 1195:    AS $procedure$
Line 1196: BEGIN
Line 1197:    UPDATE vnic_profiles
Line 1198:    SET network_qos_id = NULL


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I401cff6b67b5fe62303323849f11bd9d03892201
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <oma...@redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com>
Gerrit-Reviewer: Doron Fediuck <dfedi...@redhat.com>
Gerrit-Reviewer: Gilad Chaplik <gchap...@redhat.com>
Gerrit-Reviewer: Moti Asayag <masa...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: ofri masad <oma...@redhat.com>
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to