Michael Pasternak has posted comments on this change.
Change subject: restapi: Attach network to cluster by ID
......................................................................
Patch Set 2: (1 inline comment)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
Line 87: return network;
Line 88: }
Line 89: }
Line 90: return null;
Line 91: }
you can make it a bit more efficient by storing networks returned from
getNetworks()
in add() method, and then just searching by-id and/or by-name in this collection
(this will save you two queries get-dc-by-cluster, get-dc-networks)
Line 92:
Line 93: @Override
Line 94: protected VdcQueryParametersBase getQueryParameters() {
Line 95: return new IdQueryParameters(asGuid(clusterId));
--
To view, visit http://gerrit.ovirt.org/14721
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2293cccf3d88aea384bd61ae75d3c8d5f41408a9
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Moti Asayag <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Moti Asayag <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches