Michael Pasternak has posted comments on this change.

Change subject: rest: use engine query for CPU caps parsing
......................................................................


Patch Set 2:

(3 comments)

....................................................
File 
backend/manager/modules/restapi/jaxrs/src/main/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResource.java
Line 185:             version.setCpus(new CPUs());
Line 186:             VdcQueryReturnValue vdcQueryReturnValue =
Line 187:                     runQuery(VdcQueryType.GetAllServerCpuList,
Line 188:                             new GetAllServerCpuListParameters(new 
org.ovirt.engine.core.compat.Version(asString(v))));
Line 189:             for (ServerCpu sc : 
(List<ServerCpu>)vdcQueryReturnValue.getReturnValue()) {
1. why not reusing old method for that?

2. please use getEntity() method, it will save from you messing with ReturnValue
Line 190:                 CPU cpu = new CPU();
Line 191:                 cpu.setId(sc.getCpuName());
Line 192:                 cpu.setLevel(sc.getLevel());
Line 193:                 version.getCpus().getCPUs().add(cpu);


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendCapabilitiesResourceTest.java
Line 95
Line 96
Line 97
Line 98
Line 99
i'm not sure about this change, now for tests to work , you should adding new 
VdcQueryType.GetAllServerCpuList expectation,

thanks.


....................................................
File 
backend/manager/modules/restapi/jaxrs/src/test/java/org/ovirt/engine/api/restapi/resource/BackendCapabilityResourceTest.java
Line 98
Line 99
Line 100
Line 101
Line 102
i'm not sure about this change, now for tests to work , you should adding new 
VdcQueryType.GetAllServerCpuList expectation,

thanks.


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I768f444f4ac6e5ee37ccba191d0588f00b8e3a44
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Roy Golan <[email protected]>
Gerrit-Reviewer: Gustavo Frederico Temple Pedrosa 
<[email protected]>
Gerrit-Reviewer: Leonardo Bianconi <[email protected]>
Gerrit-Reviewer: Michael Pasternak <[email protected]>
Gerrit-Reviewer: Ori Liel <[email protected]>
Gerrit-Reviewer: Roy Golan <[email protected]>
Gerrit-Reviewer: Vitor de Lima <[email protected]>
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to