Emily Zhang has posted comments on this change.

Change subject: engine:Trusted Compute Pools - Open Attestation integration 
with oVirt engine proposal
......................................................................


Patch Set 2: -Verified

(1 comment)

http://gerrit.ovirt.org/#/c/26381/2/backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/attestation/AttestationService.java
File 
backend/manager/modules/vdsbroker/src/main/java/org/ovirt/engine/core/vdsbroker/attestation/AttestationService.java:

Line 121:         List<AttestationValue> values = new 
ArrayList<AttestationValue>();
Line 122:         JsonParser jParser = jfactory.createJsonParser(str);
Line 123:         try {
Line 124:             jParser.nextToken(); //START_OBJECT
Line 125:             while (jParser.nextToken() != JsonToken.END_OBJECT) {
> why do we iterate tokens and not getting by key? (HEADER_HOSTS, HEADER_VTIM
hi, Gilad
We used jackson libraries to parse json string, and it hasn't the method 
getting by value. It only can parse json string by parsing every token. We can 
parse complex return string from attestation server using iterate tokens.
Line 126:                 if 
(jParser.getCurrentName().equalsIgnoreCase(HEADER_HOSTS)) {
Line 127:                     jParser.nextToken(); //START_ARRAY
Line 128:                     jParser.nextToken(); //START_OBJECT
Line 129:                     jParser.nextToken(); //FIELD_NAME


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2f541b004ba383a3098cf7fbfca7a000b11b750f
Gerrit-PatchSet: 2
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Emily Zhang <[email protected]>
Gerrit-Reviewer: Dave Chen <[email protected]>
Gerrit-Reviewer: Doron Fediuck <[email protected]>
Gerrit-Reviewer: Emily Zhang <[email protected]>
Gerrit-Reviewer: Gilad Chaplik <[email protected]>
Gerrit-Reviewer: Kobi Ianko <[email protected]>
Gerrit-Reviewer: [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