Michael Pasternak has posted comments on this change.
Change subject: restapi: Add "All-Content" Header.
......................................................................
Patch Set 2: I would prefer that you didn't submit this
(5 inline comments)
i see only treatment of update() in BackendHostNicResource,
but it should be the same for all create()/update() methods.
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendAsyncStatusResource.java
Line 53: }
Line 54:
Line 55: @Override
Line 56: protected R doPopulate(R model, List entity) {
Line 57: return model;
why don't you delegate this constraint to sub-classes?
Line 58: }
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicResource.java
Line 134: params.setCheckConnectivity(nic.isCheckConnectivity());
Line 135: }
Line 136: performAction(VdcActionType.UpdateNetworkToVdsInterface,
params);
Line 137:
Line 138: return parent.lookupNic(id, true);
i wouldn't take this path, please think of generic doPopulate() call rather
than manual explicit invocation.
Line 139: }
Line 140:
Line 141: private org.ovirt.engine.core.common.businessentities.Network
getNewNetwork(HostNIC nic) {
Line 142: org.ovirt.engine.core.common.businessentities.Network
newNetwork = null;
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendHostNicsResource.java
Line 100: public HostNicResource getHostNicSubResource(String id) {
Line 101: return inject(new BackendHostNicResource(id, this));
Line 102: }
Line 103:
Line 104: public HostNIC lookupNic(String id, boolean forcePopulate) {
see my comment on this in the BackendHostNicResource
Line 105: List<VdsNetworkInterface> ifaces = getCollection();
Line 106: for (VdsNetworkInterface iface : ifaces) {
Line 107: if (iface.getId().toString().equals(id)) {
Line 108: HostNIC hostNic = map(iface, ifaces);
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendReadOnlyDeviceResource.java
Line 43: return collection;
Line 44: }
Line 45:
Line 46: @Override
Line 47: protected D doPopulate(D model, Q entity) {
why don't you delegate this constraint to sub-classes?
Line 48: return model;
Line 49: }
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainResource.java
Line 178:
model.setStatus(StatusUtils.create(StorageDomainStatus.UNATTACHED));
Line 179: } else {
Line 180: model.setStatus(null);
Line 181: }
Line 182: return model;
any reason for omitting supper.doPopulate() ?
Line 183: }
Line 184:
Line 185:
Line 186: private List<LogicalUnit> getIncomingLuns(Storage storage) {
--
To view, visit http://gerrit.ovirt.org/9815
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I2b0faf2843ec368fafd5270dc23d711d0710bd48
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ori Liel <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches