Michael Pasternak has posted comments on this change.
Change subject: restapi: filtering the api according to ApplicationMode
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(11 inline comments)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendApiResource.java
Line 90: super(Guid.Empty.toString(), API.class, Object.class);
add here actual appmode reading:
appMode = getCurrent().get(ApplicationMode.class);
Line 264: appMode = getCurrent().get(ApplicationMode.class);
not needed, defined in class
Line 266: if(appMode == ApplicationMode.GlusterOnly)
this should be true for ApplicationMode.AllModes
Line 270: else
this should be true for ApplicationMode.GlusterOnly
Line 279: appMode = getCurrent().get(ApplicationMode.class);
not needed defined in class
Line 288: response =
addGlusterSummary(addSystemVersion(getGlusterApi()));
you forgot adding summary for GlusterOnly mode
Line 381: if (appMode != ApplicationMode.GlusterOnly) {
not needed as you have dedicated addGlusterSummary()
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendClustersResource.java
Line 28: static final String GLUSER_VOLUMES_SUB_COLLECTION =
"glustervolumes";
i'd call it something like VIRT_ONLY_MODE_COLLECTIONS_TO_HIDE
Line 34: public Clusters list() {
i'd prefer separating list in two methods:
1. listall
2. listvirtonly
and return them accordingly
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostsResource.java
Line 34: static final String STORAGE_SUB_COLLECTION = "storage";
i'd call it something like GLUSTERONLY_MODE_COLLECTIONS_TO_HIDE
Line 41: public Hosts list() {
i'd prefer separating list in two methods:
1. listall
2. glusteronly
and return them accordingly
--
To view, visit http://gerrit.ovirt.org/5353
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I1cf9bebe85ebc3e321006bc6e45c8ba08bfca6dd
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Kanagaraj M <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Shireesh Anjal <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches