Omer Frenkel has posted comments on this change. Change subject: engine: support non-unique vm and template names across DCs (#912263) ......................................................................
Patch Set 6: (2 comments) https://gerrit.ovirt.org/#/c/41263/6/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetInstanceTypeQuery.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetInstanceTypeQuery.java: Line 22: if (params.getName() != null) { Line 23: instance = vmTemplateDao.getInstanceTypeByName(params.getName(), getUserID(), getParameters().isFiltered()); Line 24: } Line 25: else { Line 26: instance = vmTemplateDao.getInstanceType(getParameters().getId()); if this is a user query, you need to send the user and isFiltered as above, which means you need to have implementation for this also in the dao and db Line 27: } Line 28: getQueryReturnValue().setReturnValue(instance); Line 29: } Line 30: https://gerrit.ovirt.org/#/c/41263/6/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java File backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java: Line 141: Line 142: // VM Template based entities queries Line 143: IsVmTemlateWithSameNameExist(VdcQueryAuthType.User), Line 144: GetVmTemplate(VdcQueryAuthType.User), Line 145: GetInstanceType(VdcQueryAuthType.User), > I didn't put much thought into this, I saw that the equivalent query for ge it depends on the usage, if this query is used by non-admin interface it should be marked as user query, but then you need to use the "filter" and the current user inside the query itself (and in the db) please see my comment inside the query Line 146: GetAllVmTemplates(VdcQueryAuthType.User), Line 147: GetAllInstanceTypes(VdcQueryAuthType.User), Line 148: GetAllImageTypes(VdcQueryAuthType.User), Line 149: GetVmTemplatesDisks(VdcQueryAuthType.User), -- To view, visit https://gerrit.ovirt.org/41263 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I5f3244ec1885d54e58b475d0e74f59e26fa492a0 Gerrit-PatchSet: 6 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Ori Liel <[email protected]> Gerrit-Reviewer: Eli Mesika <[email protected]> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Juan Hernandez <[email protected]> Gerrit-Reviewer: Omer Frenkel <[email protected]> Gerrit-Reviewer: Ori Liel <[email protected]> Gerrit-Reviewer: Tomas Jelinek <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
