Change in ovirt-engine[master]: core: Reuse BackendClusterNetworksResource#getCluster

Code Review gerrit at ovirt.org
Mon Nov 7 13:19:28 UTC 2016


>From Allon Mureinik <amureini at redhat.com>:

Allon Mureinik has submitted this change and it was merged.

Change subject: core: Reuse BackendClusterNetworksResource#getCluster
......................................................................


core: Reuse BackendClusterNetworksResource#getCluster

GetClusterByIdQuery and GetClusterByClusterIdQuery have the exact same
functionality [1]. Keeping that in mind, getCluster() and getNetworks()
duplicate the functionality of retrieving a cluster from the backend by
its ID.
This patch cleans up the code by calling getCluster() directly instead
of reimplementing its functionality.

[1] In fact, this patch is done to set up a patch that removes
GetClusterByClusterIdQuery.

Change-Id: I93379aeaff423a4632bfb6db95869d7f912dc4cf
Signed-off-by: Allon Mureinik <amureini at redhat.com>
---
M backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResource.java
M backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendClusterNetworksResourceTest.java
2 files changed, 2 insertions(+), 22 deletions(-)

Approvals:
  Juan Hernandez: Looks good to me, approved
  Allon Mureinik: Verified; Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/66139
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I93379aeaff423a4632bfb6db95869d7f912dc4cf
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Juan Hernandez <juan.hernandez at redhat.com>
Gerrit-Reviewer: Martin Mucha <mmucha at redhat.com>
Gerrit-Reviewer: Yevgeny Zaspitsky <yzaspits at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>



More information about the Engine-commits mailing list