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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.