Michael Pasternak has posted comments on this change.
Change subject: restapi : vm/template Import candidates should have /disks
(#829672)
......................................................................
Patch Set 1: (5 inline comments)
1. BackendExportDomainTemplateDiskResource.get() and
BackendExportDomainVmDiskResource.get() share same code,
consider moving it to supper class.
2. BackendExportDomainTemplateDisksResource.list() and
BackendExportDomainVmDisksResource.list()share same code,
consider moving it to supper class.
....................................................
File
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageDomainContentResource.java
Line 46: @Path("import")
Line 47: public Response doImport(Action action);
Line 48:
Line 49: @Path("disks")
Line 50: public ReadOnlyDevicesResource getDisksResource();
why generic ReadOnlyDevicesResource interface? make it explicit please.
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendStorageDomainContentResource.java
Line 28: super(id, modelType, entityType);
Line 29: this.parent = parent;
Line 30: }
Line 31:
Line 32: public AbstractBackendStorageDomainContentResource(String id,
why generic AbstractBackendStorageDomainContentResource? make it explicit
please.
Line 33:
AbstractBackendStorageDomainContentsResource<C, R, Q> parent,
Line 34: Class<R>
modelType,
Line 35: Class<Q>
entityType,
Line 36: String...
subCollection) {
Line 32: public AbstractBackendStorageDomainContentResource(String id,
Line 33:
AbstractBackendStorageDomainContentsResource<C, R, Q> parent,
Line 34: Class<R>
modelType,
Line 35: Class<Q>
entityType,
Line 36: String...
subCollection) {
by adding ...subCollection, you could actually reuse constructor at line 32.
Line 37: super(id, modelType, entityType, subCollection);
Line 38: this.parent = parent;
Line 39: }
Line 40:
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainTemplateResource.java
Line 27: return performGet(VdcQueryType.GetVmTemplate, new
GetVmTemplateParameters(guid));
Line 28: }
Line 29:
Line 30: @Override
Line 31: protected Template getFromExportDomain() {
why do you need this change?
Line 32: org.ovirt.engine.core.common.businessentities.VmTemplate
entity = getEntity();
Line 33: return addLinks(populate(map(entity, null), entity), null, new
String[0]);
Line 34: }
Line 35:
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainVmResource.java
Line 26: return performGet(VdcQueryType.GetVmByVmId, new
GetVmByVmIdParameters(guid));
Line 27: }
Line 28:
Line 29: @Override
Line 30: protected VM getFromExportDomain() {
why do you need this change?
Line 31: org.ovirt.engine.core.common.businessentities.VM entity =
getEntity();
Line 32: return addLinks(populate(map(entity, null), entity), null, new
String[0]);
Line 33: }
Line 34:
--
To view, visit http://gerrit.ovirt.org/11126
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I83fd4b046f72f73bb516615137522ac40028a7f0
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Ravi Nori <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ravi Nori <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches