Oved Ourfali has posted comments on this change.

Change subject: core: Add QoS to to DB and entities
......................................................................


Patch Set 10: (10 inline comments)

ask Eli to review DB part as well.

....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/qos/RemoveNetworkQoSCommand.java
Line 17:         if (validateParameters()) {
Line 18:             NetworkQoS oldNetworkQoS =  
getNetworkQoSDao().get(getNetworkQoS().getId());
Line 19:             if (oldNetworkQoS == null) {
Line 20:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_FOUND);
Line 21:             } else if 
(!oldNetworkQoS.getStoragePoolId().equals(getNetworkQoS().getStoragePoolId())) {
fix indentation.
Line 22:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_INVALID_DC_ID);
Line 23:             }
Line 24:         }
Line 25:         return true;


....................................................
File 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/qos/UpdateNetworkQoSCommand.java
Line 17:         if (validateParameters()) {
Line 18:             NetworkQoS oldNetworkQoS =  
getNetworkQoSDao().get(getNetworkQoS().getId());
Line 19:             if (oldNetworkQoS == null) {
Line 20:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_FOUND);
Line 21:             } else if 
(!oldNetworkQoS.getStoragePoolId().equals(getNetworkQoS().getStoragePoolId())) {
fix indentation.
Line 22:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_INVALID_DC_ID);
Line 23:             } else {
Line 24:                 if (validateValues() && 
!oldNetworkQoS.getName().equals(getNetworkQoS().getName())) {
Line 25:                     return validateNameNotExistInDC();


Line 20:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_NOT_FOUND);
Line 21:             } else if 
(!oldNetworkQoS.getStoragePoolId().equals(getNetworkQoS().getStoragePoolId())) {
Line 22:                 return 
failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_QOS_INVALID_DC_ID);
Line 23:             } else {
Line 24:                 if (validateValues() && 
!oldNetworkQoS.getName().equals(getNetworkQoS().getName())) {
fix indentation.
Line 25:                     return validateNameNotExistInDC();
Line 26:                 }
Line 27:             }
Line 28:         }


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/config/ConfigValues.java
Line 1450: 
Line 1451:     @TypeConverterAttribute(Double.class)
Line 1452:     @DefaultValueAttribute("0.2")
Line 1453:     AverageToBurstRatio(521),
Line 1454: 
you missed the latter two config values in the DB upgrade.
Also, where are they used?
Line 1455:     Invalid(65535);
Line 1456: 
Line 1457:     private int intValue;
Line 1458:     private static Map<Integer, ConfigValues> mappings;


....................................................
File 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
Line 256:     GetAllProviders,
Line 257:     GetAllNetworksForProvider,
Line 258: 
Line 259:     //Network QoS
Line 260:     GetAllNetworkQosByStoragePoolId,
do we need to expose this to users as well? I guess not, but in case we do then 
it needs to be a user query, and proper handling should be added to the query 
itself as well.
Line 261: 
Line 262:     GetWatchdog(VdcQueryAuthType.User),
Line 263:     GetConsoleDevices(VdcQueryAuthType.User),
Line 264: 


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/NetworkQoSDaoImpl.java
Line 9: import java.sql.ResultSet;
Line 10: import java.sql.SQLException;
Line 11: import java.util.List;
Line 12: 
Line 13: public class NetworkQoSDaoImpl extends 
DefaultGenericDaoDbFacade<NetworkQoS, Guid> implements NetworkQoSDao {
rename class to NetworkQosDaoDbFacadeImpl
Line 14: 
Line 15:     protected final RowMapper<NetworkQoS> mapper = 
createEntityRowMapper();
Line 16: 
Line 17:     /**


....................................................
File backend/manager/modules/dal/src/main/jdbc-resources/engine-daos.properties
Line 62: 
GlusterServiceDao=org.ovirt.engine.core.dao.gluster.GlusterServiceDaoDbFacadeImpl
Line 63: 
GlusterServerServiceDao=org.ovirt.engine.core.dao.gluster.GlusterServerServiceDaoDbFacadeImpl
Line 64: 
GlusterClusterServiceDao=org.ovirt.engine.core.dao.gluster.GlusterClusterServiceDaoDbFacadeImpl
Line 65: 
GlusterServerDao=org.ovirt.engine.core.dao.gluster.GlusterServerDaoDbFacadeImpl
Line 66: NetworkQoSDao=org.ovirt.engine.core.dao.network.NetworkQoSDaoImpl
rename it here as well.


....................................................
File backend/manager/modules/dal/src/main/resources/bundles/AppErrors.properties
Line 236: VAR__TYPE__USER_FROM_VM=$type User to VM
Line 237: VAR__TYPE__USER=$type User
Line 238: VAR__TYPE__PERMISSION=$type Permission
Line 239: VAR__TYPE__HOST_CAPABILITIES=$type Host capabilities
Line 240: VAR__TYPE__NETWORK_QOS=$type Network QoS
Shouldn't it be QOS? (same in all messages)
Line 241: VAR__ACTION__RUN=$action run
Line 242: VAR__ACTION__REMOVE=$action remove
Line 243: VAR__ACTION__ADD=$action add
Line 244: VAR__ACTION__CREATE=$action create


....................................................
File packaging/dbscripts/upgrade/03_03_0460_add_network_qos_tabel.sql
Line 1: -- 
----------------------------------------------------------------------
Line 2: --  table network_qos
fix typo in file name (s/tabel/table)
Line 3: -- 
----------------------------------------------------------------------
Line 4: 
Line 5: CREATE TABLE network_qos
Line 6: (


....................................................
File packaging/dbscripts/upgrade/pre_upgrade/0000_config.sql
Line 582: 
Line 583: select 
fn_db_add_config_value('MaxAverageNetworkQoSValue','1024','general');
Line 584: select 
fn_db_add_config_value('MaxPeakNetworkQoSValue','2048','general');
Line 585: select 
fn_db_add_config_value('MaxBurstNetworkQoSValue','10240','general');
Line 586: 
Are these "public" config entries? If so, they should be added to the 
engine-config.properties as well, to be able to set them through the 
engine-config utility.
Line 587: 
------------------------------------------------------------------------------------
Line 588: --                  Update with override section
Line 589: 
------------------------------------------------------------------------------------
Line 590: 


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

Gerrit-MessageType: comment
Gerrit-Change-Id: If39d20b77d06165e4adcc27e6b6dc5458cac93d3
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: ofri masad <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: Oved Ourfali <[email protected]>
Gerrit-Reviewer: Yair Zaslavsky <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-Reviewer: ofri masad <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to