Lior Vernia has posted comments on this change.

Change subject: engine: Modified external networks query
......................................................................


Patch Set 4:

(3 comments)

....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/NetworkDao.java
Line 109:      * @param externalId
Line 110:      *            the external network's external ID.
Line 111:      * @return the list of data center IDs.
Line 112:      */
Line 113:     List<Guid> getDcIdByExternalNetworkId(String externalId);
I wouldn't mind moving it, but it's arguable that it "belongs" to the DC DAO, 
as the only table it traverses is the networks table, so in my opinion it may 
just as well belong to the network DAO.


....................................................
File 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/network/NetworkDaoDbFacadeImpl.java
Line 92:     }
Line 93: 
Line 94:     @Override
Line 95:     public List<Guid> getDcIdByExternalNetworkId(String externalId) {
Line 96:         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource().addValue("external_id", externalId);
No problem, will fix in next patchset.
Line 97:         return 
getCallsHandler().executeReadList("GetDcIdByExternalNetworkId", 
createGuidMapper(), parameterSource);
Line 98:     }
Line 99: 
Line 100:     @Override


....................................................
File 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/network/NetworkDaoTest.java
Line 285:     public void testDataCentersByExternalNetworkId() {
Line 286:         List<Guid> result = 
dao.getDcIdByExternalNetworkId(FixturesTool.EXTERNAL_NETWORK_ID);
Line 287: 
Line 288:         assertNotNull(result);
Line 289:         assertTrue(result.size() > 1);
Asserting result.isEmpty() wouldn't prove that the method works across 
different DCs. I want to make sure that imported network instances have been 
collected from more than one DC.
Line 290:     }
Line 291: 
Line 292:     /**
Line 293:      * Ensures that no data centers are returned for an external 
network that hadn't been imported.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Idd9d918dabc0930d1801678f405c954d95228003
Gerrit-PatchSet: 4
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Lior Vernia <[email protected]>
Gerrit-Reviewer: Eli Mesika <[email protected]>
Gerrit-Reviewer: Lior Vernia <[email protected]>
Gerrit-Reviewer: Mike Kolesnik <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to