Michael Pasternak has posted comments on this change.
Change subject: core: restapi: add GetVmOvfConfigurationQuery
......................................................................
Patch Set 3: I would prefer that you didn't submit this
(3 inline comments)
....................................................
File
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendSnapshotResource.java
Line 137: this.collection = collection;
Line 138: }
Line 139:
Line 140: @Override
Line 141: protected Snapshot doPopulate(Snapshot model,
org.ovirt.engine.core.common.businessentities.Snapshot entity) {
please use getEntity() it facilitate VdcQueryReturnValue handling
Line 142: VdcQueryReturnValue queryReturnValue =
Line 143: runQuery(VdcQueryType.GetVmOvfConfigurationBySnapshot,
Line 144: new IdQueryParameters(guid));
Line 145: if (queryReturnValue.getSucceeded() &&
queryReturnValue.getReturnValue() != null) {
Line 143: runQuery(VdcQueryType.GetVmOvfConfigurationBySnapshot,
Line 144: new IdQueryParameters(guid));
Line 145: if (queryReturnValue.getSucceeded() &&
queryReturnValue.getReturnValue() != null) {
Line 146: model.setInitialization(new Initialization());
Line 147: model.getInitialization().setConfiguration(new
Configuration());
can't recall, does <configuration> a part of the original <initialization>
concept?
Line 148:
model.getInitialization().getConfiguration().setData((String)queryReturnValue.getReturnValue());
Line 149:
model.getInitialization().getConfiguration().setType(ConfigurationType.OVF.name());
Line 150: }
Line 151:
Line 145: if (queryReturnValue.getSucceeded() &&
queryReturnValue.getReturnValue() != null) {
Line 146: model.setInitialization(new Initialization());
Line 147: model.getInitialization().setConfiguration(new
Configuration());
Line 148:
model.getInitialization().getConfiguration().setData((String)queryReturnValue.getReturnValue());
Line 149:
model.getInitialization().getConfiguration().setType(ConfigurationType.OVF.name());
you should be adding api enum [1] to match ConfigurationType members via mapper.
[1] see org.ovirt.engine.api.model.StorageType for reference
Line 150: }
Line 151:
Line 152: return model;
Line 153: }
--
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: 3
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Liron Ar <[email protected]>
Gerrit-Reviewer: Alissa Bonas <[email protected]>
Gerrit-Reviewer: Allon Mureinik <[email protected]>
Gerrit-Reviewer: Deepak C Shetty <[email protected]>
Gerrit-Reviewer: Liron Ar <[email protected]>
Gerrit-Reviewer: Maor Lipchuk <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Sergey Gotliv <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches