Hi!Thank you for your answer.I started to explore the answers which are sent using the same rules I suppose. But faced with some inconsistency.Here is the example://OK[0,0,10,0,471,9,8,1,0,1,0,
1,7||,0,0,0,1, 6,3,5,3,4,3,3,1,0,2,1,1,[(1) "java.util.ArrayList/4159755760" ,(2)"org.ovirt.engine.core.common. ,(3)"java.lang.action.ActionReturnValue/ 4163585948" String/2004016611" ,(4)"VAR__ACTION__RUN", (5)"VAR__TYPE__VM",(6) "USER_NOT_AUTHORIZED_TO_PERFORM_ACTION" ,(7)"vm1",(8)"org.ovirt.engine.core.common. errors.EngineFault/2377218566" ,(9) "org.ovirt.engine.core.common.errors.EngineError/ ,(10)"ENGINE"],0,7]1938278732" 1->"java.util.ArrayList/
4159755760" 1->1 element
2->"org.ovirt.engine.core.
common.action. ActionReturnValue/4163585948" (type of one value) 0->correlationId(string)
description (string) (??)
endActionTryAgain (boolean)(??)
1->executeFailedMessages(arraylist) 3-> 3 elements
3-> string type
4->"VAR__ACTION__RUN"
3->string type
5->"VAR__TYPE__VM"
3-> string type
6->"USER_NOT_AUTHORIZED_TO_
PERFORM_ACTION"
8->fault(enginefault)9->engineError
471->type of error
internalVdsmTaskIdList(arraylist) (??)
isSynchronous(boolean) (??)
jobId(guid) (??)
returnValue(object) (??)
succeeded(boolean) (??)
taskPlaceHolderIdList(arraylist) (??)
valid(boolean) (??)
0->validationMessages(arraylist) (??)
0->vdsmTaskIdList(arraylist) (??)
I sorted the field of ActionReturn Value but the provided values do not really match them.
I would say that not sorted fields match better here. The two sequences I am sure in are 6,3,5,3,4,3,3,1 and 471,9,8
The sorted fields of ActionReturnValue are:
correlationId description endActionTryAgain executeFailedMessages fault internalVdsmTaskIdList isSynchronous jobId returnValue succeeded taskPlaceHolderIdList valid validationMessages vdsmTaskIdList
вт, 30 окт. 2018 г. в 17:03, Thomas Broyer <t.broyer@gmail.com>:The hash is a hash of the class, not the value. It's there to ensure that the client and server use the exact same classes, with the same fields, of the same types, in the same order.--This means that the value is dependent on the version of oVirt that you're using, and only on the version of oVirt. IIRC, you should be able to find them in the serialization policy files, or of course in the JS files running in the browser (the hash is computed at compile-time, not at runtime, at least on the client-side, can't remember on the server)Whenever you update oVirt, the hashes might change, which means that the way the objects are serialized/deserialized has changed; this means you'll then need to update your proxy to account for the changes.
On Tuesday, October 30, 2018 at 1:51:13 PM UTC+1, Anastasiya Ruzhanskaya wrote:Are there any ideas about this hash function?пн, 29 окт. 2018 г. в 11:38, Anastasiya Ruzhanskaya <anastasiya.ruzhanskaya@frtk.ru >:--Hello!I am trying to build a proxy, which will intercept requests from oVirt and send errors if the action should not be performed. I just need to implement it in such a manner due to some legacy issues with using internal access control.I think that by importing some information from oVirt I can easily parse the message in order to find the action type and id of the object on which it is performed.The problem is with the answer: I need to send the valid answer.I created a user in oVirt which is a read-only user. So, I get the following answer://OK[0,0,10,0,471,9,8,1,0,1,0,1,7,0,0,0,1,6,3,5,3,4,3,3,1,0, 2,1,1,["java.util.ArrayList/ 4159755760","org.ovirt.engine. core.common.action. ActionReturnValue/4163585948", "java.lang.String/2004016611", "VAR__ACTION__SHUTDOWN","VAR__ TYPE__VM","USER_NOT_ AUTHORIZED_TO_PERFORM_ACTION", "vm1","org.ovirt.engine.core. common.errors.EngineFault/ 2377218566","org.ovirt.engine. core.common.errors. EngineError/1938278732"," ENGINE"],0,7] I think the answer should be always pretty the same (maybe only for some cases another one). The only thing which I find tricky here is how to generate a valid hash value?I found a function in sources of GWT but it accepts a serialization policy and the custom serializers (which is not appropriate for me as for incoming requests I will always look for action type and then object, and for answers I want just to generate this type errors, which I provided above, so I want to include to my proxy as minimum additional information as possible).So, I would like to find an easy way of generation this hash values (org.ovirt.engine.core.common.errors.EngineFault/2377218566) . Or probably it is even possible not ti generate them at all?
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com .
To post to this group, send email to google-web-toolkit@googlegroups.com .
Visit this group at https://groups.google.com/group/google-web-toolkit .
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com .
To post to this group, send email to google-web-toolkit@googlegroups.com .
Visit this group at https://groups.google.com/group/google-web-toolkit .
For more options, visit https://groups.google.com/d/optout .
You received this message because you are subscribed to the Google Groups "GWT Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at https://groups.google.com/group/google-web-toolkit.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment