Liron Ar has posted comments on this change.

Change subject: core, restapi: add GetVmOvfConfigurationQuery
......................................................................


Patch Set 10:

(6 comments)

....................................................
File 
backend/manager/modules/restapi/interface/definition/src/main/resources/rsdl_metadata.yaml
Line 665:       signatures: []
Line 666:     urlparams:
Line 667:       max: {context: matrix, type: 'xs:int', value: 'max results', 
required: false}
Line 668:     headers:
Line 669:           All-Content: {value: true|false, required: false}
Done
Line 670: - name: /api/vms/{vm:id}/snapshots/{snapshot:id}|rel=get
Line 671:   request:
Line 672:     body:
Line 673:       parameterType: null


Line 673:       parameterType: null
Line 674:       signatures: []
Line 675:     urlparams: {}
Line 676:     headers:
Line 677:           All-Content: {value: true|false, required: false}
Done
Line 678: - name: /api/vms/{vm:id}/snapshots/{snapshot:id}|rel=delete
Line 679:   request:
Line 680:     body:
Line 681:       parameterType: null


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/AbstractBackendCollectionResource.java
Line 254:     }
Line 255: 
Line 256:     protected R doPopulate(R model, Q entity) {
Line 257:         return model;
Line 258:     }
it was added by IDE automatic refactoring..sorry for including it in the patch. 
removed.


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotsResource.java
Line 70:     protected Snapshots 
mapCollection(List<org.ovirt.engine.core.common.businessentities.Snapshot> 
entities) {
Line 71:         Snapshots snapshots = new Snapshots();
Line 72:         for (org.ovirt.engine.core.common.businessentities.Snapshot 
entity : entities) {
Line 73:             Snapshot snapshot = map(entity, null);
Line 74:             snapshot = addLinks(snapshot);
I've moved the populate call to before the call to addLinks, i preferred to 
keep the order between addVmConfiguration and addLinks as is to reduce the 
noise in this patch.
Line 75:             snapshot = addVmConfiguration(entity, snapshot);
Line 76:             snapshot = populate(snapshot, entity);
Line 77:             snapshots.getSnapshots().add(snapshot);
Line 78:         }


Line 127:     }
Line 128: 
Line 129:     @Override
Line 130:     protected Snapshot doPopulate(Snapshot model, 
org.ovirt.engine.core.common.businessentities.Snapshot entity) {
Line 131:         if (isPopulate()) {
Done
Line 132:             VdcQueryReturnValue queryReturnValue =
Line 133:                     
runQuery(VdcQueryType.GetVmOvfConfigurationBySnapshot,
Line 134:                             new 
IdQueryParameters(Guid.createGuidFromString(model.getId())));
Line 135: 


Line 135: 
Line 136:             if (queryReturnValue.getSucceeded() && 
queryReturnValue.getReturnValue() != null) {
Line 137:                 return 
SnapshotMapper.mapSnapshotConfiguration((String) 
queryReturnValue.getReturnValue(),
Line 138:                         ConfigurationType.OVF,
Line 139:                         model);
Done
Line 140:             }
Line 141:         }
Line 142: 
Line 143:         return model;


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I46340c4461b57a4c314fb50ca9c19ac5fd08a451
Gerrit-PatchSet: 10
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Alissa Bonas <abo...@redhat.com>
Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com>
Gerrit-Reviewer: Deepak C Shetty <deepa...@linux.vnet.ibm.com>
Gerrit-Reviewer: Liron Ar <lara...@redhat.com>
Gerrit-Reviewer: Maor Lipchuk <mlipc...@redhat.com>
Gerrit-Reviewer: Michael Pasternak <mpast...@redhat.com>
Gerrit-Reviewer: Sergey Gotliv <sgot...@redhat.com>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
Engine-patches@ovirt.org
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to