Liron Aravot has posted comments on this change.
Change subject: engine:Validate maximum number of hosts in DC.(#771699)
......................................................................
Patch Set 8: (4 inline comments)
....................................................
File backend/manager/dbscripts/create_db_devel.sh
Line 2: #include db general functions
Line 3: source ./dbfunctions.sh
Line 4:
Line 5: SERVERNAME="localhost"
Line 6: DATABASE="engine_test"
got here by mistake, will be removed from next version
Line 7: USERNAME="postgres"
Line 8: PORT="5432"
Line 9:
Line 10: usage() {
....................................................
File backend/manager/dbscripts/vds_sp.sql
Line 804:
Line 805: Create or replace FUNCTION
GetVdsCountByStoragePoolId(v_storage_pool_id UUID, v_user_id UUID,
v_is_filtered boolean) RETURNS integer
Line 806: AS $procedure$
Line 807: BEGIN
Line 808: RETURN (SELECT COUNT(*) FROM
GetVdsByStoragePoolId(v_storage_pool_id, v_user_id, v_is_filtered));
will change
Line 809: END; $procedure$
Line 810: LANGUAGE plpgsql;
Line 811:
Line 812:
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAODbFacadeImpl.java
Line 150: @Override
Line 151: public Integer getVdsCountByStoragePoolId(Guid storagePool) {
Line 152: ParameterizedRowMapper<Integer> mapper = new
ParameterizedRowMapper<Integer>() {
Line 153: @Override
Line 154: public Integer mapRow(ResultSet rs, int rowNum) throws
SQLException {
it can't be defined as returning int, since generics is used.. :)
ParameterizedRowMapper<Integer>
Line 155: Integer result = rs.getInt(1);
Line 156: return result;
Line 157: }
Line 158: };
....................................................
File
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/VdsDAO.java
Line 163: * @param storagePool The storage pool's ID
Line 164: * @return vds count in the given storage pool
Line 165: */
Line 166: Integer getVdsCountByStoragePoolId(Guid storagePool);
Line 167: /**
I don't agree, the developer should know that count cannot be null (and i can
also document it), but Integer gives us further abilities to ints for example
if one would like to put this results on a map that autoboxing again would be
prevented. we cant avoid having Integer so i prefer returning it instead of
auto-unbox it. let me know what you think about it..
Line 168: * Retrieves all VDS instances in the given Storage Pool, that
are in status "UP"
Line 169: * ordered by their vds_spm_priority, not including -1
Line 170: * @return the list of VDS instances
Line 171: */
--
To view, visit http://gerrit.ovirt.org/6514
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ie1ef2ce160bc9ee4855b310c9d170ef7c14a0a17
Gerrit-PatchSet: 8
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Ayal Baron <[email protected]>
Gerrit-Reviewer: Daniel Erez <[email protected]>
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Kublin <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: Tal Nisan <[email protected]>
Gerrit-Reviewer: Vered Volansky <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches