How can I provide a boolean parameter for a Satellite API call in 'spacewalk-api' command?

Solution Unverified - Updated -

Issue

  • I'm trying to use spacewalk-api on the command line to execute a Satellite API call that requires a boolean parameter.
    For example: systemgroup.addOrRemoveSystems API call requires boolean add parameter (True to add to the group, False to remove.)

  • Execution fails with Could not find translator for class java.lang.String to class java.lang.Boolean error:

# spacewalk-api --server=localhost --user=<username> --password=<password> systemgroup.addOrRemoveSystems "%session%" "<groupname>" "<systemid>" "%boolean:True%"
Fault returned from XML RPC Server, fault code -1: com.redhat.rhn.common.translation.TranslationException: Could not find translator for class java.lang.String to class java.lang.Boolean

Environment

  • Red Hat Satellite 5.
  • spacewalk-api command line tool.
  • API call with boolean parameter.

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content