On 26.11.2012 14:45, Stepan Rogov wrote:
Hi.

I'm trying to add a custom value for the system via spacecmd.

spacecmd {SSM:0}> api -A "1000010910,{Responsible=SomeHuman}" system.setCustomValues

In the API, it has the following description:
struct - Map of custom labels to custom values

Get the following error in the logs.

[2012-11-26 14:34:16,519] ERROR - REQUESTED FROM: 127.0.0.1 CALL: system.setCustomValues(467651x823e88de10337bb91cb88a134b639b18, 1000010910, {Responsible=SomeHuman}) CALLER: (admin) TIME: 0.016 seconds com.redhat.rhn.common.translation.TranslationException: Could not find translator for class java.lang.String to interface java.util.Map

How it is correct to send this  data structure?

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list
At the same time, if you add the value of through argument of spacecmd - system_addcustomvalue:

spacecmd -y -u admin -p admin -s localhost system_addcustomvalue Responsible "SomeHuman" SomeServer
In logs appears:
[2012-11-29 12:46:44,268] INFO - REQUESTED FROM: 127.0.0.1 CALL: system.setCustomValues(473991xd85b8dd7fbe7959a88428f5b7979417d, 1000010910, {Responsible=SomeHuman}) CALLER: (admin) TIME: 0.056 seconds

Ie in the log - the same query, but for some reason the request directly to the api is not working. I think that need some way to pass api needed data type. But how to do it I do not understand.

_______________________________________________
Spacewalk-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/spacewalk-list

Reply via email to