Michael Pasternak has posted comments on this change.

Change subject: restapi: image entity and import from glance
......................................................................


Patch Set 2: I would prefer that you didn't submit this

(6 inline comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/ImagesResource.java
Line 5: 
Line 6: import org.ovirt.engine.api.model.Image;
Line 7: import org.ovirt.engine.api.model.Images;
Line 8: 
Line 9: @Path("/images")
this annotation is needed only for the root collection, while this one lives 
under StorageDomainResource
Line 10: @Produces({ApiMediaType.APPLICATION_XML, 
ApiMediaType.APPLICATION_JSON, ApiMediaType.APPLICATION_X_YAML})
Line 11: public interface ImagesResource extends ReadOnlyResources<Image, 
Images> {
Line 12: 


....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/java/org/ovirt/engine/api/resource/StorageDomainResource.java
Line 43:     @Path("disks")
Line 44:     public DisksResource getDisksResource();
Line 45: 
Line 46:     @Path("images")
Line 47:     public ImagesResource getImagesResource();
i wonder if we shouldn't expose this "images" via existent "disks" collection? 
after all this is just another SD with images (same as disks on another SDs)


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainImageResource.java
Line 19: public class BackendStorageDomainImageResource
Line 20:         extends AbstractBackendActionableResource<Image, 
org.ovirt.engine.core.common.businessentities.RepoImage>
Line 21:         implements ImageResource {
Line 22: 
Line 23:     final private Guid storageDomainId;
your parent already has storageDomainId
Line 24:     final private BackendStorageDomainImagesResource parent;
Line 25: 
Line 26:     protected BackendStorageDomainImageResource(String id, 
BackendStorageDomainImagesResource parent) {
Line 27:         super(id, Image.class, 
org.ovirt.engine.core.common.businessentities.RepoImage.class);


Line 50: 
Line 51:     @Override
Line 52:     public CreationResource getCreationSubresource(@PathParam("oid") 
String oid) {
Line 53:         return null;
Line 54:     }
this ^ is not needed
Line 55: 
Line 56:     @Override
Line 57:     public ActionResource getActionSubresource(String action, String 
ids) {
Line 58:         return inject(new BackendActionResource(action, ids));


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendStorageDomainImagesResource.java
Line 42:     }
Line 43: 
Line 44:     @Override
Line 45:     protected Response performRemove(String id) {
Line 46:         return Response.serverError().build(); // TODO: removal is not 
implemented yet
just throw UnsupportedException here, this method never called anyway since 
you've implemented ReadOnly interface
Line 47:     }
Line 48: 
Line 49:     @Override
Line 50:     protected Image doPopulate(Image model, 
org.ovirt.engine.core.common.businessentities.RepoImage entity) {


....................................................
Commit Message
Line 3: AuthorDate: 2013-07-26 13:09:31 +0200
Line 4: Commit:     Federico Simoncelli <[email protected]>
Line 5: CommitDate: 2013-07-31 17:52:23 +0200
Line 6: 
Line 7: restapi: image entity and import from glance
please add:

1. ref to wiki page

2. BZ (if any)

3. please mention that this feature is a "teach preview"

4. please describe it in FeaturesHelper
Line 8: 
Line 9: Change-Id: Ief9104ff0eba175c90b42bc5651ada0f688eeb00


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

Gerrit-MessageType: comment
Gerrit-Change-Id: Ief9104ff0eba175c90b42bc5651ada0f688eeb00
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Omer Frenkel <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to