Michael Pasternak has posted comments on this change.

Change subject: restapi: WIP: Created restapi interface for backup.
......................................................................


Patch Set 1: (2 inline comments)

i see that a lot of resources that you already using are missing here, can you 
please upload

api.xsd schema, mapper classes, collections (vms/disks)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/BackupResource.java
Line 22: import org.ovirt.engine.api.model.Backup;
Line 23: 
Line 24: 
Line 25: @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON, 
MediaType.APPLICATION_X_YAML})
Line 26: public interface BackupResource extends AsynchronouslyCreatedResource {
you not creating pojo object here, but a backup and it's expensive operation, 
therefore any resource should have asyc capabilities, this is done to avoid 
blocking a worker thread and providing to user standard api for monitor 
operation progress/completion.
Line 27: 
Line 28:     @GET
Line 29:     @Formatted
Line 30:     public Backup get();


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendBackupResource.java
Line 27:     public Backup get() {
Line 28:         org.ovirt.engine.core.common.businessentities.Backup entity = 
getBackup();
Line 29:         Backup backup = map(entity, null);
Line 30:         backup = addLinks(backup);
Line 31:         backup = collection.addVmConfiguration(entity, backup);
i see you mapping here vm config to backup, please note that we already have
vm config capabilities exposed in api in snapshot resource, so make sense for 
the backaup to extend it.
Line 32:         return backup;
Line 33:     }
Line 34: 
Line 35:     protected org.ovirt.engine.core.common.businessentities.Backup 
getBackup() {


--
To view, visit http://gerrit.ovirt.org/14219
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I29f8d40130386e7eb5fe533d3c59dbc8c5ec33ac
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Sharad Mishra <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Deepak C Shetty <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Sharad Mishra <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to